getPedOccupiedVehicleSeat
Shared
Gets the seat a ped or player takes in its vehicle.
int|false getPedOccupiedVehicleSeat(ped ped)
Parameters
| Name | Type | Description |
|---|---|---|
| ped | ped | The 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)