SA-MP Forums Archive
Material text background 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: Material text background color (/showthread.php?tid=629564)



Material text background color - MerryDeer - 28.02.2017

Hi,

I'am doing like this

new insdasd[20];
format(insdasd,19,"0xFFFFFFFF");
new jngnasd;
jngnasd = strval(insdasd);

And i use jngnasd in material text background color, but not effect that color for here example white..


Re: Material text background color - Vince - 28.02.2017



Color is already an integer. They're usually represented in hexadecimal format. With the emphasis on the last part of that word: decimal. You're converting an integer to a string and then you (are trying to) convert that string back to an integer. That is, well, stupid. Strval also only works with numbers represented in base 10.

Код:
jngnasd = 0xFFFFFFFF;
Awesome variable names too, by the way. /s


Re: Material text background color - MerryDeer - 28.02.2017

But FFFFFFFF part is string

format(insdasd,19,"0x%s", inputecolorstring);