For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

Page dedicated to how to configure our NPC Dialogs

Target Systems

Select the targeting system you are using on your server.

  • ox_target: Support for OX Target

  • qtarget: Support for QTarget

  • qb_target: Support for QB Target

Camera Settings

Adjust the camera behavior during NPC interactions.

  • transitionTime: Camera transition duration (in ms)

  • offset: Camera offset relative to the NPC's head bone (vec3)

NPC Setup

Configure the models and locations of NPCs available on the map.

  • id: Unique identifier for the NPC entry

  • model: Ped model name (e.g., 'a_m_y_business_02')

  • coords: Coordinates and heading (vec4)

  • animation: Animation played by the NPC (dictionary and name)

  • dialogId: The ID of the initial dialog to open

  • icon: FontAwesome icon displayed in the target

  • label: Text label displayed in the target

Dialog Configuration

Define the structure and content of the conversations.

  • id: Unique identifier for the dialog node

  • npc.name: Name of the NPC displayed in the UI

  • npc.role: Role or title of the NPC displayed in the UI

  • question: The main text spoken by the NPC

  • options: A list of possible responses or actions for the player

Dialog Actions

Various types of actions that can be triggered when a dialog option is selected.

  • nextDialog: ID of the next dialog node to jump to (or a function returning the ID)

  • clientEvent: Name of a client-side event to trigger

  • serverEvent: Name of a server-side event to trigger

  • export: Resource export to call (format: 'resource:exportName')

  • command: Console command to execute

  • action: Special built-in actions (e.g., 'close' to end the dialog)

  • condition: A Lua function that returns true/false to determine if the option is visible (e.g., Check for a specific job or item)

Dialog Actions Examples:

  • Client Event:

  • Server Event:

  • Export:

  • Condition:


Triggering Dialogs from External Scripts

You can trigger a dialog from any other client-side script using the TriggerEvent function.

Syntax

Example Usage

1. Simple Trigger

This example assumes you have a ped entity handle (e.g., from a raycast or efficient ped loop) and want to open a configured dialog.

2. Integration with qtarget/ox_target

If you are adding a target option manually in another script and want to open a dialog:

Last updated