Creating Objects with arrays
#10

Try this:

Код:
new Float:gObjects[6][6] =
{
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0,
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0,
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0,
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0,
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0,
    1235.12, 2322.23, 55.23, 0.0, 0.0, 0.0
};

new gObjectsID[6] =
{
    2323,
    2323,
    2323,
    2323,
    2323,
    2323
};

new Float:ObjConfig[6][4] =
{
    -1, -1, -1, 300.0,
    -1, -1, -1, 300.0,
    -1, -1, -1, 300.0,
    -1, -1, -1, 300.0,
    -1, -1, -1, 300.0,
    -1, -1, -1, 300.0,
};

//and then a function to create it.

for(new i = 0; i < 6; i++)//Looping through 6, since there are only 6 objects.
{
    CreateDynamicObject(gObjectID[i], gObject[i][0], gObject[i][1], gObject[i][2], gObject[i][3], gObject[i][4], gObject[i][5], ObjConfig[i][0], ObjConfig[i][1], ObjConfig[i][2]);
}
Reply


Messages In This Thread
Creating Objects with arrays - by Toni - 28.07.2010, 02:22
Re: Creating Objects with arrays - by mastasquizy - 28.07.2010, 02:29
Re: Creating Objects with arrays - by Toni - 28.07.2010, 02:34
Re: Creating Objects with arrays - by mastasquizy - 28.07.2010, 02:41
Re: Creating Objects with arrays - by Toni - 28.07.2010, 02:45
Re: Creating Objects with arrays - by John_F - 28.07.2010, 02:52
Re: Creating Objects with arrays - by mastasquizy - 28.07.2010, 03:05
Re: Creating Objects with arrays - by smeti - 28.07.2010, 07:54
Re: Creating Objects with arrays - by ikey07 - 28.07.2010, 08:23
Re: Creating Objects with arrays - by deather - 28.07.2010, 09:22

Forum Jump:


Users browsing this thread: 8 Guest(s)