Adding to List / Array - 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: Adding to List / Array (
/showthread.php?tid=165935)
Adding to List / Array -
lolumadd - 06.08.2010
I never learned or found a good / efficient way to do this. How would I make it so when I have a variable "var", how can I keep adding numbers to it in a list.
Код:
var=0
var=0,1
var=0,5,1
Then when I want to get the numbers, I can easily split it. Thanks.
Re: Adding to List / Array -
Sergei - 06.08.2010
Код:
new array[5] = {0,1,2,3,4};
This?
Re: Adding to List / Array -
lolumadd - 06.08.2010
But i want to be able to add numbers to it at any time.
Re: Adding to List / Array -
Sergei - 06.08.2010
pawn Код:
new array[5];
for(new x; x < sizeof(array); x++) if(!array[x]) array[x] = 2;
Re: Adding to List / Array -
lolumadd - 06.08.2010
Thanks a bunch!