Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- | - - - - - - - - - - - - - - - |
- | Halloween Event Filterscript |
- | Credits: Edison |
- | @ 2015 FilterScript |
- | - - - - - - - - - - - - - - - |
- * RO: Un subscribe aici (https://www.youtube.com/channel/UCL1mkOOQe15fvwzfaMzfdcw) m-ar ajuta foarte mult. Multumesc!
- * EN: An subscribe here (https://www.youtube.com/channel/UCL1mkOOQe15fvwzfaMzfdcw) it would help a lot. Thank you!
- */
- #define FILTERSCRIPT
- #include <a_samp>
- #define COLOR_DARKMAUVE 0x623778FF
- #define COLOR_MAUVE 0x845F96FF
- new
- Timer,
- Pumpkin,
- Winner,
- Number,
- Minutes;
- new Float: RandomPositions[][3] = {
- {1767.807861, -1932.837402, 13.595355},
- {2132.916259, -1740.313598, 17.289062},
- {1803.886352, -1590.603881, 14.095897},
- {1485.622680, -1665.684692, 14.610832},
- {1018.429138, -1922.505737, 12.592831},
- {582.102233, -1490.797119, 15.376304},
- {154.038253, -1960.985351, 3.830727},
- {1394.659790, -1897.151977, 13.557967},
- {2360.556640, 547.272399, 2.666161},
- {2561.215332, 1175.414062, 18.718933},
- {1496.425415, 1011.755920, 10.904741},
- {2263.547119, 1398.863281, 42.841758},
- {2035.151489, 1874.851074, 12.095868},
- {2013.250122, 2206.021972, 11.507675},
- {1717.909667, 1623.251953, 10.052927},
- {1374.580932, 2188.983642, 11.056703},
- {-1538.844360, -440.330566, 6.032049},
- {-1971.358764, 213.149246, 27.124874},
- {-2473.870605, 399.725463, 27.800573},
- {-2756.504882, 245.252899, 7.227559},
- {-2541.580810, -311.954620, 27.070434},
- {-2707.994873, 377.999938, 11.979453},
- {-2762.185302, 613.078186, 26.277561},
- {-1318.863891, 494.018798, 18.260137}
- };
- static const LocationsName[][256] = {
- {"El Corona (LS)"},
- {"Idlewood (LS)"},
- {"Little Mexico (LS)"},
- {"Pershing Square (LS)"},
- {"Verona Beach (LS)"},
- {"Rodeo (LS)"},
- {"Santa Maria Beach (LS)"},
- {"Verdant Bluffs (LS)"},
- {"Red County (LV)"},
- {"Come-A-Lot (LV)"},
- {"LVA Freight Depot (LV)"},
- {"Royal Casino (LV)"},
- {"The Visage (LV)"},
- {"The Emerald Isle (LV)"},
- {"Las Venturas Airport (LV)"},
- {"Redsands West (LV)"},
- {"Easter Bay Airport (SF)"},
- {"Cranberry Station (SF)"},
- {"Queens (SF)"},
- {"Ocean Flats (SF)"},
- {"Avispa Country Club (SF)"},
- {"City Hall (SF)"},
- {"Palisades (SF)"},
- {"Easter Basin (SF)"}
- };
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- Timer = SetTimer("HalloweenEvent", 600000, true);
- print("\nHalloween Event Filterscript loaded. (100%)");
- print("Credits: Edison #NZTeam\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(Timer);
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/gotopumpkin", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return 1;
- if(Winner == 1) return SendClientMessage(playerid, -1, "There is no pumpkin spawn.");
- if(GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid), RandomPositions[Number][0], RandomPositions[Number][1]+5, RandomPositions[Number][2]);
- else SetPlayerPos(playerid, RandomPositions[Number][0], RandomPositions[Number][1]+5, RandomPositions[Number][2]);
- SendClientMessage(playerid, -1, "You've been teleported near the pumpkin.");
- return 1;
- }
- if(strcmp("/test", cmdtext, true, 10) == 0)
- {
- HalloweenEvent();
- KillTimer(Timer);
- Timer = SetTimer("HalloweenEvent", 600000, true);
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == Pumpkin)
- {
- DestroyPickup(Pumpkin);
- new
- string[256],
- randmoney = 50000 + random(10000),
- name[MAX_PLAYER_NAME],
- Hour, Minute, Second;
- Winner = 1;
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "> Pumpkin was found by %s. His wish him congratulations!", name);
- SendClientMessageToAll(COLOR_MAUVE, string);
- gettime(Hour, Minute, Second);
- format(string, sizeof(string), "> A new pumpkin will be hidden in %d minutes.", Minutes-Minute+10);
- SendClientMessageToAll(COLOR_MAUVE, string);
- format(string, sizeof(string), "You won the sum of $%d", randmoney);
- SendClientMessage(playerid, 0x2C8522FF, string);
- GivePlayerMoney(playerid, randmoney);
- }
- return 1;
- }
- forward HalloweenEvent();
- public HalloweenEvent()
- {
- new
- string[256],
- rand = random(sizeof(RandomPositions));
- if(Winner == 0) {
- DestroyPickup(Pumpkin);
- SendClientMessageToAll(-1, "Nobody has found the pumpkin.");
- }
- Winner = 0;
- Number = rand;
- Pumpkin = CreatePickup(19320, 21, RandomPositions[rand][0], RandomPositions[rand][1], RandomPositions[rand][2]);
- SendClientMessageToAll(COLOR_DARKMAUVE, "[Halloween Event]:");
- format(string, sizeof(string), "> A new pumpkin was hidding in the area: %s.", LocationsName[rand]);
- SendClientMessageToAll(COLOR_MAUVE, string);
- SendClientMessageToAll(COLOR_MAUVE, "> You have 10 minutes to find this pumpkin.");
- new Hour, Minute, Second;
- gettime(Hour, Minute, Second);
- Minutes = Minute;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement