Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. forward UpdateVehInfo(playerid);
  2. public UpdateVehInfo(playerid)
  3. {
  4. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  5. {
  6. new Float:vhp, Float:Vel[3];
  7.  
  8. new vehid = GetPlayerVehicleID(playerid);
  9. GetVehicleHealth(vehid, vhp);
  10.  
  11. new str[128];
  12. if(vhp < 2000)
  13. {
  14. format(str, sizeof str, "~b~~h~Pojazd: ~w~%s ~p~I ~b~~h~Stan: ~w~%d/100 ~p~I ~b~~h~Predkosc: ~w~%d ~b~~h~km/h", CarList[GetVehicleModel(vehid)-400], floatround(((vhp - 250) / 750) * 100) < 0 ? 0 : floatround(((vhp - 250) / 750) * 100));
  15. } else format(str, sizeof str, "~b~~h~Pojazd: ~w~%s ~p~I ~b~~h~Stan: ~w~GOD ~p~I ~b~~h~Predkosc: ~w~%d ~b~~h~km/h", CarList[GetVehicleModel(vehid)-400], GetPlayerSpeed(playerid));
  16.  
  17. TextDrawSetString(VehicleInfo[playerid], str);
  18. }
  19.  
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement