04.09.2009, 16:11
why use GetPlayerVehicleID(playerid)... if the player is in a vehicle the player and vehicle are both moving lol....
btw will this work?:
i read everyones post and combined with mine idea lol..
btw will this work?:
pawn Код:
floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz);
stock GetPlayerSpeed(playerid,bool:kmh) // by misco edit by gamer_z
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz);
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}