Jump to content

GUI Help


mint3d

Recommended Posts

When I hit close it doesn't close anyhelp?

  
GUIEditor = { 
    button = {} 
} 
  
    function openAdminPanel () 
        adminPanel = guiCreateWindow(157, 99, 481, 343, "Admin Panel - DayZ", false) 
        guiWindowSetMovable(adminPanel, false) 
        guiWindowSetSizable(adminPanel, false) 
  
        adminPanelButton = guiCreateButton(388, 307, 84, 27, "Close", false, adminPanel) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        adminPanelMemo = guiCreateMemo(9, 24, 183, 48, "Do not abuse your admin powers , thank you.", false, adminPanel) 
        guiSetAlpha(adminPanelMemo, 0.91) 
        guiMemoSetReadOnly(adminPanelMemo, true)     
        showCursor( true) 
    end 
  
  
addCommandHandler("openadmin",openAdminPanel,true,false) 
  
function closeAdminPanel() 
root = getRootElement() 
destroyElement(root) 
end 
addEventHandler("onClientGUIClick",adminPanelButton,closeAdminPanel) 
  

Link to comment
function closeAdminPanel() 
guiSetVisible(adminPanel,false) 
showCursor(false) 
addEventHandler("onClientGUIClick",adminPanelButton,closeAdminPanel) 

This function returns the root node of the element tree, called root. This node contains every other element: all resource root elements, players and remote clients. It is never destroyed and cannot be destroyed using destroyElement.

Read Carefully

https://wiki.multitheftauto.com/wiki/GetRootElement

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