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



Textdraws - arlindi - 14.07.2015

Hello can someone help mee how to create something with textdraws
example if i have some textdraws

like

TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw;

and can i call like an group


TextDrawShowForPlayer(playerid, LOGIN TEXTDRAWS); ?

Thanks tell mee how can i do this
Thanks


Re: Textdraws - Virtual1ty - 14.07.2015

Make an array of textdraws and loop through them to show them:
PHP код:
// declare an array
new tdSomething[10];
// create text draws
tdSomething[0] = CreateTextDraw(...);
...
tdSomething[9] = CreateTextDraw(...);
// loop through all 10 text draws
for (new 0sizeof(tdSomething); i++)
{
    
// show text draws to all players
    
TextDrawShowForAll(tdSomething[i]);




Re: Textdraws - SpikY_ - 14.07.2015

I think no, cause a textdraw contain fonts, background, letter size, color, coordinates etc
So you may create the textdraws in correct order. ( use TD editors )


Re: Textdraws - arlindi - 14.07.2015

i have already
just from 5 Textdrawshowforplayer to call it as 1


Re: Textdraws - SpikY_ - 14.07.2015

Quote:
Originally Posted by Virtual1ty
Посмотреть сообщение
Make an array of textdraws and loop through them to show them:
PHP код:
// declare an array
new tdSomething[10];
// create text draws
tdSomething[0] = CreateTextDraw(...);
...
tdSomething[9] = CreateTextDraw(...);
// loop through all 10 text draws
for (new 0sizeof(tdSomething); i++)
{
    
// show text draws to all players
    
TextDrawShowForAll(tdSomething[i]);

Then try this...


Re: Textdraws - Vince - 14.07.2015

This is when you create functions, to move large chunks of repeated code away from the main block.