Hey, Just a quick question. - 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: Hey, Just a quick question. (
/showthread.php?tid=164525)
Hey, Just a quick question. -
Anthony_Brassi - 31.07.2010
Hey guys, I just wanted to know, I've got 42 prison cells, and I've got it set up like this
new CellB1[22];
new CellB2[22];
B1 Being the Cell Block.
pawn Код:
CellB1[1] =CreateDynamicObject(980, 829.20391845703, -2425.1486816406, 26.631416320801, 0, 270.67492675781, 19.81982421875);
CellB1[2] =CreateDynamicObject(980, 825.20092773438, -2426.6188964844, 26.631416320801, 0, 270.67016601563, 19.81982421875);
CellB1[3] =CreateDynamicObject(980, 821.05499267578, -2428.115234375, 26.631416320801, 0, 270.67016601563, 19.81982421875);
I just cant figure out how to set it up, easy as can be, I don't want to have to do a variable for every cell checking whether its opened or not, new CellsOpened[CellB1][OpenedInfo];
Can someone tell me a way to do it like that?
Re: Hey, Just a quick question. -
Ash. - 31.07.2010
A loop?
pawn Код:
for (new i = 0; i < CellB1[22]; i++)
{
//Then the thing to check if 1 cell is open, but instead of using "CellB1[1]" use: CellB1[i]
}
Re: Hey, Just a quick question. -
Anthony_Brassi - 31.07.2010
I'm sorry, I know how to use loops, But how would i check to see if its Opened like that?
Re: Hey, Just a quick question. -
Conroy - 31.07.2010
Better creating an enum.