Help gametext
#1

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.
Reply
#2

I think you can't define it.
Reply
#3

You cant
Reply
#4

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.
Reply
#5

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

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

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);
        }
Reply
#8

It is possible...
Do what as DobbysGamertag said.
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)