Skip to content

Commit a2453ae

Browse files
authored
Merge pull request #1172 from openmultiplayer/npc-docs-fix
Fix typos in OnNPCTakeDamage, OnNPCGiveDamage and Changelog
2 parents cb70feb + fab982f commit a2453ae

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

frontend/docs/changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: open.mp development progress and changelog.
77
## **[v1.5.8.3079](https://github.com/openmultiplayer/open.mp/releases/tag/v1.5.8.3079) (Latest)**
88

99

10-
We're excited to announce the release of out latest server version!
10+
We're excited to announce the release of our latest server version!
1111

1212
This update brings several important fixes and introduces a long awaited new feature: **Fully controllable NPCs**!
1313

@@ -68,7 +68,7 @@ We’re excited to build what comes next together with the community.
6868
<details>
6969
<summary>Click here to expand</summary>
7070

71-
We're excited to announce the release of out latest server version!
71+
We're excited to announce the release of our latest server version!
7272

7373
This update brings several important fixes and introduces an exciting new feature: **openmp Packet Encryption**.
7474

frontend/docs/scripting/callbacks/OnNPCGiveDamage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This callback is called when an NPC gives damage to a player.
1515
| --------- | ---------------------------------------------------- |
1616
| npcid | The ID of the NPC that gave the damage |
1717
| damagedid | The ID of the player that received the damage |
18-
| damage | The amount of damage that was given |
18+
| amount | The amount of damage that was given |
1919
| weaponid | The weapon ID used to give the damage |
2020
| bodypart | The [body part](../resources/bodyparts) that was hit |
2121

@@ -26,7 +26,7 @@ Return `false` to prevent the damage from being applied, or `true` to allow it.
2626
## Examples
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
// Only notify players tracking this 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 dealt %.1f damage to player %d (weapon: %d, bodypart: %d)",
40-
npcid, damage, damagedid, _:weaponid, bodypart);
40+
npcid, amount, damagedid, _:weaponid, bodypart);
4141
}
4242
}
4343
return 1;

frontend/docs/scripting/callbacks/OnNPCTakeDamage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ This callback is called when an NPC takes damage from a player or another NPC.
1414
| Name | Description |
1515
| --------- | ---------------------------------------------------- |
1616
| npcid | The ID of the NPC that took damage |
17-
| damagerid | The ID of the player/NPC that caused the damage |
18-
| damage | The amount of damage that was taken |
17+
| issuerid | The ID of the player/NPC that caused the damage |
18+
| amount | The amount of damage that was taken |
1919
| weaponid | The weapon ID used to cause the damage |
2020
| bodypart | The [body part](../resources/bodyparts) that was hit |
2121

@@ -26,7 +26,7 @@ Return `false` to prevent the damage from being applied, or `true` to allow it.
2626
## Examples
2727

2828
```c
29-
public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart)
29+
public OnNPCTakeDamage(npcid, issuerid, Float:amount, WEAPON:weaponid, bodypart)
3030
{
3131
// Only notify players tracking this NPC
3232
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
@@ -36,15 +36,15 @@ public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart
3636

3737
if (PlayerNPC[playerid] == npcid)
3838
{
39-
if (damagerid == INVALID_PLAYER_ID)
39+
if (issuerid == INVALID_PLAYER_ID)
4040
{
4141
SendClientMessage(playerid, 0xFF8800FF, "NPC %d took %.1f damage (weapon: %d, bodypart: %d)",
42-
npcid, damage, _:weaponid, bodypart);
42+
npcid, amount, _:weaponid, bodypart);
4343
}
4444
else
4545
{
4646
SendClientMessage(playerid, 0xFF8800FF, "NPC %d took %.1f damage from player %d (weapon: %d, bodypart: %d)",
47-
npcid, damage, damagerid, _:weaponid, bodypart);
47+
npcid, amount, issuerid, _:weaponid, bodypart);
4848
}
4949
}
5050
}
@@ -56,7 +56,7 @@ public OnNPCTakeDamage(npcid, damagerid, Float:damage, WEAPON:weaponid, bodypart
5656
5757
- This callback is called before the damage is actually applied to the NPC
5858
- Returning `false` will prevent the damage from being applied
59-
- The `damagerid` parameter will be `INVALID_PLAYER_ID` if damage is not caused by player
59+
- The `issuerid` parameter will be `INVALID_PLAYER_ID` if damage is not caused by player
6060
- Body parts use the same constants as `OnPlayerTakeDamage`
6161
6262
## Related Functions

0 commit comments

Comments
 (0)