DialogueController
This is a script for helping work with GTA 5’s dialogue/scripted conversation system
This resource does nothing on its own
It is intended to be used with other resources, like heist missions or what have you.
GitHub:
Showcase
Download
Download the latest build in Releases · Lucas7yoshi/DialogueController · GitHub
There is a difference between Debug and Release builds.
Debug comes with /dialoguenormal and /dialoguerandomized commands that let you play voice lines easily for testing and will print a large amount of information in F8. The release build does not have these commands and only logs errors.
Examples
Example usage:
-- Lua requires for it to be json encoded, json.encode is included in the lua runtime.
-- This is due to Lua -> C# issues.
local dialogue = {
gxt = "imblzau", -- GXT name
line = "IMBLZ_FIRSTF", -- Line name without 1A lines and such
speakers = {
["2"] = "EXECPA_FEMALE", -- Speakers, required, based on SL. needs to be accurate
},
peds = nil,
--[[peds = {
["2"] = PlayerPedId(), -- You can provide the ped to play this on (for facial anims), otherwise it'll generate invisible unnetworked peds attached to the player
},]]
forcePedsVisible = false, -- used for debugging purposes only, optional
phoneCall = false, -- optional, disables fading out with distance
forceRadio = false, -- optional, enables radio filter
}
exports['DialogueController']:startDialogueJson(json.encode(dialogue))
For more information (I.E for finding voice lines) see the README in the github repository, if you have questions feel free to ask.
18 Likes
Very Good release, keep up the good work!
Seems interesting. I am working on trying to test the functionality, but it does not seem to want to recognize the exports. Rebuilt the solution and all as well on Release.
In all fairness, I have never worked with C# scripts for FiveM so there is a pretty good chance I missed something.
1 Like
hmm that’s weird. are you trying to run it server side? if not then try copying my code exactly. that’s the last error that should occur
also sorry if my email response appears aswell
again, are you trying to use this in server code?
I’m nub how can I run it server side if I can ?