[SaveLevel] Add clear cache command.
This commit is contained in:
parent
9aefd25b20
commit
24d6d0b9bc
@ -28,6 +28,8 @@ public void OnPluginStart()
|
|||||||
g_PropAltNames.SetString("m_iName", "targetname");
|
g_PropAltNames.SetString("m_iName", "targetname");
|
||||||
|
|
||||||
RegAdminCmd("sm_level", Command_Level, ADMFLAG_GENERIC, "Set a players map level.");
|
RegAdminCmd("sm_level", Command_Level, ADMFLAG_GENERIC, "Set a players map level.");
|
||||||
|
|
||||||
|
RegServerCmd("sm_clearlevelcache", Command_ClearCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPluginEnd()
|
public void OnPluginEnd()
|
||||||
@ -507,6 +509,16 @@ public Action Command_Level(int client, int args)
|
|||||||
return Plugin_Handled;
|
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)
|
stock int CalcMatches(int Matches, int ExactMatches, int MinMatches, int MaxMatches)
|
||||||
{
|
{
|
||||||
int Value = 0;
|
int Value = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user