Saltar al contenido principal

NPC_IsNodeOpen

aviso

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

Description

Checks if an NPC node is open and available for use.

NameDescription
nodeidThe ID of the node

Returns

Returns true if the node is open, false otherwise.

Examples

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

new bool:isNodeOpen = NPC_IsNodeOpen(nodeid);

SendClientMessage(playerid, 0x00FF00FF, "Node %d is open: %s", nodeid, isNodeOpen ? "Yes" : "No");
return 1;
}
return 0;
}

Notes

  • Nodes must be opened with NPC_OpenNode before use
  • Only open nodes can be played by NPCs
  • Use this to check node availability before assigning to NPCs

No specific callbacks are triggered by this function.