How to detect if car felt in water? - 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: How to detect if car felt in water? (
/showthread.php?tid=582471)
How to detect if car felt in water? -
Stereotype - 20.07.2015
Well, title says it all, i just don't get it how you guys check this, by updating location and checking is it below water level or what? I am making derby fs and i don't get this. lol :P
Re: How to detect if car felt in water? -
Virtual1ty - 20.07.2015
Most of the time water level Z-coordinate is 0.0 or lower. They may also somehow check the angular Z-velocity of the vehicle and if it's negative.
Re: How to detect if car felt in water? -
Stereotype - 20.07.2015
Is that the only way? I mean, don't wanna make the timer with so low time. too much for the script i guess
Re: How to detect if car felt in water? -
Vince - 20.07.2015
As soon as the vehicle enters water OnVehicleDeath is called, even if the player manages to drive or teleport out.
Re: How to detect if car felt in water? -
Stereotype - 20.07.2015
Quote:
Originally Posted by Vince
As soon as the vehicle enters water OnVehicleDeath is called, even if the player manages to drive or teleport out.
|
I love you, + rep'ed <3