vehicle/playerdeath reason - 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: vehicle/playerdeath reason (
/showthread.php?tid=493680)
vehicle/playerdeath reason -
PawnoQ - 09.02.2014
hi,
when there are 2 players in 2 vehicles and they do drive bys and one of the vehicle eplodes,
then it will notice the player death as a suicide.
How can i make it like it will not be shown as suicide but as the player got killed by the other player (drive byer)?
It is possible, i saw it on some servers but i have no idea how to do that, please help
Can i use new 0.3z callback somehow (OnplayerShot)?
I hope u can help me and give me some ideas on how to do that...
thanks :P
Re: vehicle/playerdeath reason -
PawnoQ - 11.02.2014
anyone?
Re: vehicle/playerdeath reason -
PawnoQ - 12.02.2014
pls i really need this
Re: vehicle/playerdeath reason -
PowerPC603 - 12.02.2014
Try to use the OnVehicleDeath callback instead of OnPlayerDeath.
When the vehicle gets destroyed, loop through all players to see who's inside this vehicle.
The killerid of the vehicle would be who killed it's passengers as well.
Re: vehicle/playerdeath reason -
PawnoQ - 14.02.2014
mhh, thanks didnt tihnk about that!
I didnt know this was possible, as the player is already dead when the vehicle gets destroyed?
Could you please provide a little piece of code to show me how you would do it. (only the sctructure, no need to post finished code)
As im still unsure how to get the killerid...
Re: vehicle/playerdeath reason -
PawnoQ - 17.02.2014
bump