SA-MP Forums Archive
about OnPlayerText - 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: about OnPlayerText (/showthread.php?tid=593662)



about OnPlayerText - XYZero - 08.11.2015

Код:
if(PlayerInfo[playerid][Level] >= 0)
	{
    	new String[256], ircMsg[256];
    	format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, pName(playerid), text);
		format(String, 256, "%s : %s", pName(playerid), text);
		SendClientMessageToAll(GetPlayerColor(playerid), String);
		IRC_GroupSay(GroupID, IRC_CHANNEL, ircMsg);
		return 0;
	}
How to make the player's chat colour to white?
Example: XYZero: hello <white

I've tried format(String, 256, "%s : {FFFFFF}%s", pName(playerid), text);
It will be XYZero: {FFFFFF}hello in game
by the way this is 3b script. Thanks


Re: about OnPlayerText - SalmaN97 - 08.11.2015

try it with irc message aswell?


Re: about OnPlayerText - Sh4d0w2 - 08.11.2015

Try use this code :
PHP код:
SendClientMessageToAll(0xFFFFFFFFString); 
instead of this :
PHP код:
SendClientMessageToAll(GetPlayerColor(playerid), String); 



Re: about OnPlayerText - RoboN1X - 08.11.2015

Quote:
Originally Posted by XYZero
Посмотреть сообщение
by the way this is 3b script.
Color embedding supported since 0.3c


Re: about OnPlayerText - XYZero - 08.11.2015

Quote:
Originally Posted by SalmaN97
Посмотреть сообщение
try it with irc message aswell?
Oops sorry, I've removed the irc system on this script.
Код:
if(PlayerInfo[playerid][Level] >= 0)
	{
    	new String[256];
		format(String, 256, "%s : %s", pName(playerid), text);
		SendClientMessageToAll(GetPlayerColor(playerid), String);
		return 0;
	}
So.. that is


Re: about OnPlayerText - XYZero - 08.11.2015

Quote:
Originally Posted by Sh4d0w2
Посмотреть сообщение
Try use this code :
PHP код:
SendClientMessageToAll(0xFFFFFFFFString); 
instead of this :
PHP код:
SendClientMessageToAll(GetPlayerColor(playerid), String); 
I thought that will be XYZero: hello <white


Re: about OnPlayerText - Sh4d0w2 - 08.11.2015

PHP код:
if(PlayerInfo[playerid][Level] >= 0)
    {
    new 
String[256], ircMsg[256];
    
format(ircMsgsizeof(ircMsg), "02[%d] 07%s: %s"playeridpName(playerid), text);
    
format(String256"%s : {FFFFFF}%s"pName(playerid), text);
    
SendClientMessageToAll(playeridString);
    
IRC_GroupSay(GroupIDIRC_CHANNELircMsg);
    return 
0;
    }