Hallo Leute,
habe folgendes Problem:
So speichere ich die Startpositionen und die Checkpoints von meinen Rennen:
MAXPos und MAX muss aber bei jedem Rennen anders sein.
new Float:pos0[MAXPos][4] =
{
{490.0,-2357.0,2.7,180.0},
{500.0,-2357.0,2.7,180.0},
{510.0,-2357.0,2.7,180.0},
{520.0,-2357.0,2.7,180.0},
{530.0,-2357.0,2.7,180.0},
{540.0,-2357.0,2.7,180.0},
{550.0,-2357.0,2.7,180.0}
};
new Float:cp0[MAX][3] =
{
{520.0020,-2500.1509,60.4966},
{520.0020,-2550.1509,60.4966},
{520.0020,-2600.1509,60.4966},
{520.0020,-2661.1509,60.4966},
{520.0020,-2700.1509,60.4966},
{520.0020,-2751.1509,60.4966},
{520.0020,-2800.1509,60.4966},
{520.0020,-2851.1509,60.4966}
};
new Float:pos1[MAXPos][4] =
{
{490.0,-2357.0,2.7,0.0},
{500.0,-2357.0,2.7,0.0},
{510.0,-2357.0,2.7,0.0},
{520.0,-2357.0,2.7,0.0},
{530.0,-2357.0,2.7,0.0},
{540.0,-2357.0,2.7,0.0},
{550.0,-2357.0,2.7,0.0}
};
new Float:cp1[MAX][3] =
{
{520.0020,-2500.1509,60.4966},
{520.0020,-2550.1509,60.4966},
{520.0020,-2600.1509,60.4966},
{520.0020,-2661.1509,60.4966},
{520.0020,-2700.1509,60.4966},
{520.0020,-2751.1509,60.4966},
{520.0020,-2800.1509,60.4966},
{520.0020,-2851.1509,60.4966}
};
Die Checkpoints setze ich so:
SetPlayerRaceCheckpoint(playerid, 3, cp[count][0], cp[count][1], cp[count][2], cp[count+1][0], cp[count+1][1], cp[count+1][2], 10);
Die Vehicles so:
dcar[playerid] = AddStaticVehicle(513, pos[spawnvar][0], pos[spawnvar][1], pos[spawnvar][2], pos[spawnvar][3], -1, -1);
Bloß wie bekomme ich jetzt das so hin, dass er mir per Zufall eines der Rennen loadet?
Vg Basti