Jump to content

[solved] problem with getPedOccupiedVehicleSeat


dzek (varez)

Recommended Posts

Posted (edited)
-- 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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted (edited)
-- 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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

arghh, i didnt see it :/

how to check if player is driving a vehicle, client-side?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

arghh, i didnt see it :/

how to check if player is driving a vehicle, client-side?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

ohh, weird..

thanks :)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

ohh, weird..

thanks :)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
....

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.

Posted
....

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.

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...