diff options
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r-- | src/game/g_admin.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 60779a7..9d5d90e 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -361,6 +361,11 @@ g_admin_cmd_t g_admin_cmds[ ] = "[^3name|slot^7] (damage)" }, + {"scrim", G_admin_scrim, "scrim", + "toggles scrim mode", + "[on|off]", + }, + {"spec999", G_admin_spec999, "spec999", "move 999 pingers to the spectator team", ""}, @@ -7074,6 +7079,7 @@ static AdminFlagListEntry_t adminFlagList[] = { ADMF_NOREPORTLIMIT, "does not have a report limit" }, { ADMF_FULLRLIST, "removes self-restriction on report list" }, { ADMF_SEESINCOGNITO, "sees registered name of players flagged with INCOGNITO" }, + { ADMF_NOSCRIMRESTRICTION, "team joining, vote and chat restrictions during scrims do not apply" }, { ADMF_NO_CHAT, "can not talk" }, { ADMF_NO_VOTE, "can not call votes" } }; @@ -9812,3 +9818,43 @@ qboolean G_admin_rnote( gentity_t *ent, int skiparg ) return qtrue; } +qboolean G_admin_scrim(gentity_t *ent, int skiparg ) +{ + char state[5]; + + if( G_SayArgc() < 2 + skiparg ) + { + ADMP( "^3!scrim: ^7usage: !scrim [on|off]\n" ); + return qfalse; + } + + G_SayArgv( 1 + skiparg, state, sizeof( state ) ); + + if( !Q_stricmp(state, "on") ) + { + if( g_scrimMode.integer != 0 ) + { + ADMP( "^3!scrim: ^7scrim mode is already enabled.\n" ); + return qfalse; + } + AP( va( "print \"^3!scrim: ^7%s ^7turned scrim mode ^2on^7\n\"", ( ent ) ? G_admin_adminPrintName( ent ) : "console" ) ); + trap_Cvar_Set( "g_scrimMode", "1" ); + } + else if( !Q_stricmp(state, "off") ) + { + if( g_scrimMode.integer == 0 ) + { + ADMP( "^3!scrim: ^7scrim mode is already disabled.\n" ); + return qfalse; + } + AP( va( "print \"^3!scrim: ^7%s ^7turned scrim mode ^1off^7\n\"", ( ent ) ? G_admin_adminPrintName( ent ) : "console" ) ); + trap_Cvar_Set( "g_scrimMode", "0" ); + + } else { + ADMP( "^3!scrim: ^7usage: !scrim [on|off]\n" ); + return qfalse; + } + + return qtrue; +} + |