From d260efa604f444e8319efc20d14ede1b7c663746 Mon Sep 17 00:00:00 2001 From: neon <> Date: Thu, 26 Sep 2019 00:41:09 +0200 Subject: [PATCH] halloween: derp --- season_halloween/scripting/season_halloween.sp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/season_halloween/scripting/season_halloween.sp b/season_halloween/scripting/season_halloween.sp index 04018904..c0e0f23b 100644 --- a/season_halloween/scripting/season_halloween.sp +++ b/season_halloween/scripting/season_halloween.sp @@ -232,7 +232,7 @@ public void SQL_OnDatabaseConnect(Database db, const char[] error, any data) g_hDatabase = db; char sQuery[256]; - Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS halloween_table (`steam_auth` varchar(64), `name` int varchar(256), `collected` int(16), PRIMARY KEY (`steam_auth`))"); + Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS halloween_table (`steam_auth` varchar(64), `name` varchar(256), `collected` int(16), PRIMARY KEY (`steam_auth`))"); g_hDatabase.Query(SQL_OnTableCreated, sQuery, _, DBPrio_High); } @@ -357,6 +357,9 @@ public void OnClientPostAdminFilter(int client) //---------------------------------------------------------------------------------------------------- public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) { + if (!g_hCVar_CollectablesEnabled.BoolValue) + return; + g_iCounter = 0; CreateTimer(10.0, CheckPlayerCount, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); } @@ -381,7 +384,7 @@ public Action Command_HighScore(int client, int args) { char sQuery[255]; Format(sQuery, sizeof(sQuery), "SELECT * from halloween_table order by collected desc limit %d", g_hCVar_HighscoreDisplay.IntValue); - g_hDatabase.Query(SQL_OnQueryCompletedCheck, sQuery, GetClientSerial(client)); + g_hDatabase.Query(SQL_OnQueryCompletedHighscore, sQuery, GetClientSerial(client)); return Plugin_Handled; }