Need help with Random
#2

pawn Код:
enum _randInfo
{
    Float: minX,
    Float: minY,
    Float: minZ,
    Float: maxX,
    Float: maxY,
    Float: maxZ
}

new randInfo[2][_randInfo] = {
{10, 2, 3, 20, 4, 6},
{20, 4, 2, 40, 5, 10}
};

new rand = random(sizeof  randInfo);
/*
randInfo[rand][minX] = ...
randInfo[rand][minY] = ....
Now you can just use these randomly generated values.
Example:
*/

new gID = GangZoneCreate(randInfo[rand][minX], randInfo[rand][minY], randInfo[rand][maxX], randInfo[rand][maxY]);
Reply


Messages In This Thread
Need help with Random - by arjanforgames - 14.08.2013, 15:42
Re: Need help with Random - by [XST]O_x - 14.08.2013, 15:59

Forum Jump:


Users browsing this thread: 1 Guest(s)