marty000123 Posted March 3, 2017 Share Posted March 3, 2017 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? Link to comment
3aGl3 Posted March 3, 2017 Share Posted March 3, 2017 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 Link to comment
^iiEcoo'x_) Posted March 3, 2017 Share Posted March 3, 2017 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
marty000123 Posted March 4, 2017 Author Share Posted March 4, 2017 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. 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now