Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* FilterScript by Hadrien (Hadrien_Cubic)
- Preveo i prilagodio za Balkan SAMP Payne97
- Pomocu ove FS mozete oprati i popraviti svoj auto u autopraoni
- */
- // ------- Beginning of script / Don't touch -------
- #define FILTERSCRIPT // Don't touch
- #include <a_samp> // Don't touch
- #include <streamer>
- #if defined FILTERSCRIPT // ne diraj
- 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
- // ------- Timer of repair -------
- forward ReparationTimer(playerid); // Time of repair
- public ReparationTimer(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_WHITE, "[Washing]Auto vam je oprano za 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, "Vec ste oprali svoj auto!");
- return 1;
- }
- new Float:X, Float:Y, Float: Z;
- new vid = GetPlayerVehicleID(playerid);
- GetVehiclePos(vid, X, Y, Z);
- TogglePlayerControllable(playerid, 0);
- reparation4 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (1)
- reparation3 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (2)
- reparation2 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (3)
- reparation1 = CreateObject(9833, X, Y, Z-2, 0.00000000, 0.00000000, 0.00000000); //object(fountain_sfw) (4)
- SetTimerEx("ReparationTimer", 10000, false, "i", playerid);
- GivePlayerMoney(playerid, -250);
- SendClientMessage(playerid, COLOR_WHITE, "[Washing] Auto se pere!");
- MemeReparation[playerid] = 1;
- RepairVehicle(GetPlayerVehicleID(playerid), 1000.0);
- SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
- return 1;
- }
- else // sinon
- {
- SendClientMessage(playerid, COLOR_WHITE, "Nisi u autopraoni!");
- }
- }
- else // sinon
- {
- SendClientMessage(playerid, COLOR_WHITE, "Nisi u autu!");
- return 1;
- }
- }
- return 0;
- }
- // ------- Texte -------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == PickupReparation)
- {
- GameTextForPlayer(playerid, "~w~ Dobrodosao u autopraonu ~n~Koristi /washcar da operes auto!~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