SendClientMessage in two colors?
#1

How to type in sendclientmessage in two colors?

example

color=getplayercolor(playerid);

sendclientmessagetoall(COLOR_WHITE, "(WITH COLOR ( GET PLAYER COLOR ) ) PLAYER NAME ( WITH WHITE ) text[1]);
Reply
#2

I don't really understand you. Do you want something like htis;
Kingunit: Hello this is my SAMP server

Using two colors in one SendClientMessage?
Reply
#3

2 colors in a message
SendClientMessageToAll(-1,"{FFFFF}Color1 {FF0000}Color2!");

don't know if you can use GetPlayerColor here though.
Reply
#4

If you want what he said above you would need to use {RRGGBB] in the text:

sendclientmessagetoall(GetPlayerColor(playerid), "PLAYER NAME{FFFFFF} text[1]);

^ An edit of your little example (won't work, as you need to format it, but I assume you know how to do that.
Reply
#5

Better you define the colors and then you use

pawn Код:
SendClientMessageToAll(Playerid, COLOR_WHITE, ""#COL_RED"Hello"#COL_WHITE"Hello")
Reply
#6

Kingunit, is that even possible?
Btw : SendClientMessageToAll doesn't require "playerid"
i know only that you can add colors by using {COLORCODE}
Reply
#7

Read this: https://sampwiki.blast.hk/wiki/Colour_Embedding
Reply
#8

pawn Код:
new
    playername[ 24 ]
    ,string[ 128 ]
;
GetPlayerName( playerid, playername, 24 );
format( string, sizeof string, "%s {FFFFFF} white text. " );
SendClientMessageToAll( GetPlayerColor( playerid ), string );
Reply
#9

yes
Reply
#10

Quote:
Originally Posted by CmZxC
Посмотреть сообщение
Kingunit, is that even possible?
Btw : SendClientMessageToAll doesn't require "playerid"
i know only that you can add colors by using {COLORCODE}
If you define them Click me!
I'm also using it, and it's kinda easy to use colors.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)