Skip to content

Commit 03c88bf

Browse files
authored
Merge pull request #1232 from d-3fault/patch-3
Update OnNPCGiveDamage.md
2 parents 4016c0c + b4e478f commit 03c88bf

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/docs/scripting/callbacks/OnNPCGiveDamage.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ This callback is called when an NPC gives damage to a player.
2121

2222
## Returns
2323

24-
Return `false` to prevent the damage from being applied, or `true` to allow it.
24+
1 - Callback will not be called in other filterscripts.
25+
26+
0 - Allows this callback to be called in other filterscripts.
27+
28+
It is always called first in filterscripts so returning 1 there blocks other filterscripts from processing it.
2529

2630
## Examples
2731

@@ -47,7 +51,7 @@ public OnNPCGiveDamage(npcid, damagedid, Float:amount, WEAPON:weaponid, bodypart
4751
## Notes
4852
4953
- This callback is called before the damage is actually applied to the player
50-
- Returning `false` will prevent the damage from being applied
54+
- Returning `false` will NOT prevent the damage from being applied
5155
- The `bodypart` parameter uses the same values as `OnPlayerTakeDamage`
5256
5357
## Related Functions

0 commit comments

Comments
 (0)