Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. function Checkvehinfo(i) {
  2. if(GetPlayerState(i) == PLAYER_STATE_DRIVER && InDealer[i] == 0) {
  3. if(InRaceArena[i] == 1 && RaceStarted == 0) return 1;
  4.  
  5. new
  6. status[180], str[256], benzina[64],
  7. engine,lights,alarm,doors,bonnet,boot,objective,
  8. vehicle = GetPlayerVehicleID(i), spe = Carspeed(i), carid = FindSpawnID(vehicle);
  9.  
  10. GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
  11.  
  12. if(doors == 1) { status = "Doors: ~r~Locked~w~~h~"; }
  13. else if(doors == 0) { status = "Doors: ~w~Unlocked~w~~h~"; }
  14. else status = "Doors: ~w~Unlocked~w~~h~";
  15.  
  16. if(Gas[vehicle] > 20) format(benzina, sizeof(benzina), "%d", Gas[vehicle]);
  17. else format(benzina, sizeof(benzina), "~r~%d", Gas[vehicle]);
  18.  
  19. if(CarInfo[carid][cID] != -2 && carid != 0 && !IsAPlane(vehicle)) {
  20. if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Odometer: %.2f~n~Radio: %s~n~%s~n~Fuel: %s%s", spe, CarInfo[carid][KM], GetVehicleRadio(vehicle), status, benzina, "%");
  21. else format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~n~Odometer: %.2f~n~Radio: %s~n~%s", spe, CarInfo[carid][KM], GetVehicleRadio(vehicle), status);
  22. PlayerTextDrawSetString(i, Speedo, str);
  23. PlayerTextDrawShow(i, Speedo);
  24. }
  25. else {
  26. if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Radio: %s~n~%s~n~Fuel: %s%s", spe, GetVehicleRadio(vehicle), status, benzina, "%");
  27. else format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~n~Radio: %s~n~%s", spe, GetVehicleRadio(vehicle), status);
  28. PlayerTextDrawSetString(i, Speedo, str);
  29. PlayerTextDrawShow(i, Speedo);
  30. }
  31. if(spe >= 150 && InExamen[playerid] == 1) SlapPlayer(i);
  32. }
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement