From c8fc2672dda9e757b3f31aeb07f983a0c49a9287 Mon Sep 17 00:00:00 2001 From: itsneufox <156133096+itsneufox@users.noreply.github.com> Date: Tue, 23 Dec 2025 22:21:58 +0000 Subject: [PATCH 1/3] Fix parameter name from 'damage' to 'amount' in OnNPCGiveDamage callback --- frontend/docs/scripting/callbacks/OnNPCGiveDamage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md b/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md index 9d00828c22a..9ddb6113fa3 100644 --- a/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md +++ b/frontend/docs/scripting/callbacks/OnNPCGiveDamage.md @@ -15,7 +15,7 @@ This callback is called when an NPC gives damage to a player. | --------- | ---------------------------------------------------- | | npcid | The ID of the NPC that gave the damage | | damagedid | The ID of the player that received the damage | -| damage | The amount of damage that was given | +| 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 | @@ -26,7 +26,7 @@ Return `false` to prevent the damage from being applied, or `true` to allow it. ## Examples ```c -public OnNPCGiveDamage(npcid, damagedid, Float:damage, WEAPON:weaponid, bodypart) +public OnNPCGiveDamage(npcid, damagedid, Float:amount, WEAPON:weaponid, bodypart) { // Only notify players tracking this 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 dealt %.1f damage to player %d (weapon: %d, bodypart: %d)", - npcid, damage, damagedid, _:weaponid, bodypart); + npcid, amount, damagedid, _:weaponid, bodypart); } } return 1; From 90b6fa215acc2778c88e165ce7514c53d62b588f Mon Sep 17 00:00:00 2001 From: itsneufox <156133096+itsneufox@users.noreply.github.com> Date: Tue, 23 Dec 2025 22:23:12 +0000 Subject: [PATCH 2/3] Fix parameter name from 'damage' to 'amount' and from 'damagerid' to 'issuerid' OnNPCTakeDamage callback --- .../docs/scripting/callbacks/OnNPCTakeDamage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md b/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md index c726e2ea5b9..666c12c1321 100644 --- a/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md +++ b/frontend/docs/scripting/callbacks/OnNPCTakeDamage.md @@ -14,8 +14,8 @@ 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 | -| damagerid | The ID of the player/NPC that caused the damage | -| damage | The amount of damage that was taken | +| 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 | @@ -26,7 +26,7 @@ Return `false` to prevent the damage from being applied, or `true` to allow it. ## Examples ```c -public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart) +public OnNPCTakeDamage(npcid, issuerid, Float:amount, WEAPON:weaponid, bodypart) { // Only notify players tracking this NPC for (new playerid = 0; playerid < MAX_PLAYERS; playerid++) @@ -36,15 +36,15 @@ public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart if (PlayerNPC[playerid] == npcid) { - if (damagerid == INVALID_PLAYER_ID) + if (issuerid == INVALID_PLAYER_ID) { SendClientMessage(playerid, 0xFF8800FF, "NPC %d took %.1f damage (weapon: %d, bodypart: %d)", - npcid, damage, _:weaponid, bodypart); + npcid, amount, _:weaponid, bodypart); } else { SendClientMessage(playerid, 0xFF8800FF, "NPC %d took %.1f damage from player %d (weapon: %d, bodypart: %d)", - npcid, damage, damagerid, _:weaponid, bodypart); + npcid, amount, issuerid, _:weaponid, bodypart); } } } @@ -56,7 +56,7 @@ public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart - This callback is called before the damage is actually applied to the NPC - Returning `false` will prevent the damage from being applied -- The `damagerid` parameter will be `INVALID_PLAYER_ID` if damage is not caused by player +- The `issuerid` parameter will be `INVALID_PLAYER_ID` if damage is not caused by player - Body parts use the same constants as `OnPlayerTakeDamage` ## Related Functions From fab982fce8065264ab3553976c76939a511aa592 Mon Sep 17 00:00:00 2001 From: itsneufox <156133096+itsneufox@users.noreply.github.com> Date: Tue, 23 Dec 2025 22:24:39 +0000 Subject: [PATCH 3/3] Fix typos in changelog page --- frontend/docs/changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/docs/changelog.md b/frontend/docs/changelog.md index a9078a8da0d..74a9bf32b0f 100644 --- a/frontend/docs/changelog.md +++ b/frontend/docs/changelog.md @@ -7,7 +7,7 @@ description: open.mp development progress and changelog. ## **[v1.5.8.3079](https://github.com/openmultiplayer/open.mp/releases/tag/v1.5.8.3079) (Latest)** -We're excited to announce the release of out latest server version! +We're excited to announce the release of our latest server version! This update brings several important fixes and introduces a long awaited new feature: **Fully controllable NPCs**! @@ -68,7 +68,7 @@ We’re excited to build what comes next together with the community.
Click here to expand -We're excited to announce the release of out latest server version! +We're excited to announce the release of our latest server version! This update brings several important fixes and introduces an exciting new feature: **openmp Packet Encryption**.