How can i get an array to do this...
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Id guess your array with the Coords is multi-dimensional, something like this:

new Float: pickups[][3]

Then you can create your pickups using a for-loop and using the counter as index for your array:

pawn Код:
for(new i = 0; i < sizeof(pickups); i ++) {
    CreatePickup(..., pickups[i][0], pickups[i][1], pickups[i][2]); //with 0,1,2 beeing x,y,z
}
Ahh, i knew it was something, thanks

Another thing, could i enum the array? So instead of 1, 2 and 3 being x, y, z i could actually call them x, y and z.

Like this:

pawn Код:
for(new i = 0; i < sizeof(pickups); i ++) {
    CreatePickup(..., pickups[i][x], pickups[i][y], pickups[i][z]);
}
Thanks
Ash
Reply


Messages In This Thread
How can i get an array to do this... - by Ash. - 30.07.2010, 11:04
Re: How can i get an array to do this... - by Mauzen - 30.07.2010, 11:17
Re: How can i get an array to do this... - by Ash. - 30.07.2010, 11:18
Re: How can i get an array to do this... - by Vince - 30.07.2010, 11:21
Re: How can i get an array to do this... - by Mauzen - 30.07.2010, 11:22
Re: How can i get an array to do this... - by Ash. - 30.07.2010, 11:24
Re: How can i get an array to do this... - by Cameltoe - 30.07.2010, 11:24

Forum Jump:


Users browsing this thread: 2 Guest(s)