Make An NPC Lose Health Without CNPC? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Make An NPC Lose Health Without CNPC? (
/showthread.php?tid=198193)
Make An NPC Lose Health Without CNPC? -
The_Gangstas - 11.12.2010
is this possible?
Re: Make An NPC Lose Health Without CNPC? -
Jay_ - 11.12.2010
nope
Re: Make An NPC Lose Health Without CNPC? -
Mauzen - 11.12.2010
Use wups' OnPlayerShootPlayer include and add an health array to store the "virtual health" for every NPC. Just set it to 100 on npc spawn.
In the shootplayer callback decrease the health, if it is 0 or lower, kill the npc
So it is possible
Re: Make An NPC Lose Health Without CNPC? -
The_Gangstas - 11.12.2010
already tried something with onplayerkeystatechange. setplayerhealth doesnt work on npcs ):
edit - oh wait, virtual health.. hmm