//---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnPluginStart() { if ((g_hGameConf = LoadGameConfigFile("entWatch.games")) == INVALID_HANDLE) SetFailState("Couldn't load \"entWatch.games\" game config!"); ... } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) { g_fRestartTime = 0.0; } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast) { g_fRestartTime = view_as(LoadFromAddress(GetGameRulesAddress() + view_as
(GameConfGetOffset(g_hGameConf, "RoundRestartTime")), NumberType_Int32)); } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnGameFrame() { if (g_fRestartTime && g_fRestartTime <= GetGameTime()) { if (g_hArray_Items.Length) g_hArray_Items.Clear(); g_fRestartTime = 0.0; } }