Fox261098 Posted April 1, 2016 Share Posted April 1, 2016 Hello guys i need help with gate open open how to make it open for one acl group can somone add it on this gate system local markerName = createMarker(411.52252197266, 2533.6247558594, 19.1484375, "cylinder", 1.0, 255,351,512, 255) local gateName = createObject(1553, 412, 2533.8000488281, 19.299999237061, 0, 0, 90) local state = false function markerHitFunction() if (state) then moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) else moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end addEventHandler("onMarkerHit", markerName, markerHitFunction) Link to comment
1LoL1 Posted April 1, 2016 Share Posted April 1, 2016 Hello guys i need help with gate open open how to make it open for one acl group can somone add it on this gate system local markerName = createMarker(411.52252197266, 2533.6247558594, 19.1484375, "cylinder", 1.0, 255,351,512, 255) local gateName = createObject(1553, 412, 2533.8000488281, 19.299999237061, 0, 0, 90) local state = false function markerHitFunction() if (state) then moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) else moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end addEventHandler("onMarkerHit", markerName, markerHitFunction) function markerHitFunction(source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then if (state) then moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) else moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end end addEventHandler("onMarkerHit", markerName, markerHitFunction) Link to comment
Fox261098 Posted April 1, 2016 Author Share Posted April 1, 2016 Hello guys i need help with gate open open how to make it open for one acl group can somone add it on this gate system local markerName = createMarker(411.52252197266, 2533.6247558594, 19.1484375, "cylinder", 1.0, 255,351,512, 255) local gateName = createObject(1553, 412, 2533.8000488281, 19.299999237061, 0, 0, 90) local state = false function markerHitFunction() if (state) then moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) else moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end addEventHandler("onMarkerHit", markerName, markerHitFunction) function markerHitFunction(source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then if (state) then moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) else moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end end addEventHandler("onMarkerHit", markerName, markerHitFunction) Ty man verymuch 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