25.01.2015, 10:15
Sometimes, if the derby has 3 or more players, the "spawn in car" thing gets bugged.
Like, 2 players get spawned in 1 car.
Here's the code:
Like, 2 players get spawned in 1 car.
Here's the code:
pawn Код:
//This is @ OnPlayerSpawn, and if the derby has NOT started.
for(new x; x < 15; x++)
{
if(IsVehicleOccupied(DerbyVehicle[x])) continue;
else PutPlayerInVehicle(playerid, DerbyVehicle[x], 0);
break;
}
pawn Код:
//This is @ my 'ResetDerby' stock.
foreach(Player, i)
{
if(SpawnMode[ i ] != SPAWNMODE_DERBY) continue;
PlayerInfo[ i ][ InDerbyArea ] = 1;
TogglePlayerControllable(i, false);
for(new x; x < 15; x++)
{
if(IsVehicleOccupied(DerbyVehicle[x])) continue;
else PutPlayerInVehicle(i, DerbyVehicle[x], 0);
break;
}
}