02.08.2015, 09:12
PHP код:
//global at the top of the script:
new LastCheckpoint[MAX_PLAYERS];
new Float:RandomCheckpoints[][] =
{
{123.145,123.123,123.123},
{156.156,156.156,156.156}
};
//Where you want to use it:
RandomCheckpoint_goto:
new rand = random(sizeof(RandomCheckpoints));
if(rand == LastCheckpoint[playerid])goto RandomCheckpoint_goto;
LastCheckpoint[playerid] = rand;
SetPlayerCheckpoint(playerid,RandomCheckpoints[rand][0],RandomCheckpoints[rand][1],RandomCheckpoints[rand][2]);
![Wink](images/smilies/wink.png)
If anyone have a better idea how it is solvable without goto please let me know it
![Wink](images/smilies/wink.png)