Exports
This is a simple guide for how to use the JustTTS exports for your custom actions
Client Exports
OpenMenu
--[[
-- ped : number - entity id of ped you want to use
-- options : table {
name : string,
job : string,
destroyCam : bool,
text : string,
voiceId : string,
options : table {
{
label : string,
destroyCam : bool,
action : function
},
}
}
]]
exports.JustTTS:OpenMenu(ped, options)
-- Usage
local playerPed = PlayerPedId()
exports.JustTTS:OpenMenu(playerPed, {
name = "John Doe",
job = "Shopkeeper",
destroyCam = true,
text = "Hello! Welcome to my shop. Do you want something?",
voiceId = "JBFqnCBsd6RMkjVDRZzb",
options = {
{
label = "Ask about products",
destroyCam = true,
action = function()
print("Player asked about products.")
end
},
{
label = "Say goodbye",
destroyCam = true,
action = function()
print("Player said goodbye.")
end
}
}
})Last updated