26.02.2012, 02:55
pawn Код:
stock GetPlayerVehicleSpeed(playerid){
new vehicleid = GetPlayerVehicleID(playerid);
if(!vehicleid) return -1;
new Float:speed_x, Float:speed_y, Float:speed_z;
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
return floatround(floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667,floatround_round);
}