PlayerTextColor
#1

Hello , i want to know how to change the player text message color?
Reply
#2

Explain more. I don't understand a shit..
What text message, where do you send that message? Show a part of its code.
Reply
#3

i think do you mean the text on the chat... Show me your enum and i will do it.
Reply
#4

https://sampwiki.blast.hk/wiki/Colors_List
This may help you.
Reply
#5

For Example , player type "hello" so his text will be show to players in white color but i want to make different. When player type /red so his text message appear is red such that if he type "hello" players will see his message in red color.
Reply
#6

This is from my script, I think you are looking for this,
PHP код:
public OnPlayerText(playeridtext)
{
    new 
playername[128], message[128];
    
GetPlayerName(playeridplayernamesizeof(playername));
    
format(messagesizeof(message), "{%06x}%s[%d]:{FFFFFF} %s"GetPlayerColor(playerid) >>> 8playernameplayeridtext);
    
SendClientMessageToAll(COLOR_WHITEmessage);
    return 
1;

Reply
#7

i am getting error in that code about mismatch of argument.
I got the solution from wiki . but i have another problem

PHP код:
#define COLOR_RED_EMBED "FF0000"
 
SendClientMessage(playerid, -1"This is white and {"COLOR_RED_EMBED"}this is red."); 
if i add the above code in OnPlayerText then it will send the message to that player in white and red color . but i want that if the player type /red then only in that case the half message appears red and if he again type /red so the code reset to default (all text appear in white)
Reply
#8

ow i think that is Impossible

i think you want this:

Player: Hello

and then when he type /red it should be like this:

Player: Hello

Yes i think that is impossible :3
Reply
#9

Quote:
Originally Posted by Kelbac
Посмотреть сообщение
ow i think that is Impossible

i think you want this:

Player: Hello

and then when he type /red it should be like this:

Player: Hello

Yes i think that is impossible :3
Yeah, it's impossible.
Reply
#10

If you need something like Kelbac said, just tell us. It's possible to do something like;
If you type /red, It will be like Player: Text
You can change the text colours to any color according to the players' choice, but cannot split up the colors in the middle of the sentence (pre-scripted wise). You could check this latest filterscript and use it if you wish:
https://sampforum.blast.hk/showthread.php?tid=553655
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)