Advertisement
Guest User

Untitled

a guest
May 30th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. forward SpeedUp();
  2. public SpeedUp() {
  3. if(togstage == 0) {
  4. new
  5. vehicleid,
  6. keys,
  7. Float:vx,
  8. Float:vy,
  9. Float:vz
  10. ;
  11.  
  12. foreach(new i : Player) {
  13. if (!IsPlayerConnected(i))
  14. continue;
  15.  
  16. if ((vehicleid = GetPlayerVehicleID(i))) {
  17. new db = PersonalCar(i);
  18. if(db == -1) continue;
  19. if(db > 0) {
  20. if(CarInfo[db][cStage] == 0) continue;
  21. }
  22. GetPlayerKeys(i, keys, _:vx, _:vx);
  23.  
  24. if (keys == KEY_VEHICLE_FORWARD) {
  25. GetVehicleVelocity(vehicleid, vx, vy, vz);
  26.  
  27. if (vx * vx + vy * vy < g_SpeedThreshold)
  28. continue;
  29. if(Carspeed(i) < 150) continue;
  30. if (Carspeed(i) > (CarInfo[db][cSpeed]-2) )
  31. continue;
  32.  
  33. vx *= SPEED_MULTIPLIER;
  34. vy *= SPEED_MULTIPLIER;
  35.  
  36. if (vz > 0.03 || vz < -0.03)
  37. vz -= 0.010;
  38.  
  39. SetVehicleVelocity(vehicleid, vx, vy, vz);
  40. }
  41. }
  42. }
  43. }
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement