SA-MP Forums Archive
Hello, i need change color - 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: Hello, i need change color (/showthread.php?tid=518160)



Hello, i need change color - b0b - 08.06.2014

Hei, i need change this color!
"Sell\nName: %s\nPrice: %d"

I need like This
SELL
Name: Test_user
Price 1000


Re: Hello, i need change color - Laure - 08.06.2014

If yellow color is defined in your script then replace the existing color of your textlabel to COLOR_YELLOW or the variable as defined in your script. If yellow is not defined in your script then add
pawn Код:
#define COLOR_YELLOW 0xFFFF00FF
at the top of your script then compile.


Re: Hello, i need change color - b0b - 08.06.2014

yes, i cnow but look code
Quote:

format(text, sizeof(text), "SELL\nName: %s\nHind: %d", name,price);

I want like ingame show SELL NAme - white name.Price- white


Re: Hello, i need change color - iFiras - 08.06.2014

I think he means HEX colours.
Try this: (Edited)

pawn Код:
format(text, sizeof(text), "{FF0000}Sell\n{FF0000}Name: {FFFFFF}%s\n{FF0000}Price: {FFFFFF}%d", name,price);
------
HEXs:
{FF0000} - Yellow
{FFFFFF} - White


Re: Hello, i need change color - Laure - 08.06.2014

Try this after COLOR_YELLOW defined
pawn Код:
format(text, sizeof(text), "{FFFF00}SELL\nName: {FFFFFF}%s\n{FFFF00}Hind: {FFFFFF}%d", name,price);



Re: Hello, i need change color - iFiras - 08.06.2014

No need for COLOR_YELLOW to be defined, he can use HEX colours properly without any defines.


Re: Hello, i need change color - Laure - 08.06.2014

Ok i got the idea now thanks, and yea btw when i did Post Quick Reply i saw your post before me