PDA

View Full Version : Chat


Fancy
30/07/2015, 03:18 PM
new ChatBubble[MAX_CHATBUBBLE_LENGTH+1];
new Chats[MAX_CHATBUBBLE_LENGTH+1];
format(ChatBubble,MAX_CHATBUBBLE_LENGTH,"%s",text);
format(Chats,MAX_CHATBUBBLE_LENGTH,"%s(%d):%s",Color,GetName(playerid),playerid,text);
SetPlayerChatBubble(playerid,ChatBubble,MESSAGE_CO LOR,35.0,10000);
SendClientMessageToAll(0xFFFFFFFF, Chats);

How can i show the player name color?

Dan.
30/07/2015, 03:51 PM
You have to change the color of your message sent.. you currently have it on white.


SendClientMessageToAll(GetPlayerColor(playerid), Chats);

SWAT4
30/07/2015, 03:55 PM
You have to change the color of your message sent.. you currently have it on white.

SendClientMessageToAll(GetPlayerColor(playerid), Chats);

I Guess he means change The Player Color only not all the chat ^^ thx

Fancy
30/07/2015, 03:56 PM
You have to change the color of your message sent.. you currently have it on white.

SendClientMessageToAll(GetPlayerColor(playerid), Chats);

It will set the whole chat color to player name color

Dan.
30/07/2015, 03:57 PM
Then use this aswell:
format(Chats,MAX_CHATBUBBLE_LENGTH,"%s(%d):{FFFFFF}%s",Color,GetName(playerid),playerid,text);

The '{FFFFFF}' which is the color code for white, changes the color of the text to white from that point.

Fancy
30/07/2015, 04:03 PM
Then use this aswell:
format(Chats,MAX_CHATBUBBLE_LENGTH,"%s(%d):{FFFFFF}%s",Color,GetName(playerid),playerid,text);

The '{FFFFFF}' which is the color code for white, changes the color of the text to white from that point.

I want the timestamp color also to be white

Fancy
30/07/2015, 04:18 PM
Help pls

sjames
30/07/2015, 04:20 PM
Use the search button in the forum :)

Fancy
30/07/2015, 04:21 PM
Use the search button in the forum :)

I already did -_-

sjames
30/07/2015, 04:23 PM
It seems like you didn't. The thing you want is even on SA-MP wiki.

Fancy
30/07/2015, 04:26 PM
It seems like you didn't. The thing you want is even on SA-MP wiki.

Lol,ok tell me the link if you found

sjames
30/07/2015, 04:27 PM
It's on SA-MP wiki and in the forums.. search for it. We are not ur slaves.

Fancy
30/07/2015, 04:28 PM
It's on SA-MP wiki and in the forums.. search for it. We are not ur slaves.

Seems like you also dont know xD,i already searched lol

sjames
30/07/2015, 04:30 PM
Then search again, because I found it in 10 seconds. https://wiki.sa-mp.com/wiki/GetPlayerColor

jamesmith12
30/07/2015, 04:32 PM
i cant find Timestamp colors too :) hahahah

BTW you want like this ? : http://forum.sa-mp.com/showthread.php?t=364157

Dan.
30/07/2015, 04:42 PM
The color of the timestamp will be white, as the SendClientMessage is white. Player name will be his color, because of '{%06x}' and the text will be white again because of '{FFFFFF}'.

format(Chats,MAX_CHATBUBBLE_LENGTH,"{%06x}%s(%d):{FFFFFF}%s",GetPlayerColor(playerid) >>> 8,GetName(playerid),playerid,text);
SendClientMessageToAll(0xFFFFFFFF, Chats);

Fancy
30/07/2015, 04:51 PM
Then search again, because I found it in 10 seconds. https://wiki.sa-mp.com/wiki/GetPlayerColor

I got it before but it had a bug