17.03.2015, 18:55
Ok, so you need to store a float inside sv[3], then round it only for format function:
pawn Код:
public Speedometer(playerid) {
GetVehicleVelocity(GetPlayerVehicleID(playerid), sv[0], sv[1], sv[2]);
sv[3] = floatsqroot(((sv[0]*sv[0])+(sv[1]*sv[1])+(sv[2]*sv[2]))* 181.5);
format(fquery, sizeof(fquery), "Vehicle: %s~n~Speed: %i KPH", GetVehicleNameFromModel(GetPlayerVehicleID(playerid)), floatround(sv[3], floatround_round));
PlayerTextDrawSetString(playerid, Speedo[playerid], fquery);
return 1;
}