Jump to content

Help My in open Gate all player


kevincouto6

Recommended Posts

-- ------------------------------------------------------------------------------------------------------------------------------
local uMainGate = createObject ( 980, 1213.7659912109, -2042.3292236328, 66.699996948242, 0, 0.24169921875, 89.741821289063 )
local uColShape = createColCircle ( 1213.7659912109, -2042.3292236328, 10, 10 )

setElementDoubleSided(uMainGate, true);
-- ------------------------------------------------------------------------------------------------------------------------------

local function open (element)
    if getElementType(element) ~= 'player' then
        return
    end
    
        moveObject ( uMainGate, 1500 , 1213.7340087891, -2049.1142578125, 66.699996948242 )
    end
end


local function close (element)
    if getElementType(element) ~= 'player' then
        return
    end
        moveObject ( uMainGate, 2000, 1213.7659912109, -2042.3292236328, 66.699996948242 )
    end
end

-- ------------------------------------------------------------------------------------------------------------------------------
addEventHandler ( "onColShapeHit", uColShape, open)
addEventHandler ( "onColShapeLeave", uColShape, close)
-- ------------------------------------------------------------------------------------------------------------------------------


Link to comment

local uMainGate = createObject ( 980, 1214.0751953125, -2037.2841796875, 67.3203125, 0, 0.24169921875, 89.741821289063 )
local uColShape = createColCircle ( 1213.7659912109, -2042.3292236328, 10, 10 )

setElementDoubleSided(uMainGate, true);
-- ------------------------------------------------------------------------------------------------------------------------------

function open ()
        moveObject ( uMainGate, 1500 , 1213.7340087891, -2049.1142578125, 66.699996948242 )
    end

	function closer()
moveObject ( uMainGate, 2000, 1214.0751953125, -2037.2841796875, 67.3203125 )	
	end

  
        
  

-- ------------------------------------------------------------------------------------------------------------------------------
addEventHandler ( "onColShapeHit", uColShape, open)
addEventHandler ( "onColShapeLeave", uColShape, closer)
-- ------------------------------------------------------------------------------------------------------------------------------

 

is this what you are looking for?
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...