Basic Configuration

This section covers how to configure the basic settings of the Ped Dialog script. By changing config.lua file.

The file is located in the script's root directory and is named config.lua.

UseDistanceChecking

boolean

Controls whether the script shows text and handles key interactions when players approach peds.

When true:

  • Shows text over peds when you get close

  • Handles key interactions (E to interact)

  • Works with both 3D text and TextUI systems

When false:

  • Disables automatic text display and key interactions

  • Use this if you're only using ox_target/qb-target

  • Better performance when you don't need built-in interactions

Simple rule: Set to false if you're using only external targeting systems (ox_target, etc.). Set to true if you want text to appear when approaching peds.

UseEveryTickText

boolean

Choose between built-in 3D text rendering and external TextUI systems.

  • true - Uses built-in every-frame 3D text rendering (ready to use, no setup required)

  • false - Uses TextUI system that you must implement yourself in CFunctions.ShowText() and CFunctions.HideText(). Good for TextUI systems that don't need every-tick usage.

DistanceCheckInterval

number (in milliseconds)

How often the script checks player distance to peds when no interactions are active. Default is 1000 (1 second).

InteractionKey

number

Key to open ped dialog when you use key interaction to open it. You can find all key codes here.

PlayerInvisibleWhileInDialog

boolean

To make a player invisible locally while dialog is open set it to true . (Other players can still see the player)

PedCam

table

Default camera settings for the ped. These settings will be used if specific camera settings are not defined for the created ped.

  • offset - offset calculated from the ped position.

  • fov - camera FOV

  • pointZOffset - Z offset of PointCamAtEntity

Locales

This one should be easy to understand. The script uses string formatting, and the comments explain what each %s in the format represents.

Default config

Config = {}

Config.UseDistanceChecking = true
Config.InteractionKey = 38 -- E
Config.UseEveryTickText = true
Config.DistanceCheckInterval = 1000
Config.PlayerInvisibleWhileInDialog = true

Config.PedCam = {
  offset = {
    x = 0.0,
    y = 2.0,
    z = 1.0
  },
  fov = 50.0,
  pointZOffset = 0.0
}

Locales = {
  -- First %s is the ped name, second %s is the ped group
  ['ped_over_head'] = '%s [~b~%s~w~]',
  -- %s ped name
  ['interact_ped_over_head'] = 'Press  ~INPUT_CONTEXT~to interact with ~g~%s~w~',
  -- For those who are using custom fonts
  ['blip_text_component_string'] = '%s',
}

Last updated