முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

NPC_GetNodePointCount

எச்சரிக்கை

செயல்பாடு என்பது omp v1.5.8.3079 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Gets the number of points in an NPC node.

NameDescription
nodeidThe ID of the node

Returns​

Returns the number of points in the node, or 0 if the node is invalid.

Examples​

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/checknodepointcount ", true, 21))
{
new nodeid = strval(cmdtext[21]);

if (nodeid < 0 || nodeid > 63)
return SendClientMessage(playerid, 0xFF0000FF, "Invalid node ID. Must be between 0 and 63.");

new count = NPC_GetNodePointCount(nodeid);

SendClientMessage(playerid, 0x00FF00FF, "Node %d has %d points", nodeid, count);
return 1;
}
return 0;
}

Notes​

  • Returns 0 if the node is invalid or not opened
  • The point count represents navigation waypoints within the node