Hey,
ich wollte mal wissen, ob das hier funktionieren würde. Ich kann es nicht testen, da ich einen User
mehr auf meinem Server bräuchte.
Mein Code zum Spawnen sieht so aus:
for(new i=0; i<sizeof(dcrosscar); i++)
{
if(FreeDPlace[i] != -1) continue;
else {
PutPlayerInVehicle(playerid,dcrosscar[i][vehid],0); break;
}
}
Autos die erstellt wurden:
enum DerbyCars { vehid, modelid, Float:SpawnX, Float:SpawnY, Float:SpawnZ, Float:SpawnA, vworld }
new dcrosscar[8][DerbyCars] = {
{-1,415,3689.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3693.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3697.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3701.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3705.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3709.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3713.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3717.0,-2167.6731,9.0553,359.4659,1} // DerbyPOS
};
new dcrosscar[8][DerbyCars] = {
{-1,415,3689.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3693.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3697.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3701.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3705.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3709.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3713.0,-2167.6731,9.0553,359.4659,1}, // DerbyPOS
{-1,415,3717.0,-2167.6731,9.0553,359.4659,1} // DerbyPOS
};
new FreeDPlace[sizeof(dcrosscar)] = -1;
for(new i=0; i<sizeof(dcrosscar); i++)
{
dcrosscar[i][vehid] = CreateVehicle(dcrosscar[i][modelid],dcrosscar[i][SpawnX],dcrosscar[i][SpawnY],dcrosscar[i][SpawnZ],dcrosscar[i][SpawnA],-1,-1,-1);
}
{
dcrosscar[i][vehid] = CreateVehicle(dcrosscar[i][modelid],dcrosscar[i][SpawnX],dcrosscar[i][SpawnY],dcrosscar[i][SpawnZ],dcrosscar[i][SpawnA],-1,-1,-1);
}