While I am still undecided and there is little demand here is a script that can add an otherwise powerless admin flag so the Terrorist's can camp and the CT's cannot.
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_plugin("AutoTeam UserFlag Control", "A", "SPINX"); //cmd_user_flags from VEN
register_event( "TeamInfo", "event_team_info", "a" );
register_concmd("user_flags", "cmd_user_flags", ADMIN_RCON, "<name or #userid> [flags] [+|-] - gets/sets/adds/subtracts user flags")
}
public cmd_user_flags(caller, level, cid) {
if (!cmd_access(caller, level, cid, 2))
return PLUGIN_HANDLED
static arg[32], id
read_argv(1, arg, sizeof arg - 1)
id = cmd_target(caller, arg, 0)
if (!id)
return PLUGIN_HANDLED
if (read_argc() == 2) {
get_flags(get_user_flags(id), arg, sizeof arg - 1)
console_print(caller, "User's flags: %s", arg)
return PLUGIN_HANDLED
}
static flags
read_argv(2, arg, sizeof arg - 1)
flags = read_flags(arg)
read_argv(3, arg, 1)
switch (arg[0]) {
case '+': set_user_flags(id, flags)
case '-': remove_user_flags(id, flags)
default : {
remove_user_flags(id, -1)
set_user_flags(id, flags)
}
}
return PLUGIN_HANDLED
}
//By request for the Furien mods for badcamper for selective team camping by using otherwise powerless admin flag t. Pick whatever.
public event_team_info()
{
new id = read_data( 1 );
if(is_user_bot(id))return;
new team[12];
new Player = get_user_userid(id)
read_data( 2, team, sizeof team - 1 );
switch( team[0] )
{
case 'C' : server_cmd("user_flags #%d ^"t^" ^"- ^" ", Player)&&server_cmd("user_flags #%d ^"z^" ^"+ ^" ", Player); // CT
case 'T' : server_cmd("user_flags #%d ^"t^" ^"+ ^" ", Player)&&server_cmd("user_flags #%d ^"z^" ^"- ^" ", Player); // TERRORIST
case 'S' : return; // SPEC
}
}