/* TFC changeteam snippet by R3AP3R built off of ADMIN_CT & ADMIN_T by Gremlin */ /*throw these in the Constants / definitions area */ #define ACCESS_BLUE 8192 #define ACCESS_RED 8192 #define ACCESS_YELLOW 8192 #define ACCESS_GREEN 8192 /* next add these to the admin functions part of your script */ admin_blue(blue_user[]) { new TargetName[MAX_NAME_LENGTH]; if (CheckAuth(ACCESS_BLUE)==0) { message(user,STRING_DENIED); return; } if ( check_user(blue_user) == 1) { get_username(blue_user,TargetName,MAX_NAME_LENGTH); if(access(ACCESS_IMMUNITY, TargetName)!=0) { } else { execclient(blue_user,"jointeam 1"); } } else { message(user,"Unrecognized player: "); message(user,blue_user); } } admin_red(red_user[]) { new TargetName[MAX_NAME_LENGTH]; if (CheckAuth(ACCESS_RED)==0) { message(user,STRING_DENIED); return; } if ( check_user(red_user) == 1) { get_username(red_user,TargetName,MAX_NAME_LENGTH); if(access(ACCESS_IMMUNITY, TargetName)!=0) { } else { execclient(red_user,"jointeam 2"); } } else { message(user,"Unrecognized player: "); message(user,red_user); } } admin_yellow(yellow_user[]) { new TargetName[MAX_NAME_LENGTH]; if (CheckAuth(ACCESS_YELLOW)==0) { message(user,STRING_DENIED); return; } if ( check_user(yellow_user) == 1) { get_username(yellow_user,TargetName,MAX_NAME_LENGTH); if(access(ACCESS_IMMUNITY, TargetName)!=0) { } else { execclient(yellow_user,"jointeam 3"); } } else { message(user,"Unrecognized player: "); message(user,yellow_user); } } admin_green(green_user[]) { new TargetName[MAX_NAME_LENGTH]; if (CheckAuth(ACCESS_GREEN)==0) { message(user,STRING_DENIED); return; } if ( check_user(green_user) == 1) { get_username(green_user,TargetName,MAX_NAME_LENGTH); if(access(ACCESS_IMMUNITY, TargetName)!=0) { } else { execclient(green_user,"jointeam 4"); } } else { message(user,"Unrecognized player: "); message(user,green_user); } } /* add the next part to your scripts client commands area */ else if(streq(ParseCommand, "admin_blue")==1) admin_blue(data); else if(streq(ParseCommand, "admin_red")==1) admin_red(data); else if(streq(ParseCommand, "admin_yellow")==1) admin_yellow(data); else if(streq(ParseCommand, "admin_green")==1) admin_green(data);