01.03.2012, 15:10
This is what i currently have
What i want:
1: It should calculate in kmh, currently it's mph
2: It should count all numbers, for example 1 kmh, 2 kmh, 3 kmh etc (Currently if i press W it instantly shows 15kmh)
I will give +rep (4points) to the one who helps me!
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);
}
1: It should calculate in kmh, currently it's mph
2: It should count all numbers, for example 1 kmh, 2 kmh, 3 kmh etc (Currently if i press W it instantly shows 15kmh)
I will give +rep (4points) to the one who helps me!