Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* FilterScript by Hadrien (Hadrien_Cubic)
- Dowload on forum.sa-mp.com
- Thak you for dowload
- This FS wash and repair your car in station of Idlewood
- This FS as traduct by HadrienCubic for French to English, sorry for my bad english */
- // ------- Beginning of script / Don't touch -------
- #define FILTERSCRIPT // Don't touch
- #include <a_samp> // Don't touch
- //#include <streamer> // Streamer, is false
- #if defined FILTERSCRIPT // Don't touch
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print("FilterScript Washing by Hadrien (Hadrien_Cubic)");
- print("----------------------------------\n");
- }
- #endif
- // ------- (define, new and forward) -------
- #define COLOR_WHITE 0xFFFFFFAA // Color white
- new PickupReparation; // Pickup in the station
- new reparation1; // Map fountain
- new reparation2; // Map fountain
- new reparation3; // Map fountain
- new reparation4; // Map fountain
- new vehicle; // Car repair
- new MemeReparation[MAX_PLAYERS]; // Already washing
- forward ReparationTimer(playerid); // Time of repair
- //#define STREAMER_TYPE_OBJECT (0) // Streamer is false
- // ------- Timer of repair -------
- public ReparationTimer(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_WHITE, "[Washing] Your car as been wash and repair, you cost 250$");
- MemeReparation[playerid] = 0;
- DestroyObject(reparation1);
- DestroyObject(reparation2);
- DestroyObject(reparation3);
- DestroyObject(reparation4);
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- RepairVehicle(vehicle);
- return 1;
- }
- // ------- Command to repair car -------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp ("/washcar", cmdtext, true) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1911.1239,-1776.6892,13.3828))
- {
- if(MemeReparation[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are already wash your car");
- return 1;
- }
- TogglePlayerControllable(playerid, 0);
- reparation4 = CreateObject(9833,1910.51452637,-1776.63745117,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (1)
- reparation3 = CreateObject(9833,1910.85546875,-1778.37011719,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (2)
- reparation2 = CreateObject(9833,1911.24353027,-1774.40124512,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (3)
- reparation1 = CreateObject(9833,1912.09606934,-1775.81860352,9.05098343,0.00000000,0.00000000,0.00000000); //object(fountain_sfw) (4)
- SetTimerEx("ReparationTimer", 10000, false, "i", playerid);
- GivePlayerMoney(playerid, -250);
- SendClientMessage(playerid, COLOR_WHITE, "[Washing] The wash system is on, your car as washing...");
- MemeReparation[playerid] = 1;
- RepairVehicle(GetPlayerVehicleID(playerid), 1000.0);
- SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
- return 1;
- }
- else // sinon
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not on the wash station!");
- }
- }
- else // sinon
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not on a car!");
- return 1;
- }
- }
- return 0;
- }
- // ------- Texte -------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == PickupReparation)
- {
- GameTextForPlayer(playerid, "~w~ Welcome to the station of Idlewood ~n~Use /washcar for wash and repair your car~n~ ~r~ Cost: 250$", 5000, 5);
- return 1;
- }
- return 1;
- }
- // ------- Pickup -------
- public OnGameModeInit()
- {
- PickupReparation = CreatePickup(1239, 23, 1911.1239,-1776.6892,13.3828); // Pickup
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment