Loop - 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: Loop (
/showthread.php?tid=618917)
Loop -
Razturach - 11.10.2016
I've got like 100 textdraws and I'm seeking for better option than using TextDrawShowForPlayer 100x, is there any easier way? Like looping somehow? I believe there is easier way but the point is i don't know how to use that loop in this case
Re: Loop -
oMa37 - 11.10.2016
PHP код:
new Text3D:TextDraws[3];
//OnGameModeInit
TextDraws[0] = TextDrawCreate(..);
TextDraws[1] = TextDrawCreate(..);
TextDraws[2] = TextDrawCreate(..);
//Show them
for(new i; i < sizeof(TextDraws); i++)
{
TextDrawShowForPlayer(playerid, TextDraws[i]);
}
This should work.
Re: Loop -
Razturach - 11.10.2016
Thank you, rep+ for you