Jump to content

[solved] problem with getPedOccupiedVehicleSeat


dzek (varez)

Recommended Posts

-- checks if player is still driving this vehicle
local vehPlayer = getPedOccupiedVehicle(getLocalPlayer())
if (vehPlayer==veh) then
local seat = getPedOccupiedVehicleSeat(getLocalPlayer())
outputChatBox("xd")
end

after doing getPedOccupiedVehicleSeat, or getPlayerOccupiedVehicleSeat my function stops working (no outputChatBox, or other).. whats wrong?

Edited by Guest
Link to comment
-- checks if player is still driving this vehicle
local vehPlayer = getPedOccupiedVehicle(getLocalPlayer())
if (vehPlayer==veh) then
local seat = getPedOccupiedVehicleSeat(getLocalPlayer())
outputChatBox("xd")
end

after doing getPedOccupiedVehicleSeat, or getPlayerOccupiedVehicleSeat my function stops working (no outputChatBox, or other).. whats wrong?

Edited by Guest
Link to comment
....

I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same.

Trailers don't have drivers so getVehicleOccupant will fail when you want to get "driver of the trailer". Though, getVehicleController will return the driver who tows the trailer (sitting as driver in the truck towing that trailer). Wiki says it all.

Link to comment
....

I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same.

Trailers don't have drivers so getVehicleOccupant will fail when you want to get "driver of the trailer". Though, getVehicleController will return the driver who tows the trailer (sitting as driver in the truck towing that trailer). Wiki says it all.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...