SA-MP Forums Archive
SendClientMessage in two colors? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendClientMessage in two colors? (/showthread.php?tid=272965)



SendClientMessage in two colors? - mariomako - 30.07.2011

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]);


Re: SendClientMessage in two colors? - Kingunit - 30.07.2011

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?


Re: SendClientMessage in two colors? - CmZxC - 30.07.2011

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

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


Re: SendClientMessage in two colors? - Mikkel_Pedersen - 30.07.2011

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.


Re: SendClientMessage in two colors? - Kingunit - 30.07.2011

Better you define the colors and then you use

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



Re: SendClientMessage in two colors? - CmZxC - 30.07.2011

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


Re: SendClientMessage in two colors? - MoroDan - 30.07.2011

Read this: https://sampwiki.blast.hk/wiki/Colour_Embedding


Re: SendClientMessage in two colors? - Mean - 30.07.2011

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



Re: SendClientMessage in two colors? - mariomako - 30.07.2011

yes


Re: SendClientMessage in two colors? - Kingunit - 30.07.2011

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.