Exports
Functions
exports('OpenDialog', OpenDialog)OpenDialog({
ped = GetClosestPed(5.0), -- The NPC or entity to interact with
pedName = 'Merchant', -- The name of the NPC
info = 'Welcome to my shop! What would you like to do?', -- Optional dialog description
options = {
{
label = 'Buy Items', -- Text for the interaction option
onSelect = function()
print('You chose to buy items!')
end
},
{
label = 'Sell Items',
onSelect = function()
print('You chose to sell items!')
end
},
{
label = 'Leave',
onSelect = function()
print('You left the conversation.')
end
}
}
})Last updated