Speedometer
#3

pawn Код:
forward Speed(playerid);
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh) // by misco
{
    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);
}
pawn Код:
SetTimer("Speed",150,1);
Reply


Messages In This Thread
Speedometer - by ajwar - 05.04.2011, 10:44
Re: Speedometer - by Feverlander - 05.04.2011, 11:52
Re: Speedometer - by ajwar - 05.04.2011, 12:10
Re: Speedometer - by Feverlander - 05.04.2011, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)