Vehicle Seats!
#6

Quote:
Originally Posted by Juvanii
Посмотреть сообщение
Thank you all, but another question: can i check which seat id is UnOccupied (empty) ?
pawn Код:
stock GetFreeSeat(vehicleid)
{
    foreach(new i: Player) {
        if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid) {
            for(new j = 0; j < 9; j++) {
                  if(GetPlayerVehicleSeat(i) == j) continue;
                  else return j;
            }
            return -1;
        }
    }
    return 1;
}
Will only work for occupied vehicles though
Reply


Messages In This Thread
Vehicle Seats! - by Juvanii - 03.08.2014, 13:42
Re: Vehicle Seats! - by McBan - 03.08.2014, 13:54
Re: Vehicle Seats! - by Threshold - 03.08.2014, 14:05
Re: Vehicle Seats! - by [XST]O_x - 03.08.2014, 14:06
Re: Vehicle Seats! - by Juvanii - 03.08.2014, 14:34
Re: Vehicle Seats! - by [XST]O_x - 03.08.2014, 14:56
Re: Vehicle Seats! - by Juvanii - 07.08.2014, 15:26
Re: Vehicle Seats! - by [XST]O_x - 07.08.2014, 17:43
AW: Re: Vehicle Seats! - by Nero_3D - 08.08.2014, 02:44
Re: AW: Re: Vehicle Seats! - by [XST]O_x - 08.08.2014, 06:39

Forum Jump:


Users browsing this thread: 1 Guest(s)