redditing Posted June 3, 2020 Share Posted June 3, 2020 -- Client Side Button = guiCreateButton(0.45, 0.54, 0.10, 0.06, "Get Value", true) guiSetProperty(Button, "NormalTextColour", "FFAAAAAA") guiSetVisible(Button, false) EditBox= guiCreateEdit(0.41, 0.45, 0.18, 0.04, " chcesz tego kupić sztuk?", true) guiSetProperty(EditBox, "NormalTextColour", "FFFF0000") guiEditSetMaxLength(EditBox, 3) guiSetVisible(EditBox, false) addEventHandler("onClientGUIClick", Button function() local inputBox = tonumber(guiGetEdit(EditBox)) if inputBox==0 then outputChatBox("U set value input "..inputBox, 255, 255, 0) end end) -- Another Client Side addCommandHandler("TurnOnButton", function() guiSetVisible(Button, true) guiSetVisible(EditBox, true) end) I don't know what's wrong, but when I type the command 'TurnOnButton' I can't click the button and the editBox as if they didn't exist Link to comment
_Ace Posted June 3, 2020 Share Posted June 3, 2020 45 minutes ago, redditing said: I don't know what's wrong, but when I type the command 'TurnOnButton' I can't click the button and the editBox as if they didn't exist Button = guiCreateButton(0.45, 0.54, 0.10, 0.06, "Get Value", true) guiSetProperty(Button, "NormalTextColour", "FFAAAAAA") guiSetVisible(Button, false) EditBox= guiCreateEdit(0.41, 0.45, 0.18, 0.04, " chcesz tego kupić sztuk?", true) guiSetProperty(EditBox, "NormalTextColour", "FFFF0000") guiSetVisible(EditBox, false) addEventHandler("onClientGUIClick", Button, function() local inputBox = tonumber(guiGetText(EditBox))--I think the idea was to set max 3 (count) to the edit? if tonumber(guiGetText(EditBox)) and tonumber(guiGetText(EditBox))<=3 then outputChatBox("U set value input "..inputBox, 255, 255, 0)--if input text was 3 or less else return outputChatBox("input > 3 or not number", 255, 255, 0) end end) -- Another Client Side addCommandHandler("TurnOnButton", function() guiSetVisible(Button, true) guiSetVisible(EditBox, true) showCursor(true)--showCursor(false) to disable mouse end) 1 Link to comment
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