Jump to content

GUI non-clickable button


Recommended Posts

yep i think so too

lol

thehookerkiller

First step:Make the gui with the gui editor

2.click left outside the gui and click the button "print code" or "output code"(somethink like that)

-->print code -- copy that code in notepad or where you want to do it and make a meta.xml

-->output code(or somethink like that)--It outputs the code where you find it in [serverfolder]/mods/deatchmatch/resources/guieditor(or how you called it)/GUIeditor_output

P.S:for output code you must have the guieditor in a FOLDER not ZIPPED.

ok when you have ready these steps you can add a button what to show the gui

add this at end

function onresourceStart ()
bindKey ("thekey", "state", showHowIsYourGuiCalled)
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart)
 
function showHowIsYourGuiCalled()
getVisible = guiGetVisible (HowIsYourGuiCalled)
--etc etc etc

Do i have right?

AND

post your code here

Link to comment

You need to add an event handler for the button to work, else it'll just do nothing...

function onClickButton(button, state, absoluteX, absoluteY)
-- Put what it should do here. Also check which button the client clicked (left, middle, right), else it will work for all buttons in all states (click, release)
end
addEventHandler("onClientGUIClick", buttonName, onClickButton, false)

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