diff --git a/SaveLevel/scripting/SaveLevel.sp b/SaveLevel/scripting/SaveLevel.sp index dccd29e6..68a8a1b2 100644 --- a/SaveLevel/scripting/SaveLevel.sp +++ b/SaveLevel/scripting/SaveLevel.sp @@ -28,6 +28,8 @@ public void OnPluginStart() g_PropAltNames.SetString("m_iName", "targetname"); RegAdminCmd("sm_level", Command_Level, ADMFLAG_GENERIC, "Set a players map level."); + + RegServerCmd("sm_clearlevelcache", Command_ClearCache); } public void OnPluginEnd() @@ -507,6 +509,16 @@ public Action Command_Level(int client, int args) return Plugin_Handled; } +public Action Command_ClearCache(int args) +{ + if(!g_Config || !g_PlayerLevels) + return Plugin_Handled; + + g_PlayerLevels.Clear(); + + return Plugin_Handled; +} + stock int CalcMatches(int Matches, int ExactMatches, int MinMatches, int MaxMatches) { int Value = 0;