[PAID] Dialog System

:round_pushpin: dms-dialog_system β€” Dynamic Dialog System Script

dms-dialog_system is a lightweight dialog manager script for FiveM that allows you to create dynamic, multi-page, and event-driven dialogs

:white_check_mark: Features

  • Fully dynamic dialog trees
  • Event-based client & server actions
  • Multi-page option support
  • Go back & close dialog functionality
  • Multi-language support (EN/TR)

:warning: Make sure to ensure dms-dialog_system before any other script that uses it in your server.cfg.

:wrench: Exports & Usage

registerDialog(dialogID, dialogTree)
Registers a dialog to the system.

  • dialogID: Unique dialog identifier (string)
  • dialogTree: Table containing dialog structure
Citizen.CreateThread(function()
  exports["dms-dialog_system"]:registerDialog("example_dialog_1", Config.ExampleDialog1)
  exports["dms-dialog_system"]:registerDialog("trader_dialog", Config.TraderDialog)
end)

:pushpin: Example Integration

example_script/config.lua

Config = {} 
Config.ExampleDialog1 = {
  name = "Test Dialog",
  dialog = {
    text = "Welcome!",
    nodes = {
      {
        buttonText = "Test Node without subnode and title",
      },
      {
        buttonText = "Test Node without subnode and title with event (CLOSE UI for example)",
        event = {
          type = "client",
          name = "dms-dialog_system:closeDialog",
        }
      },
      {
        text = "Test Node Title 1",
        buttonText = "Test Node without subnode with title",
      },
      {
        text = "Test Node Title 2",
        buttonText = "Test Node with subnode and title",
        nodes = {
          {
            buttonText = "This is a subnode",
          },
          {
            text = "This is a another subnode title",
            buttonText = "This is another subnode",
            nodes = {
              {
                text = "This is a subnode of a subnode",
                buttonText = "Subnode of a subnode",
                nodes = {
                  {
                    buttonText = "This is a subnode of a subnode of a subnode",
                  }
                }
              }
            }
          }
        }
      },
    }
  }
}

example_script/client.lua

Citizen.CreateThread(function()
  exports["dms-dialog_system"]:registerDialog("example_dialog_1", Config.ExampleDialog1)
end)

:pushpin: Open a Dialog

Trigger a dialog by its ID:

TriggerEvent("dms-dialog_system:openDialog", "example_dialog_1")
  • Opens the dialog and sets NUI focus
  • Supports multiple dialogs

:pushpin: Close Dialog

Close the current dialog:

TriggerEvent("dms-dialog_system:closeDialog")

:pushpin: Example Command Integration

RegisterCommand("dialog", function(source, args)
  local dialogID = tonumber(args[1])
  if dialogID == 1 then
    TriggerEvent("dms-dialog_system:openDialog", "example_dialog_1")
  elseif dialogID == 2 then
    TriggerEvent("dms-dialog_system:openDialog", "trader_dialog")
  end
end)

:pushpin: Event Example

RegisterNetEvent("dms-dialog_system:testEvent", function()
  print("Test event triggered! bla bla bla!")
end)

:shopping: Tebex Store

:gift: Buy Here

:movie_camera: Preview Video

:tv: Watch on YouTube

Screenshots



Thanks for your support! :pray:
If you’re selling your resource, please include the following information at the end of your post:

Code is accessible No (ESCROWED)
Subscription-based No
Lines (approximately) 250 - 300
Requirements nothing
Support No
2 Likes