[SaveLevel] Add clear cache command.

This commit is contained in:
zaCade 2023-01-02 14:05:49 +01:00
parent 9aefd25b20
commit 24d6d0b9bc

View File

@ -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;