Files
community_bridge/modules/dialogue/default/client/client.lua
T
gononono64 58782dfcd0 init dialogue and progressbar bananza
Added dialogue system initial upload. Some modifications needed but good default.

Standardized input and output for progressbar. Accepts ox and qb (progressbar)
2025-02-21 11:02:18 -06:00

35 lines
828 B
Lua

--- Open a dialogue with the player
--- @param name string
--- @param dialogue string
--- @param options table example = {{ id = string, label = string}}
function OpenDialogue(name, dialogue, options)
SendNUIMessage({
type = "open",
text = dialogue,
name = name,
options = options
})
end
RegisterCommand("dialogue", function()
OpenDialogue( "Akmed" , "Hello how are you doing my friend?", {
{
label = "Trade with me",
id = 'something',
},
{
label = "Goodbye",
id = 'someotherthing',
}
}
)
end)
-- { label: 'Hello there! this is some long text that i am Dialogueing', id: '1' },
-- { label: 'Trade with me', id: '2' },
-- { label: 'Goodbye', id: '3' }