SA-MP Forums Archive
Crash damage - 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: Crash damage (/showthread.php?tid=610594)



Crash damage - GoldenLion - 26.06.2016

Hi,
I recently downloaded Emmet's callbacks.inc and created health loss on crash with vehicle with OnPlayerCrashVehicle.
Everything is good except that it takes health only from the driver. Is it possible to take health from all passengers?


Re: Crash damage - Sjn - 26.06.2016

Loop through players and check if their vehicle ID is the same as the driver's, if it is, decrease their health as well.


Re: Crash damage - GoldenLion - 26.06.2016

Quote:
Originally Posted by Sjn
Посмотреть сообщение
Loop through players and check if their vehicle ID is the same as the driver's, if it is, decrease their health as well.
I'll try that, thanks.