meta-hub / fivem-dialogue

Simple NPC dialogue util for FiveM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example:

local function onInteract(data)
  if not data then
    return
  end

  print(data.option.name)
end

local myDialogue = {
  dialogue  = "Testing dialogue, testing testing one two three four. Should probably actually test what happens when this text becomes too long.",
  targetEnt = PlayerPedId(),
  cb        = onInteract,
  options   = {
    {
      name = "test_opt_a",
      label = "Testing option A.<br>Some test description here."
    },
    {
      name = "test_opt_b",
      label = "Testing option B.<br>Some test description here."
    },
    {
      name = "test_opt_c",
      label = "Testing option C. Some test description here."
    },
    {
      name = "test_opt_d",
      label = "Testing option D. Some test description here."
    },
  }
}

exports['fivem-dialogue']:Open(myDialogue)```

About

Simple NPC dialogue util for FiveM.


Languages

Language:HTML 68.4%Language:Lua 31.6%