19.01.2012, 22:10
pawn Код:
stock GetEmptySeat(vehicleid)
{
new bool:taken[4], Model = GetVehicleModel(vehicleid);
foreach(Player, i)
{
if(IsPlayerInVehicle(i, vehicleid))
{
for(new j = 0; j < VehicleSeats[Model-400]; j++)
{
if(GetPlayerVehicleSeat(i) == j) Taken[j] = true;
}
for(new k = 0; k < sizeof(Taken); k++)
{
if(Taken[k] == false) return 0;
}
}
}
return 1;
}