diff options
Diffstat (limited to 'sourcemod/scripting/game_manager.sp')
| -rw-r--r-- | sourcemod/scripting/game_manager.sp | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/sourcemod/scripting/game_manager.sp b/sourcemod/scripting/game_manager.sp index 73d3a2d..7959880 100644 --- a/sourcemod/scripting/game_manager.sp +++ b/sourcemod/scripting/game_manager.sp @@ -40,6 +40,7 @@ new Float:g_voteTime = 20.0; new bool:g_hasVoted[MAXPLAYERS + 1] = {false, ...}; new g_voteCount[9] = {0, ...}; new bool:g_botVoteDone = false; +new bool:g_isKZ = false; /* forwards */ new Handle:g_f_on_ht = INVALID_HANDLE; @@ -52,15 +53,31 @@ public OnMapStart(){ halftime = false; g_roundCount = 0; + new String:mapName[256]; + GetCurrentMap( mapName, sizeof(mapName) ); + + if( !strncmp( mapName, "kz_", 3, false ) + || !strncmp( mapName, "xc_", 3, false ) + || !strncmp( mapName, "bhop_", 5, false ) + || !strncmp( mapName, "bkz_", 4, false ) ) { + g_isKZ = true; + } else { + g_isKZ = false; + } + g_mp_startmoney = GetConVarInt( g_h_mp_startmoney ); g_maxrounds = GetConVarInt( g_h_mp_maxrounds ); g_lastDmMode = 0; - OnDmModeChanged( g_h_nh_warmup, "", "" ); g_botVoteEnd = -1.0; - SetConVarInt( g_h_nh_warmup, 60 ); - CreateTimer( 20.0, BotVoteCreateTimer, _ ); + LogMessage( "map name: %s kz: %d", mapName, g_isKZ ); + + if( g_isKZ == false ) { + OnDmModeChanged( g_h_nh_warmup, "", "" ); + SetConVarInt( g_h_nh_warmup, 60 ); + CreateTimer( 20.0, BotVoteCreateTimer, _ ); + } } public OnConfigsExecuted() { @@ -187,9 +204,11 @@ public OnClientPutInServer( client ) { if( i != client && IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) ) return; } - - SetConVarInt( g_h_nh_warmup, 60 ); - CreateTimer( 20.0, BotVoteCreateTimer, _ ); + + if( !g_isKZ ) { + SetConVarInt( g_h_nh_warmup, 60 ); + CreateTimer( 20.0, BotVoteCreateTimer, _ ); + } } public Hook_PostThinkPost( entity ) { @@ -314,6 +333,9 @@ public Action:CreateBotVote( client, args ) { if( GetGameTime() < g_botVoteEnd ) return Plugin_Handled; + if( g_isKZ ) + return Plugin_Handled; + g_botVoteDone = true; g_botVoteEnd = GetGameTime() + g_voteTime; @@ -368,6 +390,9 @@ public OnClientDisconnect( client ) { } public Action:ExecServerCfg( Handle:timer, any:unused ) { + if( g_isKZ ) + return; + g_botVoteDone = false; ServerCommand( "exec server.cfg" ); g_h_execServerCfgTimer = INVALID_HANDLE; |
