syn0nym Posted April 12, 2022 Posted April 12, 2022 So i want to ask, if i make a gui button normally we trigger a function using a mouse click, but it is possible to make it using a bindkey like enter button? x, y = guiGetScreenSize () button = guiCreateButton (300, 500, 200, 100, "Test", false) addEventHandler ( "onClientGUIClick", button, test, false ) function test () outputChatBox ("Button Clicked !") end bindKey ("enter", "down", test)
mafioz Posted April 13, 2022 Posted April 13, 2022 function onPlayerKey(button, press) if not press and button == "e" then -- check clicking E -- function () end end addEventHandler("onClientKey", root, onPlayerKey) 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now