[Standalone] H-Interactions (NUI)

h-interactions

H-Interactions

H-Interactions is a utility system created to provide a NUI based Interaction system, created for servers that want to utilise such system for interactions and NPC Dialogs.

Preview

Video 1

GitHub
H-Interactions

Wiki
Wiki

|-------------------------------------|----------------------------|
| Code is accessible | Yes |
| Subscription-based | No |
| Lines (approximately) | Client(431) UI(215) |
| Requirements | None |

22 Likes

Nice work!

good job

1 Like

woow bro thank you very much

can you explain more how to use it
because I can’t make it work :open_mouth:

 local jobNPC = nil
    
    local npc = {
        name = 'Warehouse Manager',
        details = {
            pos = vec3(0,0,0), 
            heading = 90.0,
            -- The interaction system automatically gets the hash key using joaat()
            model = '',
        },
        text = 'Sup homie, you wanna deliver some good shit to some shops?',
        menu = {
            {
                label = "Let's go boi",
                action = function()
                    lib.callback('shopdeliver:startJob', false, function(state)
                        if state then
                            startJob()
                        else
                            print('Failed to start job')
                        end
                    end)
                end,
                type = 'confirm'
            },
            {
                label = "Nah",
                type = 'close'
            }
        }
    }
    
    -- Returns a ID the same way as the Interactions
    jobNPC = exports['h-interactions']:registerNPC(npc)
    
    -- Remove NPC with ID
    local deleted = exports['h-interactions']:deleteNPC(jobNPC)
    
    if deleted then
        print('NPC has been deleted)
        jobNPC = nil
    end

Hello @RT-Scripts
Please make sure that the h-interactions resource is started before any scripts that will be using the integration, sadly the documentation isn’t fully done yet, I’ll be rewriting them tonight. But if you have anymore questions please message me on the Forums DM.

Kind Regards
Haroki

1 Like

Very nice! Alot nicer then other scripts like that which are on the market! :slight_smile:

Good job!

Hi, I’m asking for advice on how to fix the NPC not loading
thank you for answer