26.05.2010, 11:50
pawn Code:
new Float:coords[][4] =
{
{X, Y, Z, A},
{X, Y, Z, A}.
{X, Y, Z, A},
{X, Y, Z, A}
};
new rand = random(sizeof(coords));
SetPlayerPos(playerid, coords[rand][0], coords[rand][1], coords[rand][2]);
SetPlayerFacingAngle(playerid, coods[rands][3]);
So if random picks 1 (out of 4) it will then store that into rand.
Then you're setting pos via coords[rand][0], so if random picks 1 and stores that into rand, rand is 1, so it's basicly saying:
coords[1][0], remember you're calling it once, not calling it when you use coords[rand][0].
Simpler:
Random picks a number out of how many sets there are, stores the number into rand, then you're using rand (which is a number).

