Array index help. - 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: Array index help. (
/showthread.php?tid=389619)
Array index help. -
Michael98 - 02.11.2012
Well i have just started working with arrays.
But none of the tutorials helped me to understand something.
How can i store an object model id to an array?
Re: Array index help. -
YoYo123 - 02.11.2012
To define an array you need to type in the following thing:
This is like making a normal variable but this variable stores some things in it.
Indexes in arrays start with 0. So if you want to assign a value to a place in the array, for example for place 0:
Код:
array[0] = somevalue;
array[1] = anothervalue; //etc.
If you still don't understand give me more details about what you don't understand.
Re: Array index help. -
Michael98 - 02.11.2012
Quote:
Originally Posted by YoYo123
To define an array you need to type in the following thing:
This is like making a normal variable but this variable stores some things in it.
Indexes in arrays start with 0. So if you want to assign a value to a place in the array, for example for place 0:
Код:
array[0] = somevalue;
array[1] = anothervalue; //etc.
If you still don't understand give me more details about what you don't understand.
|
I have understand this..I want to store the model of some objects to an array.How can this be possible?