-- Client
GUIEditor_Button = {}
addEventHandler("onClientResourceStart", root,
function()
a = guiCreateWindow(175,97,529,430,".....",false)
guiSetAlpha(a,1)
guiSetVisible( a, false )
a = guiCreateMemo(10,22,510,297,"......",false,a)
a = guiCreateMemo(11,321,507,69,".........",false,a)
a = guiCreateButton(12,392,493,29,".......",false,a)
GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false)
end
)
function OpenWin()
if guiGetVisible ( a ) then
guiSetVisible ( a, false )
showCursor(false)
guiSetInputEnabled(false)
else
guiSetVisible ( a, true )
showCursor(true)
guiSetInputEnabled(true)
end
end
bindKey("F7", "down", OpenWin)
--server
addEventHandler("onPlayerJoin",root,
function ()
bindKey(source,"F7","down",showGUI)
end)
addEventHandler("onResourceStart",resourceRoot,
function ()
for index, player in ipairs(getElementsByType("player")) do
bindKey(player,"F7","down",showGUI)
end
end)
function showGUI(thePlayer)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then
triggerClientEvent(thePlayer,"toggleGUI",thePlayer)
else
outputChatBox(" You Dont Have Access to This Panel",thePlayer,255,0,0)
end
end
اللوحة ما تضهر تماما