SA-MP Forums Archive
Help gametext - 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: Help gametext (/showthread.php?tid=430993)



Help gametext - DetoNater - 16.04.2013

Actually only these colours can be appeared on the GameTextForPlayer right?

Код:
~r~    red
~g~    green
~b~    blue
~w~    white
~y~    yellow
~p~    purple
~l~    black
~n~    new line
~h~    lighter color
i want to add custom colors to the GameTextForPlayer, can any one help me to define it.

Thanks in advance.


Re: Help gametext - LeeXian99 - 16.04.2013

I think you can't define it.


Re : Help gametext - DaTa[X] - 16.04.2013

You cant


Re: Help gametext - DobbysGamertag - 16.04.2013

No need to define it

pawn Код:
GameTextForPlayer(playerid, "~r~BUSTED!", 3000, 0);
That will send the entire message in red. Whereas:

pawn Код:
GameTextForPlayer(playerid, "~r~BUS~b~TED!", 3000, 0);
that will send half in red, half in blue.

pawn Код:
GameTextForPlayer(playerid,"texthere",time in ms here, style here);
as you said though
Код:
~r~    red
~g~    green
~b~    blue
~w~    white
~y~    yellow
~p~    purple
~l~    black
~n~    new line
~h~    lighter color
All these work fine, just add them to wherever you like provided they are inside the " " marks. No need for defines.


Re : Help gametext - DaTa[X] - 16.04.2013

@DobbysGamertag
i think he is asking for custom colors like 0x0DC5F2C8


Re: Help gametext - TomatoRage - 16.04.2013

No these colors just for the dialogs and messages the this don't work on gametext


Re: Help gametext - DetoNater - 16.04.2013

i have seen gametext's with custom colors... but i cant add in my script eg.. see my code

pawn Код:
case 4:
        {
            gTeam[playerid] = T_JAPAN;
            SetPlayerColor(playerid, C_GANG_CRBLUE);
            GameTextForPlayer(playerid, "Japan", 1000, 4);//(here in this line i want "Japan" to be displayed in my custom color)
            CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
        }



Re: Help gametext - Faisal_khan - 16.04.2013

It is possible...
Do what as DobbysGamertag said.


Re: Help gametext - MP2 - 16.04.2013

If you want custom colors embedded in a textdraw you'll have to use multiple textdraws.