M MY Multiplayer: Wiki
Side
Kind

getPedOccupiedVehicleSeat

Shared

Gets the seat a ped or player takes in its vehicle.

int|false getPedOccupiedVehicleSeat(ped ped)

Parameters

NameTypeDescription
pedpedThe ped or player.

Returns

The seat (0 is the driver, 1 and up the passengers), or false if the ped is not in a vehicle or the element is not a ped.

Example

addCommandHandler("seat", function(player)
    if getPedOccupiedVehicleSeat(player) == 0 then
        outputDebugString(getPlayerName(player) .. " is driving")
    end
end)

See also