Textdraws
#1

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
Reply
#2

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]);

Reply
#3

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 )
Reply
#4

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

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...
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)