HadrienCubic

Washing english version

Apr 26th, 2012
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.00 KB | None | 0 0
  1. /* FilterScript by Hadrien (Hadrien_Cubic)
  2.    Dowload on forum.sa-mp.com
  3.    Thak you for dowload
  4.    This FS wash and repair your car in station of Idlewood
  5.    This FS as traduct by HadrienCubic for French to English, sorry for my bad english */
  6.  
  7. // ------- Beginning of script / Don't touch -------
  8.  
  9. #define FILTERSCRIPT // Don't touch
  10.  
  11. #include <a_samp> // Don't touch
  12.  
  13. //#include <streamer> // Streamer, is false
  14.  
  15. #if defined FILTERSCRIPT // Don't touch
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     print("\n--------------------------------------");
  20.     print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
  21.     print("--------------------------------------\n");
  22.     return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27.     return 1;
  28. }
  29.  
  30. #else
  31.  
  32. main()
  33. {
  34.     print("\n----------------------------------");
  35.     print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
  36.     print("----------------------------------\n");
  37. }
  38.  
  39. #endif
  40. // ------- (define, new and forward) -------
  41. #define COLOR_WHITE 0xFFFFFFAA // Color white
  42. new PickupReparation; // Pickup in the station
  43. new reparation1; // Map fountain
  44. new reparation2; // Map fountain
  45. new reparation3; // Map fountain
  46. new reparation4; // Map fountain
  47. new vehicle; // Car repair
  48. new MemeReparation[MAX_PLAYERS]; // Already washing
  49. forward ReparationTimer(playerid); // Time of repair
  50. //#define STREAMER_TYPE_OBJECT (0) // Streamer is false
  51.  
  52. // ------- Timer of repair -------
  53. public ReparationTimer(playerid)
  54. {
  55.     TogglePlayerControllable(playerid, 1);
  56.     SendClientMessage(playerid, COLOR_WHITE, "[Washing] Your car as been wash and repair, you cost 250$");
  57.     MemeReparation[playerid] = 0;
  58.     DestroyObject(reparation1);
  59.     DestroyObject(reparation2);
  60.     DestroyObject(reparation3);
  61.     DestroyObject(reparation4);
  62.     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  63.     RepairVehicle(vehicle);
  64.     return 1;
  65. }
  66. // ------- Command to repair car -------
  67. public OnPlayerCommandText(playerid, cmdtext[])
  68. {
  69.     if (strcmp ("/washcar", cmdtext, true) == 0)
  70.     {
  71.         if(IsPlayerInAnyVehicle(playerid))
  72.         {
  73.             if(IsPlayerInRangeOfPoint(playerid, 3.0, 1911.1239,-1776.6892,13.3828))
  74.             {
  75.                 if(MemeReparation[playerid] == 1)
  76.             {
  77.                 SendClientMessage(playerid, COLOR_WHITE, "You are already wash your car");
  78.                 return 1;
  79.             }
  80.                 TogglePlayerControllable(playerid, 0);
  81.                 reparation4 = CreateObject(9833,1910.51452637,-1776.63745117,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (1)
  82.                 reparation3 = CreateObject(9833,1910.85546875,-1778.37011719,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (2)
  83.                 reparation2 = CreateObject(9833,1911.24353027,-1774.40124512,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (3)
  84.                 reparation1 = CreateObject(9833,1912.09606934,-1775.81860352,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (4)
  85.                 SetTimerEx("ReparationTimer", 10000, false, "i", playerid);
  86.                 GivePlayerMoney(playerid, -250);
  87.                 SendClientMessage(playerid, COLOR_WHITE, "[Washing] The wash system is on, your car as washing...");
  88.                 MemeReparation[playerid] = 1;
  89.                 RepairVehicle(GetPlayerVehicleID(playerid), 1000.0);
  90.                 SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
  91.                 return 1;
  92.             }
  93.             else // sinon
  94.             {
  95.                 SendClientMessage(playerid, COLOR_WHITE, "You are not on the wash station!");
  96.             }
  97.         }
  98.         else // sinon
  99.         {
  100.             SendClientMessage(playerid, COLOR_WHITE, "You are not on a car!");
  101.             return 1;
  102.         }
  103.     }
  104. return 0;
  105. }
  106. // ------- Texte -------
  107. public OnPlayerPickUpPickup(playerid, pickupid)
  108. {
  109.     if(pickupid == PickupReparation)
  110.     {
  111.         GameTextForPlayer(playerid, "~w~ Welcome to the station of Idlewood ~n~Use /washcar for wash and repair your car~n~ ~r~ Cost: 250$", 5000, 5);
  112.         return 1;
  113.         }
  114.             return 1;
  115. }
  116. // ------- Pickup -------
  117. public OnGameModeInit()
  118. {
  119. PickupReparation = CreatePickup(1239, 23, 1911.1239,-1776.6892,13.3828); // Pickup
  120.     return 1;
  121. }
Advertisement
Add Comment
Please, Sign In to add comment