SA-MP Forums Archive
OnPlayerGiveDamage; would it detect damage done to NPC's? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerGiveDamage; would it detect damage done to NPC's? (/showthread.php?tid=381782)



OnPlayerGiveDamage; would it detect damage done to NPC's? - TheDeadlyDutchi - 30.09.2012

Hello all,

I want to make a zombie script. But the zombies need to be able to die.
I thought about using OnPlayerGiveDamage to 'kill' the zombies, using virtual health.

The question is, would OnPlayerGiveDamage detect if a player is shooting on an NPC?


Re: OnPlayerGiveDamage; would it detect damage done to NPC's? - Mauzen - 30.09.2012

Nope, neither this nor OnPlayerTakeDamage will work for NPCs. Though it will be called if a NPC damages a real player, but for the other way round youll need to use something like wups OnPlayerShootPlayer include.


Re: OnPlayerGiveDamage; would it detect damage done to NPC's? - TheDeadlyDutchi - 30.09.2012

Okay, thank you.