15.08.2010, 23:17
Quote:
Why don't you show use some code? Posts like 'Don't work' are not very informative.
WHAT doesn't work? Do you have errors? How did you code it? |
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh)
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}