Skip to content

Commit d96bf18

Browse files
authored
Merge pull request #1231 from d-3fault/patch-2
Update OnNPCTakeDamage.md
2 parents 03c88bf + 813b2d7 commit d96bf18

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/docs/scripting/callbacks/OnNPCTakeDamage.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 takes damage from a player or another NPC.
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

@@ -55,7 +59,7 @@ public OnNPCTakeDamage(npcid, issuerid, Float:amount, WEAPON:weaponid, bodypart)
5559
## Notes
5660
5761
- This callback is called before the damage is actually applied to the NPC
58-
- Returning `false` will prevent the damage from being applied
62+
- Returning `false` will NOT prevent the damage from being applied
5963
- The `issuerid` parameter will be `INVALID_PLAYER_ID` if damage is not caused by player
6064
- Body parts use the same constants as `OnPlayerTakeDamage`
6165

0 commit comments

Comments
 (0)