vehicle seat question
#1

hi.
i wanted to make a function like GetFreeVehicleSeat(vehicleid);

but how to make it ?
but it must check if it a 4 door etc pls help
ik the function GetVehileSeat but idk how to make this function maybe for a grab cmd
Reply
#2

Loop all players check if they're inside the vehicle, then get their vehicle seat.
Reply
#3

can you make me the func plls ?
Reply
#4

pawn Код:
stock GetEmptyVehicleSeat(vehicleid)
{
    new bool:Seat[4];
    for(new i;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i,vehicleid))
            {
                if(GetPlayerVehicleSeat(i) == 0) Seat[0] = true;
                if(GetPlayerVehicleSeat(i) == 1) Seat[1] = true;
                if(GetPlayerVehicleSeat(i) == 2) Seat[2] = true;
                if(GetPlayerVehicleSeat(i) == 3) Seat[3] = true;
            }
        }
    }
    for(new a;a<sizeof(Seat);a++)
    {
        if(Seat[a] == false) return a;
    }
    return -1;
}
Returns -1 if there isnt a free seat.
Reply
#5

but what is with biikes and maybe hydra?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)