u welcome
local opencommand = "gate" --open command
local closecommand = "gate1" --close command
local ACL = "Server Owner" --acl
local GateObject = 3036 --object
local OpenTime = 6000 --opening second
local rotX, rotY, rotZ = 0, 0, 90 --rotations
local Defx, Defy, defz = 2055, -1697, 14.199999809265 --closed position
local opx, opy, opz = 2055, -1697, 10 --opened position
--create the gate (DO NOT EDIT)
local ggate = createObject ( GateObject, Defx, Defy, defz, rotX, rotY, rotZ)
--DO NOT EDIT
function gateopen ( p )
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(p)), aclGetGroup(ACL)) then
moveObject (ggate, OpenTime, opx, opy, opz)
outputChatBox("gate open", p,0,255,0,true)
else
outputChatBox("u dont have permission", p,0,255,0,true)
end
end
addCommandHandler( opencommand, gateopen)
function gateclose ( p )
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(p)), aclGetGroup(ACL)) then
moveObject (ggate, OpenTime, Defx, Defy, defz)
outputChatBox("gate closing", p,0,255,0,true)
else
outputChatBox("u dont have permission", p,0,255,0,true)
end
end
addCommandHandler( closecommand, gateclose)