Akkkor le kellett volna írni érhetõbben....
Probáld meg evvel a függvénnyel:
[pawn]forward VehicleOccupied(vehicleid);
public VehicleOccupied(vehicleid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}[/pawn]
Majd,egy parancs alá berakod:
[pawn]if(VehicleOccupied(car1))
{
PutPlayerInVehicle(playerid, car2, 0);
}else{
PutPlayerInVehicle(playerid, car1, 0);
}
[/pawn]