SA-MP Forums Archive
TextDraws: Is it possible to place them in arrays? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: TextDraws: Is it possible to place them in arrays? (/showthread.php?tid=128274)



TextDraws: Is it possible to place them in arrays? - adsy - 16.02.2010

Код:
new Text:textname;
I am looking to create a fair few of these but would like to make it easier for myself by placing the info i need in an array and copying the content.

Is it possible to turn these into arrays?


Re: TextDraws: Is it possible to place them in arrays? - Backwardsman97 - 17.02.2010

What do you mean? Like this?
pawn Код:
new Text:textname[5];



Re: TextDraws: Is it possible to place them in arrays? - Babul - 17.02.2010

yes, its possible. if you want to show up a custom textdraw for each player (jail textdraw consisting time and fee to pay f.ex.), you will need arrayed textdraws. so dont hesitate to try out, you will succeed



Re: TextDraws: Is it possible to place them in arrays? - adsy - 17.02.2010

thanks

ok

heres some code, lets see if i can get this right.

Current
Код:
  Job3Rank1 = TextDrawCreate(490,40,"Support");
  Job3Rank2 = TextDrawCreate(490,40,"Officer");
  Job3Rank3 = TextDrawCreate(490,40,"Constable");
  Job3Rank4 = TextDrawCreate(490,40,"Sergeant");
  Job3Rank5 = TextDrawCreate(490,40,"Chief");
Код:
new Job3RankName[5] = {
"Support",
"Officer",
"Constable",
"Sergeant",
"Chief"
};

for(new i=0; i<sizeof(Job3Rank); i++){
Job3Rank[i] = TextDrawCreate(490,40,Job3RankName[i]);
}
does that look about right?