pepsi18 Posted May 6, 2014 Share Posted May 6, 2014 is possible a vehicle not collide with objects and players Link to comment
Castillo Posted May 6, 2014 Share Posted May 6, 2014 You can disable the collision with the function: setElementCollidableWith Link to comment
pepsi18 Posted May 6, 2014 Author Share Posted May 6, 2014 While this will be ? addEventHandler("onVehicleEnter",root,function() if getElementModel(source) == 411 then for index,Object in ipairs(getElementsByType("Object")) do setElementCollidableWith(source, Object, false); end; end; end); Link to comment
Castillo Posted May 6, 2014 Share Posted May 6, 2014 setElementCollidableWith is a client side function. Link to comment
pepsi18 Posted May 6, 2014 Author Share Posted May 6, 2014 mmm now ? addEventHandler("onClientVehicleEnter",root,function() if getElementModel(source) == 411 then for index,Object in ipairs(getElementsByType("Object")) do setElementCollidableWith(source, Object, false); end; end; end); Link to comment
Castillo Posted May 6, 2014 Share Posted May 6, 2014 It's "object" lower case, not "Object" at getElementsByType. Link to comment
pepsi18 Posted May 6, 2014 Author Share Posted May 6, 2014 It's "object" lower case, not "Object" at getElementsByType. thanks works well 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