How to find vehicle's XY velocity?
#7

Sorry.

pawn Код:
stock Float:VehicleAngle(vehicleid)
{
new Float:Angle;
GetVehicleZAngle(vehicleid, Angle);
return Angle;
}

stock GetVehicleForwardVelocity(vehicleid, &Float:Velocity, &Float:Z)
{
new Float:SpeedX, Float:SpeedY, Float:SpeedZ;
GetVehicleVelocity(vehicleid, SpeedX, SpeedY, SpeedZ);
SpeedX *= floatsin(-VehicleAngle(vehicleid), degrees);
SpeedY *= floatcos(-VehicleAngle(vehicleid), degrees);
Velocity = floatadd(SpeedX, SpeedY);
Z = SpeedZ;
return true;
}
Reply


Messages In This Thread
How to find vehicle's XY velocity? - by Miguel - 07.03.2010, 00:07
Re: How to find vehicle's XY velocity? - by Miguel - 07.03.2010, 13:01
Re: How to find vehicle's XY velocity? - by ¤Adas¤ - 07.03.2010, 13:02
Re: How to find vehicle's XY velocity? - by Miguel - 07.03.2010, 13:08
Re: How to find vehicle's XY velocity? - by ¤Adas¤ - 07.03.2010, 13:21
Re: How to find vehicle's XY velocity? - by Miguel - 07.03.2010, 13:26
Re: How to find vehicle's XY velocity? - by ¤Adas¤ - 07.03.2010, 13:27
Re: How to find vehicle's XY velocity? - by Miguel - 07.03.2010, 13:29
Re: How to find vehicle's XY velocity? - by Phyc0_ - 07.03.2010, 21:13
Re: How to find vehicle's XY velocity? - by Miguel - 08.03.2010, 03:36

Forum Jump:


Users browsing this thread: 1 Guest(s)