SA-MP Forums Archive
Hexcolor-codes in Textdraws - 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)
+--- Thread: Hexcolor-codes in Textdraws (/showthread.php?tid=380485)



Hexcolor-codes in Textdraws - Timmeyable - 25.09.2012

Hi,

is it possible to use Hex-codes in textdraws?
For example:

TextDrawSetString(website, "{FFA65D}www.{FF0000}txp.mysamp{FFA65D}.de");

- Tim


Re: Hexcolor-codes in Textdraws - detter - 25.09.2012

Why don't you test it for yourself ?


Re: Hexcolor-codes in Textdraws - Glint - 25.09.2012

Quote:
Originally Posted by detter
Посмотреть сообщение
Why don't you test it for yourself ?
Very helpful.....

OT I think so. (though this wasn't helpful too lol)


AW: Hexcolor-codes in Textdraws - Timmeyable - 25.09.2012

I tested it but it doesnt work. I started this thread in hope that somebody know a way to do this.


Re: Hexcolor-codes in Textdraws - Lordzy - 25.09.2012

Quote:
Originally Posted by BlacK_RiDeR
Посмотреть сообщение
If You Tested then it will not come u can use lyk this ~r~ , ~b~ etc ....
Dude, it's used for GameText.
pawn Код:
GameTextForPlayer(playerid, "~r~ Red", 2000, 1);



Re: Hexcolor-codes in Textdraws - Vince - 25.09.2012

These work for textdraws as well.


AW: Hexcolor-codes in Textdraws - Timmeyable - 25.09.2012

Yes, but i want other colors. ~r~ and ~blue~ etc. are so boring


Re: AW: Hexcolor-codes in Textdraws - Glint - 25.09.2012

Quote:
Originally Posted by Timmeyable
Посмотреть сообщение
Yes, but i want other colors. ~r~ and ~blue~ etc. are so boring
You can use y_colours it has many many colours.


AW: Hexcolor-codes in Textdraws - Timmeyable - 26.09.2012

Other question:

How to convert (example) 0xFF0000FF in FF0000?
Without the 0x and the FF in the end.

EDIT:

I want to get the color of a player and use this in a string

new color;
color = GetPlayerColor(playerid);
-Konvert-
"Bla bla {converted color} bla bla bla"

- Tim