fixed errors in custom-chatcolors and hopefully fixed crash in SaveLevel

This commit is contained in:
BotoX 2016-01-17 01:32:50 +01:00
parent fc1981e234
commit a0186f4a49
2 changed files with 8 additions and 1 deletions

View File

@ -165,7 +165,7 @@ public void OnClientPostAdminCheck(int client)
public void OnClientDisconnect(int client)
{
if(!g_Config || !g_PlayerLevels)
if(!g_Config || !g_PlayerLevels || !IsClientInGame(client))
return;
g_Config.Rewind();

View File

@ -2871,6 +2871,13 @@ public Action:Hook_UserMessage(UserMsg:msg_id, Handle:bf, const players[], playe
BfReadString(bf, g_msgName, sizeof(g_msgName), false);
BfReadString(bf, g_msgSender, sizeof(g_msgSender), false);
BfReadString(bf, g_msgText, sizeof(g_msgText), false);
if(strlen(g_msgName) == 0 || strlen(g_msgSender) == 0 || strlen(g_msgText) == 0)
return Plugin_Continue;
if(!strcmp(g_msgName, "#Cstrike_Name_Change"))
return Plugin_Continue;
CCC_GetTag(g_msgAuthor, sAuthorTag, sizeof(sAuthorTag));
new bool:bNameAlpha;
new bool:bChatAlpha;