Random Arrays
#4

one 3d array should suffice.
pawn Код:
new Float:testarray[2][2][3] =
{
    {
        {0.0, 0.0, 0.0},
        {1.0, 1.0, 1.0}
    },{
        {0.0, 0.0, 0.0},
        {1.0, 1.0, 1.0}
    }
};

getRandomArray(&Float:x, &Float:y, &Float:z)
{
    new
        first_index = random(sizeof testarray),
        second_index = random(sizeof testarray[]),
        x = testarray[first_index][second_index][0],
        y = testarray[first_index][second_index][1],
        z = testarray[first_index][second_index][2]
    ;
}
Reply


Messages In This Thread
Random Arrays - by Luis- - 06.03.2015, 14:05
AW: Random Arrays - by Kaliber - 06.03.2015, 14:08
Re: Random Arrays - by Luis- - 06.03.2015, 14:13
Re: Random Arrays - by RedFusion - 06.03.2015, 14:17
AW: Re: Random Arrays - by Kaliber - 06.03.2015, 14:18
Re: Random Arrays - by Luis- - 06.03.2015, 14:21
AW: Re: Random Arrays - by Kaliber - 06.03.2015, 14:25
Re: Random Arrays - by Luis- - 06.03.2015, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)