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



Showing textdraws - UnknownOwner - 02.06.2014

Hey guys, so i am kinda new to scripting stuff, and i wanted to ask;

Is there a possible way of showing like 15 textdraws in 2-3 lines?

Like, if i have:

Код:
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
.......
.
Is there a way to show these in 1-2 lines?

Thanks in advance!


Re: Showing textdraws - kamiliuxliuxliux - 02.06.2014

You mean
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0);  TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4); TextDrawShowForPlayer(playerid, Textdraw5); TextDrawShowForPlayer(playerid, Textdraw6); TextDrawShowForPlayer(playerid, Textdraw7);
//etc...
?



Re: Showing textdraws - Vince - 02.06.2014

An array and a loop. But unless you have like 50 or so I don't really see the need to do that. Less code does not always equal better code.