I’m pretty darn new to NUI, however it seems to be the only option I have when it comes to producing text boxes a player can actually type in to (considering all we really have are Controls).
Ideally what I’m after is a way to have it detect or register when a letter is typed? I assume it’s doable though this really has confused me.
I’m fairly lost as to have I can have it listen for when the user types, seeing as all I’ve found in regards to tutorials is some form of whitelist thing, then a thread of someone asking about creating a text box only to have the standard text box (black box, centred on screen).
I’m looking specifically for typing any key, seeing as simply checking if The control key is pressed doesn’t really cut it since not every letter can be checked.
I mean I’ve seen it before, log in to see a simple text box for entering your password. I was simply hoping I could just use NUI to essentially trigger when I hit a key.
If I can’t have it trigger something in a lua file when any key is pressed, then I’ll have to settle for creating a text box, however I’m unsure how I’d send the contents of the text box over to a lua file
here is a client side script, join the server and it should draw a notification above the map to tell you what the key number is you can then use this for is control just pressed or what ever you choose,
What you’re trying to do (get keys) currently won’t work. I’ve said this before. You can only get when a control is pressed (controls are bound to keys).
And as I’ve said, I’m aware that it’s only keys that are bound to actions. However when an individual comes up to you with a possible solution, I’m obviously going to try it.
Seems my only option will be to look in to NUI and see if I can get a functioning method, granted that feature request couldn’t come quick enough! Ahah.
Lol. His code only displayed when a control was pressed. It didn’t provide any “solution”. Plus, if you were aware that you couldn’t get when a key is pressed you should’ve known that unbound keys wouldn’t have worked.