Hey, Just a quick question.
#1

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?
Reply
#2

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]
}
Reply
#3

I'm sorry, I know how to use loops, But how would i check to see if its Opened like that?
Reply
#4

Better creating an enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)