Jump to content

setElementCollisionsEnabled and helicopters


Feche1320

Recommended Posts

Hi,

I have this strange issue with setElementCollisionsEnabled, the helicopter rotor still has collisions enabled, as you can see on the image.

Here is my script:

function disableCollisions()
	local ghostmode = true
	local tp = getElementData(localPlayer, "room_id")
	if tp == "Shooter" then
		ghostmode = getElementData(root, "shooter.ghostmode")
	elseif tp == "OJ" then 
		ghostmode = getElementData(root, "oj.ghostmode")
	end
	local vehicles = getElementsByType("vehicle", root, true)
	for i = 1, #vehicles do
		for k = 1, #vehicles do
			setElementCollidableWith(vehicles[i], vehicles[k], getElementInterior(vehicles[i]) == 100 and false or not ghostmode)
		end
	end
	local players = getElementsByType("player", root, true)
	for i = 1, #players do
		setElementCollisionsEnabled(players[i], players[i] == localPlayer and true or false)
	end
end

Is there any way to disable this? thanks

HO14XFv.png

Edited by Feche1320
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...