Vehicle crashing into something - 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 crashing into something (
/showthread.php?tid=284458)
Vehicle crashing into something -
whitedragon - 19.09.2011
How to check if car crash into wall or into streetlight and so on.....
I have no idea how it should coded so example is the best..
Re: Vehicle crashing into something -
Davz*|*Criss - 19.09.2011
Probably it would be Impossible, I have never seen in this way code. I mean Perhaps it would be, Not surely.
Re: Vehicle crashing into something -
Vince - 19.09.2011
Crashing into a pole would be hard to near impossible to detect. Wall might be slightly easier. You can check if the health of the vehicle went down and if the forward velocity went to near zero. You could check this in a callback like
OnVehicleDamageStatusUpdate as crashing into the wall will certainly damage the lights, the bumpers and maybe even the hood.
Re: Vehicle crashing into something -
|_ⒾⓇⓄN_ⒹⓄG_| - 19.09.2011
pawn Код:
OnVehicleDamageStatusUpdate(vehicleid, playerid)
sometimes when we crash against one street light the car damage don't change... (happened with me)