14.06.2017, 21:02
Hey guys, i hope you all are doing ok, well... Today i was wondering if i could create an array in a for, i did this a while ago in php, is there a way to do it in pawn?
ex:
In php:
What i want to do is something similar to this:
But, in a "dynamic" way, i don't know if you get what im trying to say.
This is what i want to do, but it wont work:
You see, i want to make this work so i can use it on "e_selection" which requires an array with objects id on it...
Thanks for reading, i hope you can help me
ex:
In php:
Quote:
<?php for ($i = 1; $i <= 2; $i++) { $test[$i] = $i. ","; echo $test[$i]; } ?> |
Quote:
new Skins[2] = { 1, 2, }; |
This is what i want to do, but it wont work:
Quote:
stock MueblesObjetosIDS(casaid) { new objects[2] = { for(new x = 0; x < 2; x++) { x, } }; return objects; } |
Quote:
ShowModelSelectionMenu(playerid, "Tus muebles", Muebles, MueblesObjetosIDS(casaid), MueblesGuardadosEnCasa(casaid), -16.0, 0.0, -55.0); |