diff --git a/frontend/docs/scripting/callbacks/OnNPCDeath.md b/frontend/docs/scripting/callbacks/OnNPCDeath.md index f8aca7ba63f..902ad809ebf 100644 --- a/frontend/docs/scripting/callbacks/OnNPCDeath.md +++ b/frontend/docs/scripting/callbacks/OnNPCDeath.md @@ -11,11 +11,11 @@ tags: ["npc"] This callback is called when an NPC dies. -| Name | Description | -| -------- | --------------------------------------------------------------------------- | -| npcid | The ID of the NPC that died | -| killerid | The ID of the player/NPC that killed the NPC (or INVALID_PLAYER_ID if none) | -| reason | The reason for death (weapon ID or death cause) | +| Name | Description | +| ------------- | --------------------------------------------------------------------------- | +| npcid | The ID of the NPC that died | +| killerid | The ID of the player/NPC that killed the NPC (or INVALID_PLAYER_ID if none) | +| WEAPON:reason | The reason for death (weapon ID or death cause) | ## Examples diff --git a/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md b/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md index 9ddb6113fa3..a31fa45a29c 100644 --- a/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md +++ b/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md @@ -11,13 +11,13 @@ tags: ["npc", "damage"] This callback is called when an NPC gives damage to a player. -| Name | Description | -| --------- | ---------------------------------------------------- | -| npcid | The ID of the NPC that gave the damage | -| damagedid | The ID of the player that received the damage | -| amount | The amount of damage that was given | -| weaponid | The weapon ID used to give the damage | -| bodypart | The [body part](../resources/bodyparts) that was hit | +| Name | Description | +| --------------- | ---------------------------------------------------- | +| npcid | The ID of the NPC that gave the damage | +| damagedid | The ID of the player that received the damage | +| Float:amount | The amount of damage that was given | +| WEAPON:weaponid | The weapon ID used to give the damage | +| bodypart | The [body part](../resources/bodyparts) that was hit | ## Returns diff --git a/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md b/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md index 666c12c1321..fd7abcada60 100644 --- a/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md +++ b/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md @@ -11,13 +11,13 @@ tags: ["npc", "damage"] This callback is called when an NPC takes damage from a player or another NPC. -| Name | Description | -| --------- | ---------------------------------------------------- | -| npcid | The ID of the NPC that took damage | -| issuerid | The ID of the player/NPC that caused the damage | -| amount | The amount of damage that was taken | -| weaponid | The weapon ID used to cause the damage | -| bodypart | The [body part](../resources/bodyparts) that was hit | +| Name | Description | +| --------------- | ---------------------------------------------------- | +| npcid | The ID of the NPC that took damage | +| issuerid | The ID of the player/NPC that caused the damage | +| Float:amount | The amount of damage that was taken | +| WEAPON:weaponid | The weapon ID used to cause the damage | +| bodypart | The [body part](../resources/bodyparts) that was hit | ## Returns diff --git a/frontend/docs/scripting/callbacks/OnNPCWeaponShot.md b/frontend/docs/scripting/callbacks/OnNPCWeaponShot.md index 4909fdab80e..ff68f73766d 100644 --- a/frontend/docs/scripting/callbacks/OnNPCWeaponShot.md +++ b/frontend/docs/scripting/callbacks/OnNPCWeaponShot.md @@ -11,15 +11,15 @@ tags: ["npc", "weapon", "shooting"] This callback is called when an NPC fires a weapon. -| Name | Description | -| -------- | ------------------------------------------ | -| npcid | The ID of the NPC that fired the weapon | -| weaponid | The weapon ID that was fired | -| hittype | The type of entity that was hit (if any) | -| hitid | The ID of the entity that was hit (if any) | -| fX | The X coordinate where the bullet hit | -| fY | The Y coordinate where the bullet hit | -| fZ | The Z coordinate where the bullet hit | +| Name | Description | +| ----------------------- | ------------------------------------------ | +| npcid | The ID of the NPC that fired the weapon | +| WEAPON:weaponid | The weapon ID that was fired | +| BULLET_HIT_TYPE:hittype | The type of entity that was hit (if any) | +| hitid | The ID of the entity that was hit (if any) | +| Float:fX | The X coordinate where the bullet hit | +| Float:fY | The Y coordinate where the bullet hit | +| Float:fZ | The Z coordinate where the bullet hit | ## Returns diff --git a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCDeath.md b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCDeath.md index fe56adce43c..ea39f631c73 100644 --- a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCDeath.md +++ b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCDeath.md @@ -11,11 +11,11 @@ tags: ["npc"] 当 NPC 死亡时调用此回调。 -| 参数 | 说明 | -| -------- | ----------------------------------------------------------- | -| npcid | 死亡的 NPC 的 ID | -| killerid | 击杀 NPC 的玩家/NPC 的 ID(如果没有则为 INVALID_PLAYER_ID) | -| reason | 死亡原因(武器 ID 或死亡原因) | +| 参数 | 说明 | +| ------------- | ----------------------------------------------------------- | +| npcid | 死亡的 NPC 的 ID | +| killerid | 击杀 NPC 的玩家/NPC 的 ID(如果没有则为 INVALID_PLAYER_ID) | +| Weapon:reason | 死亡原因(武器 ID 或死亡原因) | ## 示例 diff --git a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCGiveDamage.md b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCGiveDamage.md index 5cbed464a5a..1d1250f0d58 100644 --- a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCGiveDamage.md +++ b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCGiveDamage.md @@ -11,13 +11,13 @@ tags: ["npc", "伤害"] 当 NPC 对玩家造成伤害时调用此回调。 -| 参数 | 说明 | -| --------- | ------------------------------------------ | -| npcid | 造成伤害的 NPC 的 ID | -| damagedid | 受到伤害的玩家的 ID | -| damage | 造成的伤害数量 | -| weaponid | 用于造成伤害的武器 ID | -| bodypart | 被击中的[身体部位](../resources/bodyparts) | +| 参数 | 说明 | +| --------------- | ------------------------------------------ | +| npcid | 造成伤害的 NPC 的 ID | +| damagedid | 受到伤害的玩家的 ID | +| Float:amount | 造成的伤害数量 | +| WEAPON:weaponid | 用于造成伤害的武器 ID | +| bodypart | 被击中的[身体部位](../resources/bodyparts) | ## 返回值 @@ -26,7 +26,7 @@ tags: ["npc", "伤害"] ## 示例 ```c -public OnNPCGiveDamage(npcid, damagedid, Float:damage, WEAPON:weaponid, bodypart) +public OnNPCGiveDamage(npcid, damagedid, Float:amount, WEAPON:weaponid, bodypart) { // 仅通知追踪此 NPC 的玩家 for (new playerid = 0; playerid < MAX_PLAYERS; playerid++) @@ -37,7 +37,7 @@ public OnNPCGiveDamage(npcid, damagedid, Float:damage, WEAPON:weaponid, bodypart if (PlayerNPC[playerid] == npcid) { SendClientMessage(playerid, 0xFF8800FF, "NPC %d 对玩家 %d 造成了 %.1f 点伤害(武器:%d,身体部位:%d)", - npcid, damage, damagedid, _:weaponid, bodypart); + npcid, amount, damagedid, _:weaponid, bodypart); } } return 1; diff --git a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCTakeDamage.md b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCTakeDamage.md index 15ec1a9ce09..7e8a5fcc66b 100644 --- a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCTakeDamage.md +++ b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCTakeDamage.md @@ -11,13 +11,13 @@ tags: ["npc", "伤害"] 当 NPC 受到来自玩家或其他 NPC 的伤害时调用此回调。 -| 参数 | 说明 | -| -------- | ------------------------------------------ | -| npcid | 受到伤害的 NPC 的 ID | -| issuerid | 造成伤害的玩家/NPC 的 ID | -| damage | 受到的伤害数量 | -| weaponid | 用于造成伤害的武器 ID | -| bodypart | 被击中的[身体部位](../resources/bodyparts) | +| 参数 | 说明 | +| --------------- | ------------------------------------------ | +| npcid | 受到伤害的 NPC 的 ID | +| issuerid | 造成伤害的玩家/NPC 的 ID | +| Float:amount | 受到的伤害数量 | +| WEAPON:weaponid | 用于造成伤害的武器 ID | +| bodypart | 被击中的[身体部位](../resources/bodyparts) | ## 返回值 @@ -26,7 +26,7 @@ tags: ["npc", "伤害"] ## 示例 ```c -public OnNPCTakeDamage(npcid, issuerid, Float:damage, WEAPON:weaponid, bodypart) +public OnNPCTakeDamage(npcid, issuerid, Float:amount, WEAPON:weaponid, bodypart) { // 仅通知追踪此 NPC 的玩家 for (new playerid = 0; playerid < MAX_PLAYERS; playerid++) @@ -39,12 +39,12 @@ public OnNPCTakeDamage(npcid, issuerid, Float:damage, WEAPON:weaponid, bodypart) if (issuerid == INVALID_PLAYER_ID) { SendClientMessage(playerid, 0xFF8800FF, "NPC %d 受到 %.1f 点伤害(武器:%d,身体部位:%d)", - npcid, damage, _:weaponid, bodypart); + npcid, amount, _:weaponid, bodypart); } else { SendClientMessage(playerid, 0xFF8800FF, "NPC %d 受到玩家 %d 造成的 %.1f 点伤害(武器:%d,身体部位:%d)", - npcid, damage, issuerid, _:weaponid, bodypart); + npcid, amount, issuerid, _:weaponid, bodypart); } } } diff --git a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCWeaponShot.md b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCWeaponShot.md index 65dea532e9b..d615636fe57 100644 --- a/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCWeaponShot.md +++ b/frontend/i18n/zh-CN/docusaurus-plugin-content-docs/current/scripting/callbacks/OnNPCWeaponShot.md @@ -11,15 +11,15 @@ tags: ["npc", "武器", "射击"] 当 NPC 开火时调用此回调。 -| 参数 | 说明 | -| -------- | ------------------------ | -| npcid | 开火的 NPC 的 ID | -| weaponid | 开火的武器 ID | -| hittype | 命中的实体类型(如果有) | -| hitid | 命中的实体 ID(如果有) | -| fX | 子弹击中的 X 坐标 | -| fY | 子弹击中的 Y 坐标 | -| fZ | 子弹击中的 Z 坐标 | +| 参数 | 说明 | +| ----------------------- | ------------------------ | +| npcid | 开火的 NPC 的 ID | +| WEAPON:weaponid | 开火的武器 ID | +| BULLET_HIT_TYPE:hittype | 命中的实体类型(如果有) | +| hitid | 命中的实体 ID(如果有) | +| Float:fX | 子弹击中的 X 坐标 | +| Float:fY | 子弹击中的 Y 坐标 | +| Float:fZ | 子弹击中的 Z 坐标 | ## 返回值