Jump to content

getVehicleOccupants


Recommended Posts

Posted

Hey guys, please I want help, why this doesn't work

local vehicle = getPedOccupiedVehicle(player)
local occupants = getVehicleOccupants(vehicle)
removePedFromVehicle ( occupants )

 

76561198387870432.png

ZI ZOMBIE INFECTION: mtasa://5.196.7.163:22003

560x95_FFFFFF_FF9900_000000_000000.png

Posted

Because removePedFromVehicle accepts players, not a table.

local vehicle = getPedOccupiedVehicle(player)
local occupants = getVehicleOccupants(vehicle)
for i, k in pairs(occupants) do
	removePedFromVehicle(k)
end

 

  • Thanks 1

6C73yFv.png

Did I help you?

Mmpe7Jm.gif


NeXuS™#0001

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