diff --git a/custom-chatcolors/scripting/custom-chatcolors.sp b/custom-chatcolors/scripting/custom-chatcolors.sp index 736f4f55..a02fa634 100644 --- a/custom-chatcolors/scripting/custom-chatcolors.sp +++ b/custom-chatcolors/scripting/custom-chatcolors.sp @@ -187,6 +187,18 @@ void LoadConfig() } } +public void OnMapEnd() +{ + KvRewind(g_hConfigFile); + KvRewind(g_hBanFile); + + KeyValuesToFile(g_hConfigFile, g_sPath); + KeyValuesToFile(g_hBanFile, g_sBanPath); +} + + + + /* public OnLibraryRemoved(const char name[]) { if (StrEqual(name, "adminmenu")) @@ -415,12 +427,14 @@ bool SetColor(char SID[64], char Key[64], char HEX[64], int client, bool IgnoreB } KvRewind(g_hConfigFile); - KeyValuesToFile(g_hConfigFile, g_sPath); - KeyValuesToFile(g_hBanFile, g_sBanPath); + //KeyValuesToFile(g_hConfigFile, g_sPath); + //KeyValuesToFile(g_hBanFile, g_sBanPath); - LoadConfig(); - Call_StartForward(configReloadedForward); - Call_Finish(); + OnClientPostAdminCheck(client); + + //LoadConfig(); + //Call_StartForward(configReloadedForward); + //Call_Finish(); return true; } @@ -495,12 +509,13 @@ bool SetTag(char SID[64], char text[64], int client, bool IgnoreBan=false) } KvRewind(g_hConfigFile); - KeyValuesToFile(g_hConfigFile, g_sPath); - KeyValuesToFile(g_hBanFile, g_sBanPath); + //KeyValuesToFile(g_hConfigFile, g_sPath); + //KeyValuesToFile(g_hBanFile, g_sBanPath); + OnClientPostAdminCheck(client); - LoadConfig(); - Call_StartForward(configReloadedForward); - Call_Finish(); + //LoadConfig(); + //Call_StartForward(configReloadedForward); + //Call_Finish(); return true; } @@ -589,7 +604,7 @@ bool ToggleCCC(char SID[64], int client) } KvRewind(g_hConfigFile); - KeyValuesToFile(g_hConfigFile, g_sPath); + //KeyValuesToFile(g_hConfigFile, g_sPath); return true; }