Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. if(PlayerInfo[x][pRunOutTime] < gettime()) {
  2. new engine, lights, alarm, doors, bonnet, boot, objective;
  3. PlayerInfo[x][pRunOutTime] = gettime() + RunOutTime;
  4.  
  5. if(GetPlayerState(x) == PLAYER_STATE_DRIVER) {
  6. new vehicle = GetPlayerVehicleID(x);
  7. if(Gas[vehicle] >= 1) {
  8. if(vehEngine[vehicle] == 1) {
  9. if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike2(vehicle) || ExamCar[x] == vehicle || JobVehicle[x] == vehicle) { Gas[vehicle]++; }
  10. if(!IsPlayerPaused(x)) Gas[vehicle]--;
  11. new carid = FindSpawnID(vehicle);
  12. if(CarInfo[carid][cID] != -2 && carid != 0) {
  13. new spe = Carspeed(x);
  14. if(spe > 5 && GetPlayerState(x) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(x) == vehicle && !IsPlayerPaused(x)) {
  15. CarInfo[carid][KM] += (spe*0.27)/100; gString[0] = (EOS);
  16. mysql_format(SQL, gString, sizeof(gString), "UPDATE `cars` SET `KM`='%f' WHERE `ID`='%d'", CarInfo[carid][KM], carid);
  17. mysql_tquery(SQL, gString, "", "");
  18. }
  19. }
  20. }
  21. }
  22. else if(!IsAFLYCar(vehicle)) {
  23. NoFuel[x] = 1;
  24. TogglePlayerControllable(x, 0);
  25. GameTextForPlayer(x,"Fara benzina",1500,3);
  26. vehEngine[vehicle] = 0;
  27. GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
  28. SetVehicleParamsEx(vehicle,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
  29. SetPVarInt(x, "Engine", 0);
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement