How to send client message with player color
#1

Hello,

i have this code in onplayertext:

Код:
if(GetPVarInt(playerid, "Muted"))
	{
		SCM(playerid, COLOR_ORANGE, "You're muted and can't talk!","Vie ste zamolceni, nemozete da zboruvate!");
	    return 0;
	}
	else
	{
		new string[128], pName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, pName, sizeof(pName));
		format(string, sizeof(string), "%s[%i]: {FFFFFF}%s",pName, playerid, text);
		SendClientMessageToAll(GetPlayerColor(playerid), string);
		return 0;
	}
But i have black player name ever. What is problem?
Reply
#2

You have to use SetPlayerColor.

https://sampwiki.blast.hk/wiki/GetPlayerColor
Reply
#3

your way of describing your probably is horrible btw.. You have black player name ever? Huh?? I can only assume when their muted there name goes black, if so then you've done the if wrong, try if(GetPVarInt(playerid, "Muted") == 1) or w/e you've set muted as/
Reply
#4

my color name is ok,
this is problem: http://pic.mk/images/samp001312065988.png
Reply
#5

Quote:
Originally Posted by mariomako
Посмотреть сообщение
my color name is ok,
this is problem: http://pic.mk/images/samp001312065988.png
If you had opend that \/ wiki page and read what stood there you would have known why that happens

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
You have to use SetPlayerColor.

https://sampwiki.blast.hk/wiki/GetPlayerColor
There is also a fix provided on that page /\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)