--Client Side
guiSetEnabled ( button,false ) -- اسم الزرbutton
addEvent ('Open',true)
addEventHandler('Open',root,
function()
guiSetEnabled ( button,true ) -- اسم الزرbutton
end)
--Server Side
local Groups = {
"Console",
}
addEventHandler('onPlayerLogin',root,
function(_,acc)
if not source:getAccount() or source:getAccount():isGuest() then return end
for _,v in ipairs ( Groups ) do
if ACLGroup.get(v):doesContainObject( "user."..source:getAccount():getName()) then
triggerClientEvent ( source, "Open", source )
break
end
end
end)