17.05.2017, 16:43
Return an integer :
EDIT: There is not a REAL magic number since each (almost) vehicle are his own ratio.
PHP код:
GetPlayerSpeed(playerid)
{
new
Float:x,
Float:y,
Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
return floatround(floatsqroot(floatpower(floatabs(x), 2.0) + floatpower(floatabs(y), 2.0) + floatpower(floatabs(z), 2.0)) * 195.28625);
}