SA-MP Forums Archive
Is it possible to merge 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: Is it possible to merge textdraws? (/showthread.php?tid=454686)



Is it possible to merge textdraws? - RandomDude - 29.07.2013

So I have 10 TextDraw's I want to put them all in one and not make
new TextDraw1;
new TextDraw2;
...

I just want to make it all in one so I type
new TextDrawAll;


Re: Is it possible to merge textdraws? - -Prodigy- - 29.07.2013

pawn Код:
new Text: textdraw[11];

textdraw[0] = CreateTextDraw(..);
textdraw[1] = CreateTextDraw(..);
// and so on

for(new i = 0; i < sizeof(textdraw); i++)
{
    TextDrawShowForAll(textdraw[i]); // Shows all textdraws to everyone
}



Re: Is it possible to merge textdraws? - RandomDude - 30.07.2013

why
new Text: textdraw[11];
why 11 and not 10??


Re: Is it possible to merge textdraws? - Kirollos - 30.07.2013

Quote:
Originally Posted by RandomDude
Посмотреть сообщение
why
new Text: textdraw[11];
why 11 and not 10??
putting 11 means that you have 11 slots (from 0 to 10)

if you put 10 then you will have 10 slots (from 0 to 9)

and etc..


Re: Is it possible to merge textdraws? - RandomDude - 30.07.2013

Oh silly me.
Thank you very much. rep + each


Re: Is it possible to merge textdraws? - MP2 - 30.07.2013

If you have 10 textdraws, you need 10 elements in your array, not 11..