Second Line chatting not setting color - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Second Line chatting not setting color (
/showthread.php?tid=371937)
Second Line chatting not setting color -
Sgt.TheDarkness - 25.08.2012
Hey, I've made a piece of code to change my admins text to a different color, but when they type long sentences (Run on to the next line) it turns back to the default text color, did I do something wrong??
Example:
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new output[256];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(str, sizeof(str), "%s(%i)", PlayerName, playerid);
format(output, sizeof(output),"{A8DBFF}%s", text);
SetPlayerName(playerid, str);
SendPlayerMessageToAll(playerid, output);
#if defined IRC
format(str, sizeof(str), "0,1[ADMIN]%s(%i)1,0:2 %s", PlayerName, playerid, output);
IRC_GroupSay(ircGroup, IRC_CHANNEL, output);
#endif
session[messages] = session[messages] + 1;
SetPlayerName(playerid, PlayerName);
return 0;
}
Re: Second Line chatting not setting color -
ddnbb - 25.08.2012
What i've heard so far, is that you cant do anything about that. But i cant say for sure...
Re: Second Line chatting not setting color -
Sgt.TheDarkness - 25.08.2012
Quote:
Originally Posted by ddnbb
What i've heard so far, is that you cant do anything about that. But i cant say for sure...
|
I got the idea from another server that had that bug, and was fixed, although the owner does not enjoy my presence, so I cannot ask them, but I've noticed if you use "SendClientMessageToAll" instead of "SendPlayerMessageToAll", it eliminates the problem