Textdraw - 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: Textdraw (
/showthread.php?tid=372266)
Textdraw -
Youtube12 - 25.08.2012
Hi Guys,
I need help to make a Textdraw that every letter changes the color of it.
For Example:
Regards *******12.
Re: Textdraw -
Roko_foko - 25.08.2012
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.
AW: Textdraw -
Youtube12 - 26.08.2012
Look the video and see what I mean
http://tinypic.com/player.php?v=f2byd&s=6
Re: Textdraw -
[MM]RoXoR[FS] - 26.08.2012
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;
}
AW: Textdraw -
Youtube12 - 26.08.2012
Thank you Men
AW: Textdraw -
Youtube12 - 26.08.2012
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
Re: Textdraw -
Akira297 - 26.08.2012
Код:
TextDrawLetterSize(Textdraw00, 0.541100, 1.200000);
~ This is mine. It's medium sized. I edited so you can just put it into your script.
AW: Textdraw -
Youtube12 - 26.08.2012
Nothing happend again,
Can u give me your TextDraw Create Code?
Regards
Re: Textdraw -
Akira297 - 26.08.2012
Recommending this(Sorry I fell asleep :/ ) :
http://bsndesign.webs.com/tde.htm