Configuration

Free | Download on Tebex

Complete configuration reference. All settings are in config.lua.

Camera

Config.Camera = {
    fov = 50.0,              -- Field of view
    easeTime = 1000,         -- Camera transition duration (ms)
    distance = 0.9,          -- Camera distance from NPC
    heightOffset = 0.5,      -- Camera height offset
    dof = {
        enabled = true,      -- Depth of field blur
        near = 1.0,
        far = 6.0,
        strength = 1.0
    }
}
Property Type Default Description
fov number 50.0 Camera field of view
easeTime number 1000 Transition animation duration in ms
distance number 0.9 Camera distance from NPC face
heightOffset number 0.5 Camera height relative to NPC
dof.enabled boolean true Enable depth of field blur
dof.near number 1.0 Near DOF distance
dof.far number 6.0 Far DOF distance
dof.strength number 1.0 Blur intensity

Interaction

Config.InteractDistance = 2.5     -- Target/E key interaction distance
Config.DrawDistance = 10.0        -- 3D name display distance
Property Type Default Description
InteractDistance number 2.5 Max distance to interact with NPC
DrawDistance number 10.0 Max distance to show NPC name above head

Target System

Config.TargetSystem = 'auto'
Value Behavior
'auto' Uses ox_target or qb-target if detected, otherwise falls back to E key
'ekey' E key only — ignores target systems entirely
'ox_target' Force ox_target (no E key)
'qb-target' Force qb-target (no E key)

In 'auto' mode, if a target system is detected, E key is disabled — only the target system is used. E key only activates as a fallback when no target resource is running.

Typing Effect

Config.TypingSpeed = 80           -- ms per word

Controls how fast dialog text types out. Lower = faster. Range: 15–200.

Sound Effects

Config.Sounds = {
    open    = { name = 'BACK',                   set = 'HUD_AMMO_SHOP_SOUNDSET' },
    close   = { name = 'BACK',                   set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    select  = { name = 'SELECT',                 set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    hover   = { name = 'NAV_UP_DOWN',            set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    typing  = { name = 'HIGHLIGHT_NAV_UP_DOWN',  set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' }
}

Each sound uses GTA V native PlaySoundFrontend. Set any entry to nil to disable that sound.

Pre-registered NPCs

Define NPCs directly in config. These spawn automatically on resource start.

Config.NPCs = {
    {
        id = 'mechanic',               -- Unique ID (required)
        name = 'Mechanic',             -- Display name (required)
        subtitle = 'Vehicle Repair',   -- Subtitle text (optional)
        model = 'a_m_y_mechanic_02',   -- Ped model (required)
        coords = vector4(-339.0, -134.0, 39.0, 180.0),  -- Position + heading (required)
        greeting = 'Hey! Need a repair?',                -- Dialog text (optional)

        -- Animation (choose one):
        animation = { dict = 'mini@repair', clip = 'idle_a', flag = 49 },
        -- scenario = 'WORLD_HUMAN_WELDING',

        -- Blip (optional):
        blip = {
            enabled = true,
            sprite = 446,
            color = 5,
            scale = 0.8,
            label = 'Mechanic'
        },

        -- Dialog options:
        options = {
            { label = 'Repair Vehicle', type = 'client', event = 'myresource:repair', icon = '🔧' },
            { label = 'Buy Parts',      type = 'server', event = 'myresource:buyParts', args = { 'engine' } },
            { label = 'Ask about job',  response = 'We fix cars here. Interested?' },
            { label = 'Nevermind',       type = 'close' },
        }
    }
}

NPC Properties

Property Type Required Description
id string Unique identifier
name string Display name (shown above head & in dialog)
model string Ped model name or hash
coords vector4 Position (x, y, z) + heading (w)
subtitle string Subtitle in dialog header
greeting string Initial dialog text
animation table { dict, clip, flag }
scenario string GTA scenario name (alternative to animation)
blip table { enabled, sprite, color, scale, label, category }
targetLabel string Custom label for target eye (default: NPC name)
targetIcon string Custom icon for target eye (default: fas fa-comment)
options table Array of dialog options

Option Properties

Property Type Description
label string Button text (required)
icon string Emoji or icon (optional)
type string 'client', 'server', or 'close'
event string Event name to trigger
args table Arguments passed to the event
response string Show response text instead of triggering event
close boolean Set false to keep dialog open after event (default: true)
Last updated 1 month ago