Jump to content

expected argument got boolean >.<


Recommended Posts

2 hours ago, marty000123 said:

function moveBarrier(hitPlayer, matchingDimension)
if (getElementType(hitPlayer) ~= "player") then return end
local theVehicle = getPlayerOccupiedVehicle ( hitPlayer )
local id = getVehicleID ( theVehicle )

 

Expected argument at getVehicleID, got boolean.

Help?

Use ,

getElementModel

 

Link to comment
13 hours ago, 3aGl3 said:

Could it be the player isn't in a vehicle?
You should do something like


local vehicle = getPedOccupiedVehicle( hitPlayer )
if vehicle then
  local id = getVehicleID( vehicle )
  ...
end

 

I'll give this a try, thanks.

13 hours ago, #_iMr.[E]coo said:

Use ,


getElementModel

 

And I will try this as well, thx.

  • Like 1
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...