29.04.2012, 21:59
(
Последний раз редактировалось Th4 L&noN!; 30.04.2012 в 01:00.
)
RESOLVIDO
//No Final do GM:
stock GetPlayerSpeed(playerid,bool:kmh_anzahl)
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 0;
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh_anzahl?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
stock GetPlayerVehicleSpeed(playerid,bool:kmh_anzahl)
{
if(!IsPlayerInAnyVehicle(playerid)) return 0;
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh_anzahl?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}