19.02.2009, 21:13
pawn Code:
const MAX_POSITIONS = 3;
static Float:Positions[MAX_POSITIONS][4] =
{
{0.0, 0.0, 0.0, 0.0},
{0.0, 0.0, 0.0, 0.0},
{0.0, 0.0, 0.0, 0.0}
}, bool:taken[MAX_POSITIONS];
new freePos;
for(; freePos < MAX_POSITIONS; freePos++)
if(!taken[freePos]) break;
if(freePos == MAX_POSITIONS) return; //no free positions left
SetPlayerPos(playerid, Positions[freePos][0], Positions[freePos][1], Positions[freePos][2]);
SetPlayerFacingAngle(playerid, Positions[freePos][3]);
taken[freePos] = true;