20.09.2010, 19:30
pawn Код:
stock GetSpeed(playerid, mode = 1)
{
new
Float: velo[3]
;
GetVehicleVelocity(GetPlayerVehicleID(playerid), velo[0], velo[1], velo[2]);
return IsPlayerInAnyVehicle(playerid) ? (_: (floatsqroot(((velo[0] * velo[0]) + (velo[1] * velo[1]) + (velo[2] * velo[2]))) * (!mode ? 105.0 : 170.0))) : 0;
}