01.03.2012, 18:21
I am making a job that sends people random checkpoints to go to and get stuff, anyways I want to add more checkpoints but I am not to sure on how.
here is my variable that stores the cords of the checkpoints
and here is the function I use to send them to a random one
so how would I add more checkpoints to this?
here is my variable that stores the cords of the checkpoints
pawn Код:
new Float: checkpoints[5][4] =
{
{ 2798.1702,-1576.2926,10.9272, 10.0 },
{ 2060.4375,-2091.2126,13.5469, 10.0 },
{ 070.8125,-2384.6160,13.5469, 10.0 },
{ 900.7358,-1204.0779,16.9832, 10.0 },
{ 800.1103,-1542.8258,13.5526, 10.0 }
};
pawn Код:
new rand = random(sizeof(checkpoints));
SetPlayerCheckpoint(playerid,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3]);