Help /arrest
#2

First, store the cell coordinates in an array (add your own coordinates):
pawn Код:
new Float:cells[][3] = {
{ 200.0, 13.45, 1.45 },
{ 210.0, 17.45, 1.45 },
{ 200.0, 18.45, 2.85 }
};
Then where you have to put the player in prison, use this code:
pawn Код:
new cell_id = random(sizeof cells); // this will calculate a random cell, and store it in variable cell_id
SetPlayerPos(playerid, cells[cell_id][0], cells[cell_id][1], cells[cell_id][2]); // this will put the player in the coordinates of the random cell
Reply


Messages In This Thread
Help /arrest - by Danchy - 31.10.2011, 10:20
Re: Help /arrest - by KoczkaHUN - 31.10.2011, 11:32
Re: Help /arrest - by Danchy - 31.10.2011, 13:09

Forum Jump:


Users browsing this thread: 1 Guest(s)