08.11.2010, 15:00
Try this:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new vehicleid = INVALID_VEHICLE_ID;
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(!IsVehicleOccupied(i))
{
vehicleid = i;
break;
}
}
if(vehicleid != INVALID_VEHICLE_ID)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
}
else
{
GameTextForPlayer(playerid, "There are no more cars left.", 2500, 3);
}
return 1;
}