Skip to content

JericoFX/nh-keyboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

nh-keyboard

Dynamic Keyboard Input NUI for FiveM

Information

I created this resource because I couldn't find any good looking NUI resources to input text and have it return back for use, the menu is very dynamic and allows as many options as the screen allows, it's also Open source so feel free to pull request if you have any improvements.

ShowCase ShowCase ShowCase

Setup

It's pretty simple, once you drop the nh-keyboard resource into your resources folder just make sure you put

ensure nh-keyboard

in your server.cfg.

Examples

If you want to have only one selection simply do something like this:

local keyboard = exports["nh-keyboard"]:KeyboardInput({
    header = "Add Item", 
    rows = {
        {
            id = 0, 
            txt = "Spawn Name"
        }
    }
})
if keyboard ~= nil then
    TriggerEvent('additem', keyboard)
end

You can also add multiple listing and it would look something like this

local keyboard = exports["nh-keyboard"]:KeyboardInput({
    header = "Add Items", 
    rows = {
        {
            id = 0, 
            txt = "Spawn Name"
        },
        {
            id = 1, 
            txt = "Amount"
        }
    }
})

if keyboard ~= nil then
    if keyboard[1].input == nil or keyboard[2].input == nil then return end
    TriggerEvent('additem', keyboard[1].input, keyboard[2].input)
end

Known Bugs

No known bugs

Support

Any issues feel free to contact me on the FiveM Forums or on discord NeroHiro#0001

or feel free to report any issues you have in the GitHub Issues

if you wish to add something to it, do a pull request on the github Pull Requests

About

Dynamic Keyboard Input NUI for FiveM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 39.3%
  • CSS 30.7%
  • Lua 17.2%
  • HTML 12.8%