Jump to content

Password Input box (GUI)


Recommended Posts

Is there any way of making it so when i click a certain class on my spawn screen another box comes up prompting a password. If you get the password right you can spawn that class. If you get it wrong you don't spawn as that class and either have to retry entering the password or leaving that class alone. If for any reason you need my Button code it is below.

        button10 = guiCreateButton( 0.0, 1.0, 0.01, 0.01, "Admin", true, myWindow ) 
        addEventHandler( "onClientGUIClick", button10, spawner10, false, myWindow ) 

Link to comment

What is myWindow doing there as the last parameter in addEventHandler? You don't need it there because addEventHandler doesn't take that many params.

Think about what you're trying to do. You want to pop up a window with Password field, right? What do you need to do to make a window with that password field? Create that window and create that text field (password field). What's so difficult about that... you already made one I guess? You need to guiSetVisible of that window (which has the password field) when you click specific "class". When you make the password window, don't forget about a button to accept what user typed in or use onClientGUIAccepted which is triggered when user presses Enter in a text field.

Try to think about what you're trying to make and than try to make with the knowledge you already have, if you fail, just ask here, but try first. If you don't try, you'll never learn.

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