Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Lonelymoo's Solar Flare Script v1.0
- Plan & Make by Lonelymoo
- (c), 2012, January 7
- */
- #include <a_samp>
- #include <zcmd>
- forward SolarHit(playerid);
- new SolarFlare[MAX_PLAYERS];
- new SolarTimer;
- #define COLOR_RED 0xFF0000FF
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("****************************************");
- print(" Lonelymoo's Solar Flare v1.0 ");
- print(" Made & Plan by Lonelymoo ");
- print("****************************************");
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(SolarTimer);
- return 1;
- }
- #else
- #endif
- public SolarHit(playerid)
- {
- SendClientMessageToAll(COLOR_RED, "Solar Flare has hit the earth! we died!");
- SolarFlare[playerid] = 0;
- KillTimer(SolarTimer);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (i != playerid))
- {
- SendClientMessage(playerid,COLOR_RED,"You have been hitted by Solar Flare!");
- SetPlayerHealth(i,0.0);
- }
- }
- return 1;
- }
- CMD:solarflare(playerid, params[])
- {
- new string[500],rconname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, rconname, MAX_PLAYER_NAME);
- if(IsPlayerAdmin(playerid))
- {
- if(SolarFlare[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Solar Flare is already starting and it will take 2 days (ingame) to hit us");
- SolarFlare[playerid] = 1;
- SolarTimer = SetTimer("SolarHit",2880000, false);
- format(string,sizeof(string),"RCON %s has announce that Solar Flare will gonna hit us after 2 days (ingame day)",rconname);
- SendClientMessageToAll(COLOR_RED, string);
- print("Solar Flare will reach the earth in 2 days get ready!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "* Only Server Owner can announce when gonna hit solar flare");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement