NPC talks after kill - 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: NPC talks after kill (
/showthread.php?tid=164571)
NPC talks after kill -
Henrix - 01.08.2010
Well, I got some really fast tram NPC's driving around and these trams kill players easily.
I want the NPC's to say something like: ''Haha, watch out better next time'' or something when they kill someone by driving over them.
Anyone knows how I can make this work?
Re: NPC talks after kill -
Mauzen - 01.08.2010
Dont know if it works with npcs, but normally when a player is killed by a car, OnPlayerDeath ist called with the car death reason.
You could check if the killerid is the driving npc and then SendChat.
If not, you could check the distance to the npc, if a player is called with an unknown reason to see if he could be hit by the tram.