Var FiveM
ScriptsBundlesDocs
VAR
Var FiveM
ScriptsBundlesDocs
NewsTheme CustomizerAboutContact
Shop Now

-- 29 sections

  • ›paintball
  • ›chess
  • ›supermarket simulator
  • ›coins shop
  • ›clothes shop
  • ›casino
  • ›drugs
  • ›clothes shop v2
  • ›interaction
    • configuration
    • public-api
    • interaction-config-reference
    • dialog-system
  • ›emote
  • ›crew
  • ›alert job
  • ›pin code
  • ›society manager
  • ›property
  • ›barber shop
  • ›shop with basket
  • ›tattoo shop
  • ›gardener job
  • ›heist atm
  • ›heist fleeca
  • ›poster job
  • ›loading screen
  • ›bank
  • ›autocardealer
  • ›character creator
  • ›multi character
  • ›bill
  • ›tattoo shop v2

~/docs/interaction/configuration/dialog-system

interaction docs›
  • configuration
  • configuration/public-api
  • configuration/interaction-config-reference
  • configuration/dialog-system

Interaction

Dialog System

-- 1 code block · 1 min read

get var-interacttry it on the test server
lua
dialogue = {
    name      = "Paul",          -- big uppercase header
    tag       = "Lumberjack",    -- accent badge under the name
    startMsg  = "How can I help?",
    elements  = {
        {
            label  = "Tell me about the job",
            -- canInteract is optional — return false to hide the entry
            canInteract = function() return ESX.PlayerData.job.name == "unemployed" end,
            action = function(changeDialog, close)
                changeDialog("Here's what you'll do…", {
                    { label = "Sounds good", action = function(_, close) close() end },
                })
            end,
        },
        { label = "Goodbye", action = function(_, close) close() end },
    },
}
  • changeDialog(message, elements) pushes the current screen to a stack and renders the new one. A "Back" entry is auto-injected.
  • close(callback) closes the conversation and runs callback once the camera/HUD have been restored.
  • Escape always closes the dialogue.

The dialogue camera, voice lines, HUD toggling and on-close exports are fully configurable in Config.Dialogue. If your server uses a HUD other than core_ui / spirit, replace the events in Config.Dialogue.hudEvents.


previousinteraction-config-reference
VAR
Var FiveM

Premium FiveM scripts. Low resmon, high quality. Built for ESX, QBCore & Standalone.

28scripts
1,500+sales

Scripts

  • Marketplace
  • Bundles
  • Theme Customizer

Most Popular

  • Supermarket Simulator
  • FiveM Casino Script
  • FiveM Coin Shop
  • FiveM Emote Menu
  • FiveM Paintball Script
  • FiveM Clothing Shop Script
  • FiveM Interaction Script
  • FiveM Character Creator

Resources

  • Free Scripts
  • Guides
  • News
  • Documentation
  • Support

Company

  • About
  • Contact
  • Discord

Legal

  • Terms
  • Privacy
  • Refunds

© 2026 Var FiveM. All sales final.

Payments byTebex