TextDraws: Is it possible to place them in arrays?
#1

Код:
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?
Reply
#2

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

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

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)