پرش به مطلب اصلی

NPC_GetNodePointCount

هشدار

This function was added in omp v1.5.8.3079 and will not work in earlier versions!

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