19.02.2017, 15:34
Hello everyone today i having an issue in my script at OnPlayerText i am using chat colors for my server but if any player choose a color from chat color dialog its sending message like this
1 line with color message and after that sending in white color i am getting confused check my code and try to help me out about the problem.
Code of OnPlayerText
1 line with color message and after that sending in white color i am getting confused check my code and try to help me out about the problem.
Code of OnPlayerText
PHP код:
for (new i = 0; i < PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(dini_Isset(AddDirFile(dir_userfiles, playername), "CColor"))
{
if (PlayerIgnored[i][playerid] == 0)
{
format(string,sizeof(string), "%s[%d]: {%s}%s", string, playerid, dini_Get(AddDirFile(dir_userfiles, playername), "CColor"), text);
SendPlayerMessageToPlayer(i, playerid, string);
}
}
else
{
if (PlayerIgnored[i][playerid] == 0)
{
format(string,sizeof(string), "[%d]: %s", playerid, text);
SendPlayerMessageToPlayer(i, playerid, string);
}
}
}
}