SA-MP Forums Archive
TextDraw HELP - 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 HELP (/showthread.php?tid=565642)



TextDraw HELP - Fantje - 28.02.2015

Hiye!

I wanna change a textdraw,

It looks in-game like so: Deaths: (deaths) Kills: (kills)

How I want it to have:

Deaths: (deaths)
Kills: (kills)


How can I make it above eachother?

My code:

PHP код:
    Stats[playerid] = TextDrawCreate(485.000000300.000000"~r~Kills: ~w~0 ~g~Deaths: ~w~0");
    
TextDrawBackgroundColor(Stats[playerid], 255);
    
TextDrawFont(Stats[playerid], 2);
    
TextDrawLetterSize(Stats[playerid], 0.3500001.100000);
    
TextDrawColor(Stats[playerid], -1);
    
TextDrawSetOutline(Stats[playerid], 0);
    
TextDrawSetProportional(Stats[playerid], 1);
    
TextDrawSetShadow(Stats[playerid], 1); 
( I am new here so I'm really really noob, but every one have to learn it. )


Re: TextDraw HELP - Michael B - 28.02.2015

Hmm...by using \n ?
It's the 'replacer' of Enter or <br> from HTML.

I usually create different textdraws...never made two in the same code with different positions.


Re: TextDraw HELP - ball - 28.02.2015

Код:
"~r~Kills: ~w~0~n~~g~Deaths: ~w~0"
~n~ creates new line. Also put ~n~in the string update


Re: TextDraw HELP - Fantje - 28.02.2015

I know everything about HTML yes, okay I'll try


Re: TextDraw HELP - Fantje - 28.02.2015

EDIT: ~n~ doesn't work


Re: TextDraw HELP - Fantje - 28.02.2015

Anyone?


Re: TextDraw HELP - Golf - 28.02.2015

PHP код:
new newtext[41];
format(newtextsizeof(newtext), "Deaths: (%s) \n Kills: (%s)"yourdeathvar,yourkillsvar);
TextDrawSetString(Stats[playerid], newtext);
TextDrawShowForPlayer(playeridStats[playerid]); 



Re: TextDraw HELP - Fantje - 28.02.2015

It's fixed