Jump to content

[Help]Gateing


Recommended Posts

hello guys :D

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 :D ?

Link to comment
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

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...