From 658a6d9562a6fb3d7244af3425b59fa309b72bee Mon Sep 17 00:00:00 2001 From: djearthquake <6540695+djearthquake@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:00:50 -0600 Subject: [PATCH] Update gungame.sma Same as previous update. Finish bug fixing ent. --- scripting/czero/gungame.sma | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripting/czero/gungame.sma b/scripting/czero/gungame.sma index 1cb3153..e95c77e 100644 --- a/scripting/czero/gungame.sma +++ b/scripting/czero/gungame.sma @@ -986,12 +986,6 @@ public event_new_round() if(!ggActive) return; - new iEnt = fm_find_ent_by_class(MaxClients, "game_player_equip") - if(pev_valid(iEnt)) - { - fm_remove_entity(iEnt) - log_amx("Removed ent to play Gungame.") - } // we should probably warmup... // don't ask me where I'm getting this from. if(shouldWarmup) @@ -3815,7 +3809,6 @@ public toggle_gungame(taskid) remove_task(TASK_WARMUP_CHECK); } - // we need to get these stats (GunGame is on, we don't have them, and we aren't in the process of getting them) #if defined SQL if(ggActive && !task_exists(TASK_GET_TOP_PLAYERS)) stats_get_top_players(); // there is no statsArray for SQL @@ -6892,6 +6885,16 @@ public autovote_result() } else if(ggActive) vSuccess = 1; + if(vSuccess) + { + new iEnt = fm_find_ent_by_class(MaxClients, "game_player_equip") + if(pev_valid(iEnt)) + { + fm_remove_entity(iEnt) + log_amx("Removed ent to play Gungame.") + } + } + if(vSuccess && !ggActive) { restart_round(5);