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.
can you explain more how to use it
because I can’t make it work
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.