@@ -15,7 +15,7 @@ tags: ["npc", "伤害"]
1515| --------------- | ------------------------------------------ |
1616| npcid | 造成伤害的 NPC 的 ID |
1717| damagedid | 受到伤害的玩家的 ID |
18- | Float: damage | 造成的伤害数量 |
18+ | Float: amount | 造成的伤害数量 |
1919| WEAPON: weaponid | 用于造成伤害的武器 ID |
2020| bodypart | 被击中的[ 身体部位] ( ../resources/bodyparts ) |
2121
@@ -26,7 +26,7 @@ tags: ["npc", "伤害"]
2626## 示例
2727
2828``` c
29- public OnNPCGiveDamage (npcid, damagedid, Float: damage , WEAPON: weaponid , bodypart)
29+ public OnNPCGiveDamage (npcid, damagedid, Float: amount , WEAPON: weaponid , bodypart)
3030{
3131 // 仅通知追踪此 NPC 的玩家
3232 for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
@@ -37,7 +37,7 @@ public OnNPCGiveDamage(npcid, damagedid, Float:damage, WEAPON:weaponid, bodypart
3737 if (PlayerNPC[playerid] == npcid)
3838 {
3939 SendClientMessage(playerid, 0xFF8800FF, "NPC %d 对玩家 %d 造成了 %.1f 点伤害(武器:%d,身体部位:%d)",
40- npcid, damage , damagedid, _:weaponid, bodypart);
40+ npcid, amount , damagedid, _:weaponid, bodypart);
4141 }
4242 }
4343 return 1;
0 commit comments