Jump to content

GUI non-clickable button


Recommended Posts

Posted

What do you mean you can't click it? showCursor if you can't see it.

PS. Why did you come back? To spam the forum again? Ask stupid questions?

Posted

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

Posted
PS. Why did you come back? To spam the forum again? Ask stupid questions?

My age changed, and my English improved :P

But I added some buttons but I can't click at them. In the picture below, I can't click on the button: Change:

[attachment=0]cantclick.PNG[/attachment]

Posted

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)

Posted
My cursor does appears, I can click the other buttons, but not that button called: "Change".....

Then use the code I posted above :|...

Also, it would help a lot if you post the code you have in your script.

Edit: Have you used guiSetEnabled on that button somewhere?

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