// 1024 #define ACCESS_WAR 1<<10 /* Kick all guys except those with ClanTag1 in their name, or ClanTag 2 in their name, afterwards, put 'password' as the password of the server. admin_war -=CW=- [KillThoseBastards] warpassword ==> kick every1 except those with the tags & put password UPDATED: admin_war -=CW=- trainingpassword ==> kick every1 except those with the 1st tag & place pwd on the server */ /* Credits: -=CW=-KaReL*recon* */ admin_war(war[]) { if (CheckAuth(ACCESS_WAR)==0) { message(user,STRING_DENIED); return; } new ClanTag1[MAX_NAME_LENGTH]=""; new Cmd[MAX_TEXT_LENGTH]=""; strbreak(war,ClanTag1,Cmd, MAX_NAME_LENGTH); if(ClanTag1[0] == NULL_CHAR || ClanTag1[0] == 0) { message(user, "Clantag 1 missing"); return; } new ClanTag2[MAX_NAME_LENGTH]=""; strbreak(Cmd, ClanTag2, Cmd, MAX_NAME_LENGTH); if(ClanTag2[0] == NULL_CHAR || ClanTag2[0] == 0) { message(user, "Clantag 2 or password missing ..."); return; } new Password[MAX_DATA_LENGTH]=""; strbreak(Cmd, Password, Cmd, MAX_DATA_LENGTH); if(Password[0] == NULL_CHAR || Password[0] == 0) { strncpy(Password ,ClanTag2, MAX_TEXT_LENGTH); ClanTag2[0] = NULL_CHAR; return; } new maxplayers = maxplayercount(); new Target[MAX_NAME_LENGTH]; new i = 0; new SessionID; new WONID; for(i=1; i<=maxplayers; i++) { if(playerinfo(i,Target,MAX_NAME_LENGTH,SessionID,WONID)==1) { if (instr(Target, "-=CW=-") == -1 && instr(Target, ClanTag1) == -1 && instr(Target, ClanTag2) == -1) { #if USE_IMMUNE == 1 if (access(ACCESS_IMMUNE, Target) == 0) { #if HIDE_KNOWN_WARNINGS == 1 new temp = min(1,2); #endif } else { #endif message (Target, "War is about to start ... thanks for leaving this quickly ;p"); kick(Target); #if USE_IMMUNE == 1 } #endif } if (instr(Target, "-=CW=-") != -1 && instr(ClanTag1, "-=CW=-") == -1 && instr(ClanTag2, "-=CW=-")) messageex(Target, "Please leave as quick as you can! No complaints! War is about to start", print_center); } } ExecuteCommand("sv_password", Password); centersay("May the best win!",7,255,0,0); new Text[MAX_TEXT_LENGTH]; strncpy (Text, "Password is now -> ^"", MAX_TEXT_LENGTH); strcat (Text, Password); strcat (Text, "^""); say (Text); LogCommand(); } /* now add to client_commands sth like this: else if(streq(ParseCommand, "admin_vote_map")==1) admin_vote_map(data); ....... /* Credits: -=CW=-KaReL*recon* */ else if(streq(ParseCommand, "admin_war")==1) admin_war(data); ....... else if(streq(ParseCommand, "admin_friendlyfire")==1 || streq(ParseCommand, "admin_ff")==1 ) admin_friendlyfire(data); */