Check if vehicle is in air? A jump counter... - 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: Check if vehicle is in air? A jump counter... (
/showthread.php?tid=275559)
Check if vehicle is in air? A jump counter... -
Deltac0 - 10.08.2011
Anyway to do this? I think I should check GetVehicleVelocity(vehicle,x,y,z); and see if it changes?
Re: Check if vehicle is in air? A jump counter... -
Godhimself - 10.08.2011
You want to count how many times a player jumps off a jump(ramp) with a vehicle?
Re: Check if vehicle is in air? A jump counter... -
Calgon - 10.08.2011
You can use MapAndreas with a little math to detect the difference between the ground and the Z coordinate for the vehicle.
Re: Check if vehicle is in air? A jump counter... -
Deltac0 - 10.08.2011
Quote:
Originally Posted by Godhimself
You want to count how many times a player jumps off a jump(ramp) with a vehicle?
|
I want to count how high and for how long he stays in the air. And that MapAndreas thingy would work, but how to implement it?
Re: Check if vehicle is in air? A jump counter... -
=WoR=Varth - 10.08.2011
pawn Код:
GetPlayerAnimationIndex(playerid);
Re: Check if vehicle is in air? A jump counter... -
Calgon - 10.08.2011
@varthshenon Vehicles don't retain animation states...
Quote:
Originally Posted by Deltac0
I want to count how high and for how long he stays in the air. And that MapAndreas thingy would work, but how to implement it?
|
Get the MapAndreas value and subtract the GetPlayerPos Z coordinate from it, see what the result is and determine if the value is too high or too low, like if 5000.0 is returned, then it'd be relatively obvious they're high up in the air.
Re: Check if vehicle is in air? A jump counter... -
=WoR=Varth - 10.08.2011
I though it's "Check if player is in air? A jump counter..."
Sorry for miss read.