Skip to content

Commit 82d4784

Browse files
committed
fix swapped examples for OnNPCFinishNode and OnNPCFinishNodePoint
1 parent a7a8355 commit 82d4784

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCFinishNode.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ tags: ["npc", "节点", "导航"]
1919
## 示例
2020

2121
```c
22-
public OnNPCFinishNodePoint(npcid, nodeid, pointid)
22+
public OnNPCFinishNode(npcid, nodeid)
2323
{
24+
printf("[NPC] NPC %d 完成节点 %d", npcid, nodeid);
25+
2426
// 通知追踪此 NPC 的玩家
2527
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
2628
{
@@ -29,7 +31,7 @@ public OnNPCFinishNodePoint(npcid, nodeid, pointid)
2931

3032
if (PlayerNPC[playerid] == npcid)
3133
{
32-
SendClientMessage(playerid, 0xFFFF00FF, "NPC %d 到达节点 %d 的点 %d", npcid, nodeid, pointid);
34+
SendClientMessage(playerid, 0x00FF00FF, "NPC %d 完成节点 %d", npcid, nodeid);
3335
}
3436
}
3537
return 1;

frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCFinishNodePoint.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ tags: ["npc", "节点", "导航"]
2020
## 示例
2121

2222
```c
23-
public OnNPCFinishNode(npcid, nodeid)
23+
public OnNPCFinishNodePoint(npcid, nodeid, pointid)
2424
{
25-
printf("[NPC] NPC %d 完成节点 %d", npcid, nodeid);
26-
2725
// 通知追踪此 NPC 的玩家
2826
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
2927
{
@@ -32,7 +30,7 @@ public OnNPCFinishNode(npcid, nodeid)
3230

3331
if (PlayerNPC[playerid] == npcid)
3432
{
35-
SendClientMessage(playerid, 0x00FF00FF, "NPC %d 完成节点 %d", npcid, nodeid);
33+
SendClientMessage(playerid, 0xFFFF00FF, "NPC %d 到达节点 %d 的点 %d", npcid, nodeid, pointid);
3634
}
3735
}
3836
return 1;

0 commit comments

Comments
 (0)