02.08.2015, 09:02
Put many checkpoints will make the change to be the same cp littlest
EDIT: Or you could try something like that:
EDIT: Or you could try something like that:
Код HTML:
new CPs[8][3] = { { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 } } new pLastCP[MAX_PLAYERS]; // where you set new rNum = random(sizeof(CPs)); SetPlayerCheckPoint(playerid, CPs[rNum][0], CPs[rNum][1], CPs[rNum][2], 1.0); pLastCP[playerid] = rNum; // Where you give another CP new rNum = random(sizeof(CPs)); if(rNum == pLastCP[playerid) { if(rNum == 8) { SetPlayerCheckPoint(playerid, CPs[rNum-1][0], CPs[rNum-1][1], CPs[rNum-1][2], 1.0); pLastCP[playerid] = (rNum - 1); } if(rNum < 8) { SetPlayerCheckPoint(playerid, CPs[rNum+1][0], CPs[rNum+1][1], CPs[rNum+1][2], 1.0); pLastCP[playerid] = (rNum - 1); } }