Textdraw
#1

Hi Guys,

I need help to make a Textdraw that every letter changes the color of it.

For Example:



Regards *******12.
Reply
#2

https://sampwiki.blast.hk/wiki/GameTextStyle#Text_Styles look at the colors on the beggining. What you need to do is put a string like this:" H~b~e~r~l~g~l~y~o" and it will send colored Hello.
Reply
#3

Look the video and see what I mean

http://tinypic.com/player.php?v=f2byd&s=6
Reply
#4

This is quite boring but easy to do

First, create a textdraw variable and another variable which we will need to color specific word.
pawn Код:
new Text:Textdraw0;
new Textdraw0_var=0;
Now, UnderOnGameModeInit create TD and a timer
pawn Код:
public OnGameModeInit()
{
    /*Your Textdraw create code*/
    SetTimer("UpdateTextdraw0",500,true);
}
Now, Add this anywhere
pawn Код:
forward UpdateTextdraw0();
public UpdateTextdraw0()
{
    switch(Textdraw0_var)
    {
        case 0 : TextDrawSetString(Textdraw0,"~r~H~w~ello");
        case 1 : TextDrawSetString(Textdraw0,"~W~H~g~e~w~llo");
        case 2 : TextDrawSetString(Textdraw0,"~w~He~b~l~w~lo");
        case 3 : TextDrawSetString(Textdraw0,"~w~Hel~y~l~w~o");
        case 4 : TextDrawSetString(Textdraw0,"~w~Hell~r~o");
    }
    if(Textdraw0_var == 4) Textdraw0_var = -1;
    ++Textdraw0_var;
    return 1;
}
Reply
#5

Thank you Men
Reply
#6

Only 1 problem,



The Size Letter is small

My Code:


Код:
        SetTimer("UpdateTextdraw2",1000,true);
	Textdraw00 = TextDrawCreate(498.0000, 8.0000, "www.test.com");
	TextDrawAlignment(Textdraw00,3);
	TextDrawAlignment(Textdraw00,3);
	TextDrawBackgroundColor(Textdraw00,0x000000ff);
	TextDrawBackgroundColor(Textdraw00,0x000000ff);
	TextDrawFont(Textdraw00,3);
	TextDrawLetterSize(Textdraw00,0.299999,3.399999);
	TextDrawFont(Textdraw00,3);
	TextDrawLetterSize(Textdraw00,0.199999,3.000000);
	TextDrawColor(Textdraw00,0xffffffff);
	TextDrawColor(Textdraw00,0xffffffff);
	TextDrawSetOutline(Textdraw00,3);
	TextDrawSetProportional(Textdraw00,3);
	TextDrawSetProportional(Textdraw00,3);
	TextDrawSetShadow(Textdraw00,3);
	TextDrawSetShadow(Textdraw00,3);
When I change the Letter Size to

Код:
	TextDrawLetterSize(Textdraw00,3.199999,3.000000);
Nothing happen

Help me pls

Regards
Reply
#7

Код:
TextDrawLetterSize(Textdraw00, 0.541100, 1.200000);
~ This is mine. It's medium sized. I edited so you can just put it into your script.
Reply
#8

Nothing happend again,
Can u give me your TextDraw Create Code?

Regards
Reply
#9

Recommending this(Sorry I fell asleep :/ ) : http://bsndesign.webs.com/tde.htm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)