Leo Messi Posted June 14, 2018 Share Posted June 14, 2018 It's so easy and simple, For example I created an EDIT edit = guiCreateEdit(x, y, sX, sY, "title", false, window) I want to know if the player is typing something in this edit or not, is it possible? Link to comment
MIKI785 Posted June 14, 2018 Share Posted June 14, 2018 Listen for onClientGUIFocus and onClientGUIBlur. Link to comment
AJXB Posted June 14, 2018 Share Posted June 14, 2018 Or trigger an event when the player types anything and set a timer to reset the status Link to comment
Leo Messi Posted June 14, 2018 Author Share Posted June 14, 2018 I wanna do it like; function isPlayerTypingSomething(edit) if blah then isTyping = true else isTyping = false end return isTyping end end To check if the localPlayer is typing something in the edit-box or not, if he stops typing it will set isTyping value into false, and if he's typing it will set isTyping value into true, I hope you get it. Link to comment
Tails Posted June 15, 2018 Share Posted June 15, 2018 (edited) Use https://wiki.multitheftauto.com/wiki/OnClientGUIChanged it will trigger whenever someone is typing in an editbox. If you want to constantly check if someone is typing then use the focus and blur events like MIKI suggested. Edited June 15, 2018 by Tails Link to comment
keymetaphore Posted June 15, 2018 Share Posted June 15, 2018 12 hours ago, Leo Messi said: I wanna do it like; function isPlayerTypingSomething(edit) if blah then isTyping = true else isTyping = false end return isTyping end end To check if the localPlayer is typing something in the edit-box or not, if he stops typing it will set isTyping value into false, and if he's typing it will set isTyping value into true, I hope you get it. Suggestion for this script. This is a long hassle, here's an easier method. function isPlayerTyping (player) -- change this return blah -- this is the function that checks if he's typing. function returns true/false, result will be the same end Much faster C: 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