Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- NAME: Infection
- DATE: 03/02/2014
- AUTHOR: Blunt
- DESCRIPTION: Infect a player by hitting them once, once you've hit them they also turn infected.
- Once all players have been infected it'll restart.
- */
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- #include <sscanf2>
- #include <foreach>
- main(){}
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE 0xC8C8C8C8
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_YELLOW 0xDABB3E00
- #define COLOR_BLACK 0x000000AA
- #define COLOR_BLUE 0x1E90FFAA
- #define COLOR_PINK 0xFF1493AA
- #define COLOR_GREEN 0x006400AA
- #define COLOR_ORANGE 0xFF4500AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_SILVER 0xFF7BDDA5
- #define COL_GREY "{AFAFAF}"
- #define COL_SILVER "{7BDDA5}"
- #define TEAM_UNINFECTED 0
- #define TEAM_INFECTED 1
- #define DIALOG_SKINCHANGE 1
- #define DIALOG_SKINCHANGE1 2
- #define DIALOG_SKINCHANGE2 3
- #define DIALOG_SKINCHANGE3 4
- #define DIALOG_SKINCHANGE4 5
- #define DIALOG_SKINCHANGE5 6
- #define DIALOG_SKINCHANGE6 7
- #define DIALOG_SKINCHANGE7 8
- #define DIALOG_SKINCHANGE8 9
- #define DIALOG_SKINCHANGE9 10
- #define DIALOG_SKINCHANGE10 11
- #define ROUND_TIME_LIMIT 20 // DEFAULT IS 20 MINUTES - CHANGE THIS TO YOUR DESIRED TIME LIMIT
- #define access_check if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GREY,"No access.");
- #define round_end SetTimer("RoundEndTimer",10000,0), SendClientMessage(playerid,COLOR_WHITE,#Round is restarting in 10 seconds.);
- #define restart_round SendClientMessageToAll(COLOR_WHITE,#Round restarting),GameModeExit();
- #define check_round_in_progress if(Spawning == false) { spectating[playerid] = true,TogglePlayerSpectating(playerid,getrandomplayer(playerid)),PlayerSpectatePlayer(playerid, 0),SendClientMessage(playerid,COLOR_GREY,#Round is already in progress. Use /nextplayer to change the player your looking at.); return 1;}
- #define random_spawninfo new Random = random(sizeof(spawns)); SetSpawnInfo(playerid,TEAM_UNINFECTED,20,spawns[Random][0],spawns[Random][1],spawns[Random][2], spawns[Random][3],0,0,0,0,0,0);
- #define is_connected if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GREY,"Player not connected");
- new bool:Spawning,bool:infected[MAX_PLAYERS],bool:Alive[MAX_PLAYERS],bool:spectating[MAX_PLAYERS];
- new RandomMSG[][] =
- {
- "Hacking is not tolerated here! Anyone with s0beit or any hacking software will be detected and automatically banned!",
- "The infected have more health than the un-infected! Shoot them in the head to kill them faster!",
- "Did you know there are 3 different types of players here? Type /playertypes for more information",
- "If you see a player hacking or breaking a rule, use the /report function and report their behaviour!",
- "Weapon unlocks are available! The more kills you get the more weapons your able to gain, get killing!"
- };
- new Float:spawns[][] =
- {
- {-1131.6823,1094.9792,1345.7899,267.9492},
- {-1133.4675,1021.3997,1345.7313,274.5059},
- {-1110.4272,1098.9160,1341.8438,182.6493},
- {-1108.2216,1021.4601,1343.8809,358.9619},
- {-1083.8477,1043.5542,1343.3939,243.7265},
- {-1083.8477,1043.5542,1343.3939,243.7265},
- {-1066.0980,1070.8135,1341.7379,43.9864},
- {-1070.0604,1091.5350,1343.2098,91.5176},
- {-1061.9183,1067.0292,1343.5461,292.3194},
- {-1050.9037,1052.6886,1341.3516,24.4402},
- {-1032.3600,1024.0449,1342.7958,341.1998},
- {-1019.3343,1048.4727,1342.8477,221.1195},
- {-1027.7264,1064.6705,1343.8444,82.0941},
- {-1010.2310,1076.9373,1341.3264,173.3965},
- {-974.6269,1089.6309,1344.9760,94.2674},
- {-973.0340,1096.1401,1344.9869,91.1106},
- {-974.2792,1023.8605,1345.0443,87.3740}
- };
- stock GetName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, Name, sizeof(Name));
- }
- return Name;
- }
- stock ClearChat(playerid, lines)
- {
- for(new i=0; i<lines; i++)
- {
- SendClientMessage(playerid,COLOR_GREY, " ");
- }
- return true;
- }
- stock SendAdminMessage(color,string[])
- {
- foreach (Player,i)
- {
- if(IsPlayerAdmin(i))
- {
- SendClientMessage(i,color,string);
- }
- }
- }
- stock CallSkinChange(playerid)
- {
- SetPlayerInterior(playerid,14);
- SetPlayerCameraPos(playerid,254.8034,-41.6176,1002.0234);
- SetPlayerCameraLookAt(playerid,259.3129,-41.7034,1002.0234);
- SetPlayerPos(playerid,259.3129,-41.7034,1002.0234);
- SetPlayerFacingAngle(playerid,91.1132);
- SetPlayerSkin(playerid,102);
- ShowPlayerDialog(playerid,DIALOG_SKINCHANGE,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Balla","Confirm","Next");
- return 1;
- }
- stock getrandomplayer(playerid)
- {
- new randomplayer[MAX_PLAYERS+1];
- for (new i = 0; i != MAX_PLAYERS; i ++)
- {
- if (IsPlayerConnected(i))
- {
- if (i == playerid) continue;
- randomplayer[0] ++;
- randomplayer[randomplayer[0]] = i;
- }
- }
- if (randomplayer[0] == 0) return -1;
- return randomplayer[random(randomplayer[0])+1];
- }
- stock SetWeaponSkillLevel(playerid)
- {
- SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
- SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
- SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
- }
- stock GiveWeaponOnScore(playerid)
- {
- if(GetPlayerTeam(playerid) == TEAM_UNINFECTED)
- {
- if(GetPlayerScore(playerid) == 5) {GivePlayerWeapon(playerid,24,100);}
- if(GetPlayerScore(playerid) == 10) {GivePlayerWeapon(playerid,29,150);}
- if(GetPlayerScore(playerid) == 15) {GivePlayerWeapon(playerid,30,100);}
- if(GetPlayerScore(playerid) == 30) {GivePlayerWeapon(playerid,34,50);}
- if(GetPlayerScore(playerid) == 40) {GivePlayerWeapon(playerid,25,50);}
- if(GetPlayerScore(playerid) == 50) {GivePlayerWeapon(playerid,31,200);}
- SendClientMessage(playerid,COLOR_WHITE,"NEW WEAPON UNLOCKED");
- }
- return 1;
- }
- forward public RoundEndTimer(playerid); public RoundEndTimer(playerid){PlayAudioStreamForPlayer(playerid,"http://halo.bungie.org/misc/h3dialogue/multiplayer/game_over.mp3"),restart_round}
- forward public SpawnTimer(); public SpawnTimer(){Spawning = false,SendClientMessageToAll(COLOR_WHITE,"All players locked, spawning disabled.");}
- forward public RoundTimer(playerid); public RoundTimer(playerid){round_end}
- forward SendMSG();
- forward public SkinChangeTimer(playerid);
- public SendMSG()
- {
- new randMSG = random(sizeof(RandomMSG));
- SendClientMessageToAll(COLOR_LIGHTRED, RandomMSG[randMSG]);
- }
- public SkinChangeTimer(playerid)
- {
- new Random = random(sizeof(spawns));
- SetPlayerTeam(playerid,TEAM_UNINFECTED);
- SendClientMessage(playerid,COLOR_WHITE, #Survive from the deadly infection.);
- SetPlayerPos(playerid, spawns[Random][0],spawns[Random][1],spawns[Random][2]);
- SetPlayerFacingAngle(playerid,spawns[Random][3]);
- SetPlayerInterior(playerid,10);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid,22,200);
- GivePlayerWeapon(playerid,4,1);
- if(IsPlayerAdmin(playerid))
- {
- SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.237990, 0.017257, 0.061072, 7.122863, 359.407897, 358.406188, 1.000000, 1.000000, 1.000000);
- }
- }
- public OnGameModeInit()
- {
- // 1 SEC = 1000 | 10 SEC = 10000 | 60 SEC = 60000
- print("Infection loaded");
- SetTimer("SpawnTimer",60000*5,0); // 5 mins
- SetTimer("SendMSG", 60000*4, true); // 4 mins
- Spawning = true;
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new connectmsg[50];
- format(connectmsg,sizeof(connectmsg),#%s has just connected to the server.,GetName(playerid));
- SendClientMessageToAll(COLOR_SILVER,connectmsg);
- Alive[playerid] = true;
- SetWeaponSkillLevel(playerid);
- random_spawninfo
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new disconnectmsg[50];
- format(disconnectmsg,sizeof(disconnectmsg),#%s has just disconnected from the server.,GetName(playerid));
- SendClientMessageToAll(COLOR_SILVER,disconnectmsg);
- return 1;
- }
- public OnPlayerRequestClass(playerid)
- {
- SpawnPlayer(playerid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- check_round_in_progress
- new nooneinfectedfound = 0;
- foreach (Player,i)
- {
- if(GetPlayerTeam(i) == TEAM_INFECTED)
- {
- nooneinfectedfound++;
- }
- }
- if(nooneinfectedfound == 0)
- {
- SetPlayerTeam(getrandomplayer(playerid),TEAM_INFECTED),infected[playerid] = true;
- PlayAudioStreamForPlayer(playerid,"http://halo.bungie.org/misc/h3dialogue/multiplayer/infected.mp3");
- }
- SetPlayerInterior(playerid,10);
- if(infected[playerid] == false)
- {
- SetPlayerInterior(playerid,10);
- CallSkinChange(playerid);
- }
- if(infected[playerid] == true)
- {
- SetPlayerInterior(playerid,10);
- new Random = random(sizeof(spawns));
- SetPlayerSkin(playerid, 162);
- SetPlayerTeam(playerid,TEAM_INFECTED);
- SendClientMessage(playerid,COLOR_WHITE, #Spread the infection!);
- SetPlayerPos(playerid, spawns[Random][0],spawns[Random][1],spawns[Random][2]);
- SetPlayerFacingAngle(playerid,spawns[Random][3]);
- SetPlayerHealth(playerid,120);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Alive[playerid] = false;
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- GiveWeaponOnScore(killerid);
- new alives = 0, string[100];
- for (new i = 0 , j = GetMaxPlayers(); i < j ; ++ i)
- {
- if(!IsPlayerConnected(i)) continue;
- if(Alive[i] == false) continue;
- alives ++;
- }
- if (alives == 1)
- {
- format(string,sizeof(string),"Last man standing %s!",GetName(playerid));
- SendClientMessageToAll(COLOR_WHITE,string);
- }
- new found = 0;
- foreach (Player,i)
- {
- if(GetPlayerTeam(i) == TEAM_UNINFECTED)
- {
- found++;
- }
- }
- if(found == 0){restart_round}
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerWeapon(playerid) >= 1 && GetPlayerTeam(playerid) == TEAM_INFECTED) SetPlayerArmedWeapon(playerid, 0);
- if(infected[playerid] == true) return SetPlayerColor(playerid,COLOR_GREEN);
- if(infected[playerid] == false) return SetPlayerColor(playerid,COLOR_WHITE);
- if(spectating[playerid] == true) return SetPlayerColor(playerid,COLOR_GREY);
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
- {
- if(GetPlayerTeam(playerid) == TEAM_INFECTED)
- {
- SetPlayerTeam(damagedid,TEAM_INFECTED),SpawnPlayer(damagedid),SendClientMessage(playerid,COLOR_RED,#Infected. Spread the infection to the living.),infected[playerid] = true;
- PlayAudioStreamForPlayer(damagedid, "http://halo.bungie.org/misc/h3dialogue/multiplayer/infected.mp3");
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
- {
- new Float:health;
- GetPlayerHealth(playerid,health);
- if(bodypart == 9) {SetPlayerHealth(playerid, health-40);} // If takes damage to the head region
- else{SetPlayerHealth(playerid, health-25);} // If anywhere other than the head region
- return 1;
- }
- //====================================================
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch (dialogid)
- {
- case DIALOG_SKINCHANGE: // Balla
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,103),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE1,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Balla","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 102);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE1: // Balla
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,104),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE2,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Balla","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 103);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE2: // Balla
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,105),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE3,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Grove","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 104);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE3: // Grove
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,106),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE4,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Grove","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 105);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE4: // Grove
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,107),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE5,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Grove","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 106);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE5: // Jethro
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,42),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE6,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Jethro","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 107);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE6: //Mechanic
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,50),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE7,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Mechanic","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 42);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE7: //Civillian
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,14),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE8,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Civillian","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 50);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE8: //San tan Sam
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,18),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE9,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Sun Tan Sam","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 14);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE9: //FBI
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,286),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE10,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}F.B.I Agent","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 18);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- case DIALOG_SKINCHANGE10: //RESET
- {
- switch(response)
- {
- case 0: { SetPlayerSkin(playerid,102),ShowPlayerDialog(playerid,DIALOG_SKINCHANGE,DIALOG_STYLE_MSGBOX,"CHARACTER SELECTION","Selecting skin; \n{FFFFFF}Balla","Confirm","Next"); }
- case 1:
- {
- SetPlayerSkin(playerid, 286);
- SetTimer("SkinChangeTimer",5000,0);
- SendClientMessage(playerid,COLOR_WHITE,"Skin selected, please wait");
- }
- }
- }
- }
- return 1;
- }
- COMMAND:nextplayer(playerid)
- {
- new string[50];
- if(spectating[playerid] == false) return SendClientMessage(playerid,COLOR_GREY,"You are spawned and cannot do this.");
- PlayerSpectatePlayer(playerid, getrandomplayer(playerid));
- format(string,sizeof(string),"Spectating player: %s", GetName(getrandomplayer(playerid)));
- SendClientMessage(playerid,COLOR_GREY,string);
- return 1;
- }
- COMMAND:restartround(playerid)
- {
- access_check
- SendClientMessageToAll(COLOR_WHITE,#Round restarting.);
- foreach(Player, i)
- {
- PlayAudioStreamForPlayer(i,"http://halo.bungie.org/misc/h3dialogue/multiplayer/game_over.mp3");
- TogglePlayerControllable(i,false);
- }
- round_end
- return 1;
- }
- COMMAND:givemescore(playerid)
- {
- access_check
- SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
- return 1;
- }
- COMMAND:infect(playerid,params[])
- {
- new id;
- access_check
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /infect [playerid/name]");
- else
- {
- is_connected
- SendClientMessage(id,COLOR_WHITE,"An Admin has forced infection upon you");
- SetPlayerTeam(id,TEAM_INFECTED),SpawnPlayer(id),SendClientMessage(id,COLOR_RED,#Infected. Spread the infection to the living.),infected[playerid] = true,SetPlayerInterior(playerid,10);
- }
- return 1;
- }
- COMMAND:uninfect(playerid,params[])
- {
- new id;
- access_check
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /uninfect [playerid/name]");
- else
- {
- is_connected
- SendClientMessage(id,COLOR_WHITE,"An Admin has forced you to be un-infected");
- SetPlayerTeam(id,TEAM_UNINFECTED),SpawnPlayer(id),SendClientMessage(id,COLOR_RED,#Un-infected.),infected[playerid] = false,SetPlayerInterior(playerid,10);
- }
- return 1;
- }
- COMMAND:respawn(playerid,params[])
- {
- new id;
- access_check
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /respawn [playerid/name]");
- else
- {
- is_connected
- SendClientMessage(id,COLOR_WHITE,"An Admin has forced respawned you");
- SpawnPlayer(id);
- }
- return 1;
- }
- COMMAND:kill(playerid,params[])
- {
- new id;
- access_check
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /kill [playerid/name]");
- else
- {
- is_connected
- SetPlayerHealth(id,0);
- SetPlayerInterior(id,10);
- SendClientMessage(id,COLOR_WHITE,"An Admin has force killed you. Transferring you to spectation mode");
- }
- return 1;
- }
- COMMAND:clearchat(playerid,params[])
- {
- new amount;
- access_check
- if(sscanf(params,"i",amount)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /clearchat [amount of lines]");
- else
- {
- foreach (Player,i)
- {
- ClearChat(i,amount);
- }
- SendClientMessageToAll(COLOR_WHITE,"Chatbox cleared!");
- }
- return 1;
- }
- COMMAND:disablespawning(playerid)
- {
- access_check
- Spawning = false;
- SendClientMessageToAll(COLOR_WHITE,#Spawning disabled.);
- return 1;
- }
- COMMAND:randommsg(playerid)
- {
- access_check
- new randommsg = random(sizeof(RandomMSG));
- SendClientMessageToAll(COLOR_LIGHTRED, RandomMSG[randommsg]);
- return 1;
- }
- COMMAND:ahelp(playerid)
- {
- access_check
- SendClientMessage(playerid,COLOR_WHITE,"ADMIN COMMAND HELP");
- SendClientMessage(playerid,COLOR_GREY,"/restartround /infect /kill /uninfect");
- SendClientMessage(playerid,COLOR_GREY,"/disablespawning /clearchat /respawn");
- SendClientMessage(playerid,COLOR_GREY,"/randommsg");
- return 1;
- }
- COMMAND:help(playerid)
- {
- SendClientMessage(playerid,COLOR_WHITE,"COMMAND HELP");
- SendClientMessage(playerid,COLOR_GREY,"/playertypes /admins /infected");
- SendClientMessage(playerid,COLOR_GREY,"/spectators /uninfected /report");
- return 1;
- }
- COMMAND:playertypes(playerid)
- {
- SendClientMessage(playerid,COLOR_WHITE,"PLAYER TYPES KEY");
- SendClientMessage(playerid,COLOR_WHITE,"GREEN STANDS FOR {006400}INFECTED");
- SendClientMessage(playerid,COLOR_WHITE,"WHITE STANDS FOR {FFFFFF}UN-INFECTED");
- SendClientMessage(playerid,COLOR_WHITE,"GREY STANDS FOR {AFAFAF}SPECTATOR(WAITING FOR NEXT ROUND)");
- return 1;
- }
- COMMAND:admins(playerid)
- {
- new string[128];
- SendClientMessage(playerid, COLOR_WHITE, "Admins Online:");
- new found = 0;
- foreach (Player,i)
- {
- if(IsPlayerAdmin(playerid))
- {
- format(string,sizeof(string),"%s [ID:%d]",GetName(i),i);
- SendClientMessage(playerid,COLOR_GREY,string);
- found++;
- }
- }
- if(found == 0)
- {
- SendClientMessage(playerid, COLOR_FADE, "No admins online.");
- }
- return 1;
- }
- COMMAND:infected(playerid)
- {
- new string[128];
- SendClientMessage(playerid, COLOR_WHITE, "All Infected:");
- new found = 0;
- foreach (Player,i)
- {
- if(infected[playerid] == true)
- {
- format(string,sizeof(string),"%s",GetName(i));
- SendClientMessage(playerid,COLOR_GREEN,string);
- found++;
- }
- }
- if(found == 0)
- {
- SendClientMessage(playerid, COLOR_FADE, "No-one is infected.");
- }
- return 1;
- }
- COMMAND:uninfected(playerid, params[])
- {
- new string[128];
- SendClientMessage(playerid, COLOR_WHITE, "All Un-Infected:");
- new found = 0;
- foreach (Player,i)
- {
- if(infected[playerid] == false)
- {
- format(string,sizeof(string),"%s",GetName(i));
- SendClientMessage(playerid,COLOR_WHITE,string);
- found++;
- }
- }
- if(found == 0)
- {
- SendClientMessage(playerid, COLOR_FADE, "No-one is un-infected.");
- }
- return 1;
- }
- COMMAND:spectators(playerid)
- {
- new string[128];
- SendClientMessage(playerid, COLOR_WHITE, "Spectators(Waiting for next round):");
- new found = 0;
- foreach (Player,i)
- {
- if(spectating[playerid] == true)
- {
- format(string,sizeof(string),"%s",GetName(i));
- SendClientMessage(playerid,COLOR_WHITE,string);
- found++;
- }
- }
- if(found == 0)
- {
- SendClientMessage(playerid, COLOR_FADE, "No-one is waiting for the next round.");
- }
- return 1;
- }
- COMMAND:report(playerid,params[])
- {
- new id,reason[100],string[128];
- if(sscanf(params,"us[100]",id,reason)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /report [playerid/name] [reason]");
- else
- {
- is_connected
- format(string,sizeof(string),"REPORT:{FFFFFF}%s[ID:%d] has reported %s[ID:%d] for %s",GetName(playerid),playerid,GetName(id),id,reason);
- SendAdminMessage(COLOR_ORANGE,string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement