SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Need simple help with text colors. (https://forum.sa-mp.com/showthread.php?t=668138)

MichaelScott 22/07/2019 03:15 PM

Need simple help with text colors.
 
So, i have these lines of code:
Code:

        new stringai[100];
        format(stringai,sizeof(stringai),"~ORANDZINE~Pirmas Deathmatch kambarys \t ~w~Zaidžia: %d",zaidziaKamb[1]);
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Kambariai",stringai,"Pasirinkti","Iseiti");

And i want it to change the color few times. ORANDZINE is orange and the ~w~ should be white. But in game, it just displays it without changing the color. Any help? And it is not only with dialongs it is with client messages too.

YouShootIDodge 22/07/2019 03:36 PM

Re: Need simple help with text colors.
 
Hei

These ~w~ ~r~ ~b~ symbols work with only GameText and TextDraws, for Dialogs and ClientMessages you need hex colors, for example if you want the text to be half red and half white this will be the code for dialogs/client messages.

Code:

"{FF0000}This is the red text {FFFFFF} and this is the white text. "

MichaelScott 22/07/2019 04:01 PM

Re: Need simple help with text colors.
 
Thanks, this really helped

ZTz 22/07/2019 05:18 PM

Re: Need simple help with text colors.
 
Quote:

Originally Posted by MichaelScott (Post 4107115)
Thanks, this really helped

No problem


All times are GMT. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.