Suleee

Untitled

Jan 1st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. /* FilterScript by Hadrien (Hadrien_Cubic)
  2. Preveo i prilagodio za Balkan SAMP Payne97
  3. Pomocu ove FS mozete oprati i popraviti svoj auto u autopraoni
  4. */
  5.  
  6. // ------- Beginning of script / Don't touch -------
  7.  
  8. #define FILTERSCRIPT // Don't touch
  9.  
  10. #include <a_samp> // Don't touch
  11.  
  12. #include <streamer>
  13.  
  14. #if defined FILTERSCRIPT // ne diraj
  15. public OnFilterScriptInit()
  16. {
  17. print("\n--------------------------------------");
  18. print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25. return 1;
  26. }
  27.  
  28. #else
  29.  
  30. main()
  31. {
  32. print("\n----------------------------------");
  33. print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
  34. print("----------------------------------\n");
  35. }
  36.  
  37. #endif
  38. // ------- (define, new and forward) -------
  39. #define COLOR_WHITE 0xFFFFFFAA // Color white
  40.  
  41. new PickupReparation; // Pickup in the station
  42. new reparation1; // Map fountain
  43. new reparation2; // Map fountain
  44. new reparation3; // Map fountain
  45. new reparation4; // Map fountain
  46. new vehicle; // Car repair
  47.  
  48. new MemeReparation[MAX_PLAYERS]; // Already washing
  49.  
  50. // ------- Timer of repair -------
  51. forward ReparationTimer(playerid); // Time of repair
  52. public ReparationTimer(playerid)
  53. {
  54. TogglePlayerControllable(playerid, 1);
  55. SendClientMessage(playerid, COLOR_WHITE, "[Washing]Auto vam je oprano za 250$");
  56. MemeReparation[playerid] = 0;
  57. DestroyObject(reparation1);
  58. DestroyObject(reparation2);
  59. DestroyObject(reparation3);
  60. DestroyObject(reparation4);
  61. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  62. RepairVehicle(vehicle);
  63. return 1;
  64. }
  65. // ------- Command to repair car -------
  66. public OnPlayerCommandText(playerid, cmdtext[])
  67. {
  68. if (strcmp ("/washcar", cmdtext, true) == 0)
  69. {
  70. if(IsPlayerInAnyVehicle(playerid))
  71. {
  72. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1911.1239,-1776.6892,13.3828))
  73. {
  74. if(MemeReparation[playerid] == 1)
  75. {
  76. SendClientMessage(playerid, COLOR_WHITE, "Vec ste oprali svoj auto!");
  77. return 1;
  78. }
  79. new Float:X, Float:Y, Float: Z;
  80. new vid = GetPlayerVehicleID(playerid);
  81. GetVehiclePos(vid, X, Y, Z);
  82. TogglePlayerControllable(playerid, 0);
  83. reparation4 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (1)
  84. reparation3 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (2)
  85. reparation2 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (3)
  86. reparation1 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (4)
  87.  
  88. SetTimerEx("ReparationTimer", 10000, false, "i", playerid);
  89. GivePlayerMoney(playerid, -250);
  90. SendClientMessage(playerid, COLOR_WHITE, "[Washing] Auto se pere!");
  91. MemeReparation[playerid] = 1;
  92. RepairVehicle(GetPlayerVehicleID(playerid), 1000.0);
  93. SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
  94. return 1;
  95. }
  96. else // sinon
  97. {
  98. SendClientMessage(playerid, COLOR_WHITE, "Nisi u autopraoni!");
  99. }
  100. }
  101. else // sinon
  102. {
  103. SendClientMessage(playerid, COLOR_WHITE, "Nisi u autu!");
  104. return 1;
  105. }
  106. }
  107. return 0;
  108. }
  109. // ------- Texte -------
  110. public OnPlayerPickUpPickup(playerid, pickupid)
  111. {
  112. if(pickupid == PickupReparation)
  113. {
  114. GameTextForPlayer(playerid, "~w~ Dobrodosao u autopraonu ~n~Koristi /washcar da operes auto!~n~ ~r~ Cost: 250$", 5000, 5);
  115. return 1;
  116. }
  117. return 1;
  118. }
  119. // ------- Pickup -------
  120. public OnGameModeInit()
  121. {
  122. PickupReparation = CreatePickup(1239, 23, 1911.1239,-1776.6892,13.3828); // Pickup
  123. return 1;
  124. }
Advertisement
Add Comment
Please, Sign In to add comment