Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions frontend/docs/scripting/callbacks/OnNPCFinishNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ This callback is called when an NPC finishes navigating a complete node during n
## Examples

```c
public OnNPCFinishNodePoint(npcid, nodeid, pointid)
public OnNPCFinishNode(npcid, nodeid)
{
printf("[NPC] NPC %d finished node %d", npcid, nodeid);

// Notify players tracking this NPC
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
Expand All @@ -29,7 +31,7 @@ public OnNPCFinishNodePoint(npcid, nodeid, pointid)

if (PlayerNPC[playerid] == npcid)
{
SendClientMessage(playerid, 0xFFFF00FF, "NPC %d reached node %d point %d", npcid, nodeid, pointid);
SendClientMessage(playerid, 0x00FF00FF, "NPC %d finished node %d", npcid, nodeid);
}
}
return 1;
Expand Down
6 changes: 2 additions & 4 deletions frontend/docs/scripting/callbacks/OnNPCFinishNodePoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ This callback is called when an NPC reaches a specific point during node-based n
## Examples

```c
public OnNPCFinishNode(npcid, nodeid)
public OnNPCFinishNodePoint(npcid, nodeid, pointid)
{
printf("[NPC] NPC %d finished node %d", npcid, nodeid);

// Notify players tracking this NPC
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
Expand All @@ -32,7 +30,7 @@ public OnNPCFinishNode(npcid, nodeid)

if (PlayerNPC[playerid] == npcid)
{
SendClientMessage(playerid, 0x00FF00FF, "NPC %d finished node %d", npcid, nodeid);
SendClientMessage(playerid, 0xFFFF00FF, "NPC %d reached node %d point %d", npcid, nodeid, pointid);
}
}
return 1;
Expand Down