17.05.2018, 19:17
Como teria que fazer pra criar um random, entre 3 rotas e fazer uma ser a escolhida, tipo acertar esse cуdigo aqui:
Random Rotas :
SetPlayerCheckpointEx(playerid, X,Y,Z, 8.0);
Код:
new Float:rotas[][] = { // rota 1 {-12.8889,153.9808,999.7769,359.9574}, {-14.7225,154.1146,999.7769,358.8459}, {-17.2141,151.6454,999.7769,90.7408}, {-17.1289,149.5033,999.7769,88.5500}, {-16.9197,147.5242,999.7769,86.9751}, {-17.0082,145.4394,999.7769,88.8385}, {-4.8342,148.1478,1000.0493,7.3137}, {-3.7265,148.7206,1000.0493,354.7095}, {-4.7265,148.7206,1000.0493,354.7095}, {-6.3055,153.1717,999.9245,89.3800} // rota 2 {-12.8889,153.9808,999.7769,359.9574}, {-14.7225,154.1146,999.7769,358.8459}, {-17.2141,151.6454,999.7769,90.7408}, {-17.1289,149.5033,999.7769,88.5500}, {-16.9197,147.5242,999.7769,86.9751}, {-17.0082,145.4394,999.7769,88.8385}, {-4.8342,148.1478,1000.0493,7.3137}, {-3.7265,148.7206,1000.0493,354.7095}, {-4.7265,148.7206,1000.0493,354.7095}, {-6.3055,153.1717,999.9245,89.3800} // rota 3 {-12.8889,153.9808,999.7769,359.9574}, {-14.7225,154.1146,999.7769,358.8459}, {-17.2141,151.6454,999.7769,90.7408}, {-17.1289,149.5033,999.7769,88.5500}, {-16.9197,147.5242,999.7769,86.9751}, {-17.0082,145.4394,999.7769,88.8385}, {-4.8342,148.1478,1000.0493,7.3137}, {-3.7265,148.7206,1000.0493,354.7095}, {-4.7265,148.7206,1000.0493,354.7095}, {-6.3055,153.1717,999.9245,89.3800} };
SetPlayerCheckpointEx(playerid, X,Y,Z, 8.0);