20.12.2017, 14:38
Код:
format(lstring,sizeof(lstring),"~b~Vozilo ~w~%s~n~~b~Zdravlje: ~w~%.2f~n~~b~GPS: ~w~%s~n~~g~KM/H: ~r~%d",VehicleNames[GetVehicleModel(GetPlayerVehicleID(i)) - 400],L_VehHealth,LuxZone,GetPlayerSpeed(car,true)); TextDrawSetString(LFunc[i], lstring); format(lstr,sizeof(lstr),"~n~~g~KM/H: ~r~%d",GetPlayerSpeed(car,true)); TextDrawSetString(Lmph[i], lstr);
Код:
stock GetPlayerSpeed(carid,bool:kmh) { new Float:Vx,Float:Vy,Float:Vz,Float:rtn; GetVehicleVelocity(carid,Vx,Vy,Vz); rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2))); return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100); }