Jump to content

How can you bind key on opening dx window?


JeViCo

Recommended Posts

Posted

For example i have dx gui. How can i make it open with pressed button? if i add addEventHandler("onClientRender",dx) it appears and stay on player join. When i add addCommandHandler("dx",dx) it appears on half of second( i don't even know how to combine 2 handlers(scripting level - newbie-noob)

sry for poor eng(russia)

Posted
dxVisible = false

function togglePanel()
  if (dxVisible == false) then
    dxVisible = true
  else
    dxVisible = false
  end
end
bindKey()

addEventHandler("onClientRender", root,
  function()
    if (dxVisible == true) then
      dxDrawFunction
    end
  end
)

 

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