botanist Posted January 25, 2011 Posted January 25, 2011 crun setElementCollidableWith ( getPedOccupiedVehicle(localPlayer), getElementsByType("vehicle"), false ) When doing that with Runcode, my game crashes. Wtf? My fault, or bug?
DakiLLa Posted January 25, 2011 Posted January 25, 2011 The second parameter of this function is invalid in your case. As the wiki says, it should be an element (but getElementsByType returns a table). So I think that this function crashes the client if invalid parameters were passed in it. for i, v in ipairs( getElementsByType( 'vehicle' ) ) do setElementCollidableWith( getPedOccupiedVehicle(localPlayer), v, false ) end Should work fine.
botanist Posted January 26, 2011 Author Posted January 26, 2011 Bad, bad. And there's no vehicle root or something?
Arran Posted January 26, 2011 Posted January 26, 2011 crun for ind, car in pairs(getElementsByType("vehicle")) do setElementCollidableWith(getPedOccupiedVehicle(localPlayer), car, false) end
botanist Posted January 26, 2011 Author Posted January 26, 2011 That's the same what Dakilla send me, Arran.
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