Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- *
- * (c) Copyright 2009 - 2015, Ciandlah
- * Do not re-release without authors permission
- *
- *
- */
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("*** Weather System 0.0.1 ***"); /* This printf is allowing the console to see if the FS has loaded */
- print("*** Attempting to Load ***");
- SetTimer("WT", 60000, true); /* This timer allows the plugin to repeatly crossover every hour to change in-game weather */
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(WT);
- return 1;
- }
- #else
- forward WT();
- public WT()
- {
- new rand = random(10); /* This random value allows the possibilty of 15 weather changing IDS from 1 - 15 */
- new string[256]; /* This string is the text in the message that displays to all the players */
- switch(rand) /* This random swtich generates the next weather that the server will have */
- {
- case 0:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - MODERATE WIND - CHANCE OF SHOWERS");
- case 1:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - LIGHT WIND - FOGGY START TO THE MORNING");
- case 2:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - NO WIND - NO OTHER ALERTS");
- case 3:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - EXTREME WINDS - FINE SPELLS");
- case 4:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - HEAVY WINDS - NO OTHER ALERTS");
- case 5:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - NO WIND - CHANCE OF LATE NIGHT FOG");
- case 7:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - LIGHT WIND - NO OTHER ALERTS");
- case 8:format(string, sizeof(string), "[Weather Report] - WETNESS - FULL GAZES - NO OTHER ALERTS");
- case 9:format(string, sizeof(string), "[Weather Report] - HEAVY FOG - STRONG WINDS - FINE SPELLS DEVELOPING IN THE EVENING");
- }
- SendClientMessageToAll(-1, string); /* This client message display to all the players around the server that the weather has been changed */
- SetWeather(rand); /* This command allows the weather in-game to switch to a new randomized ID */
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement