orcun99 Posted June 24, 2017 Posted June 24, 2017 (edited) gate = createObject( 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. gatecol = createColCircle ( 2334.8000488281, 2444.1000976563, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. function openagates(thePlayer) if getElementModel( thePlayer ) == 267 then --Will open only if the player is in the male staff skin moveObject ( gate, 3000, 2334.8000488281, 2444.1000976563, 0 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function function closegates (thePlayer) moveObject ( gate, 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58) end addEventHandler ( "onMarkerLeave", root, closegates ) closegates is not work help pls Edited June 24, 2017 by orcun99
WorthlessCynomys Posted June 24, 2017 Posted June 24, 2017 You use colshape to open it and marker to close it. The problem is with the events. Btw use code sign next time.
orcun99 Posted June 24, 2017 Author Posted June 24, 2017 7 minutes ago, StormFighter said: You use colshape to open it and marker to close it. The problem is with the events. Btw use code sign next time. idk scripting can u replace code?
WorthlessCynomys Posted June 24, 2017 Posted June 24, 2017 14 minutes ago, orcun99 said: addEventHandler ( "onMarkerLeave", root, closegates ) "onColShapeLeave"
Skarbonke Posted June 24, 2017 Posted June 24, 2017 gate = createObject( 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. gatecol = createColCircle ( 2334.8000488281, 2444.1000976563, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. function openagates(thePlayer) if getElementModel( thePlayer ) == 267 then --Will open only if the player is in the male staff skin moveObject ( gate, 3000, 2334.8000488281, 2444.1000976563, 0 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function function closegates (thePlayer) moveObject ( gate, 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58) end addEventHandler ( "onColShapeLeave", root, closegates ) I would recommend to do it with "Client", but maybe it will work
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