MistarA

Untitled

Jul 14th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. //////////////////////////////////////////////////////////////////////
  2. CMD:rentcar(playerid, params[])
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(PlayerToPoint(50.0,playerid, 1228.2424,258.0373,19.5469))
  7. {
  8. if(RentCar[playerid] == 999)
  9. {
  10. ShowModelSelectionMenu(playerid, rentcarlist, "Masini de inchiriat");
  11. }
  12. else
  13. {
  14. SendClientMessage(playerid, COLOR_GREY, "Ai deja o masina inchiriata.");
  15. }
  16. }
  17. else
  18. {
  19. SendClientMessage(playerid, COLOR_GREY,"Trebuie sa fii in interiorul centrului de inchirieri masini");
  20. }
  21. }
  22. return 1;
  23. }
  24. ////////////////////////////////////////////////
  25. if (listid == rentcarlist)
  26. {
  27. if (response)
  28. {
  29. if(GetPlayerMoney(playerid) < 300)
  30. {
  31. SendClientMessage(playerid, COLOR_GREY,"Nu ai destui bani.");
  32. return 1;
  33. }
  34. new SpawnRand = random(8);
  35. switch(SpawnRand)
  36. {
  37. case 0:
  38. {
  39. RentCar[playerid] = CreateVehicle(modelid, 1625.9397,-2314.1711,-3.0411,89.9986, 1, 1, 60000);
  40. }
  41. case 1:
  42. {
  43. RentCar[playerid] = CreateVehicle(modelid, 1633.8818,-2314.3743,-2.8121,87.8964, 1, 1, 60000);
  44. }
  45. case 2:
  46. {
  47. RentCar[playerid] = CreateVehicle(modelid, 1646.4036,-2314.3977,-3.0371,90.6984, 1, 1, 60000);
  48. }
  49. case 3:
  50. {
  51. RentCar[playerid] = CreateVehicle(modelid, 1653.4948,-2314.5027,-2.9948,91.2575, 1, 1, 60000);
  52. }
  53. case 4:
  54. {
  55. RentCar[playerid] = CreateVehicle(modelid, 1660.7026,-2314.4077,-2.9946,89.4783, 1, 1, 60000);
  56. }
  57. case 5:
  58. {
  59. RentCar[playerid] = CreateVehicle(modelid, 1672.0178,-2314.0195,-2.8901,87.4153, 1, 1, 60000);
  60. }
  61. case 6:
  62. {
  63. RentCar[playerid] = CreateVehicle(modelid, 1679.8429,-2313.9661,-2.9383,90.3261, 1, 1, 60000);
  64. }
  65. case 7:
  66. {
  67. RentCar[playerid] = CreateVehicle(modelid, 1619.5037,-2313.9634,-3.0427,88.7872, 1, 1, 60000);
  68. }
  69. }
  70. SendClientMessage(playerid, COLOR_WHITE,"FELICITARI: Ai inchiriat o masina, masina ta se afla in parcare acum.");
  71. GivePlayerCash(playerid,-Businesses[28][EntranceCost]);
  72. new string[128];
  73. format(string, sizeof(string), "*%s baga un ticket in aparatul de inchiriat masini*", GetPlayerNameEx(playerid));
  74. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  75. VehicleInfo[RentCar[playerid]][vRent] = 1;
  76. SetVehicleNumberPlate(RentCar[playerid],"{000000}SUGEOHIDDEN");
  77. SetVehicleToRespawn(RentCar[playerid]);
  78. Fuel[RentCar[playerid]] = 100;
  79. }
  80. }
  81. //////////////////////////////////////////////////////////////////////////
  82. stock ResetPlayer(playerid)
  83. {
  84. }
  85. RentCar[playerid] = 999;
  86.  
  87. new rentcarlist = mS_INVALID_LISTID;
  88.  
  89. ///////////////////////////////////////////////////////////////////////////////
  90. rentcarlist.txt
  91. 401
  92. 404
  93. 405
  94. 410
  95. 466
  96. 467
  97. 516
  98. 462
  99. 422
Advertisement
Add Comment
Please, Sign In to add comment