gudenmike Posted July 7, 2010 Share Posted July 7, 2010 hello guys i were wondering if anyone could help me make a script.. i want to make a gates.. and i want to make it able to only be opened by people who are in the [Z.A.R.S] acl group ive tried some gate scripts but none of them worked for me ;/ anyone who's fresh ? Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 Hmmm i can make a example then u edit the cordinates of gate etc. Link to comment
Castillo Posted July 7, 2010 Share Posted July 7, 2010 gate = createObject(985,-714.02056884766, 957.98352050781, 11.239881515503, 0, 0, 270.27014160156) function moveGate(thePlayer) if (isGuestAccount(getPlayerAccount(thePlayer)) == false) then local taccount = getPlayerAccount (thePlayer) if isAccount(taccount) then moveObject(gate,5000, -713.83947753906, 957.50561523438, 5.2818431854248 ) setTimer(moveBack,5000,1) else end end end addCommandHandler ( "open", moveGate ) function moveBack() moveObject (gate, 5000, -714.02056884766, 957.98352050781, 11.239881515503 ) end function isAccount(account) local nick = "" local group = aclGetGroup("[Z.A.R.S]") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end Link to comment
gudenmike Posted July 7, 2010 Author Share Posted July 7, 2010 NVM i fixed it gate works perfectly thank you mate 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