RX Interact Configuration

Everything is in config.lua.

Restart rx_interact after changing the configuration, then restart the scripts that use DrawText or text UI.

Key and colour

Lua
Config.Color = { 255, 255, 255 }
Config.Locale = 'en'
Config.Key = 'E'
Config.Hold = 0.6
SettingDefaultBehaviour
Color{ 255, 255, 255 }Main colour of the dot, the key, and the hold ring, as r, g, b. The letter on the key switches between dark and light on its own so it stays readable.
Locale'en'en or tr. See Adding a language.
Key'E'The interact key. Players can rebind it under Settings > Key Bindings > FiveM.
Hold0.6Seconds the key is held for an action. 0 makes it a simple press. Any option can override it.

Distances

Lua
Config.ShowDistance = 8.0
Config.UseDistance = 1.6
Config.Approach = 1.2
Config.ZoneDotRange = 5.0
Config.VehicleDotRange = 3.0

Config.MaxDots = 8
Config.LineOfSight = true
Config.HideInVehicle = true
SettingDefaultBehaviour
ShowDistance8.0Metres from which the dot shows up.
UseDistance1.6Metres within which the action can be used.
Approach1.2The key already shows, greyed out, this many metres before the player is in reach. 0 turns it off.
ZoneDotRange5.0How far past their own distance zones and entities show their dot.
VehicleDotRange3.0How far past the doors’ reach a car’s door ring shows. Only the nearest car shows one.
MaxDots8Most dots on screen at once. The nearest ones win.
LineOfSighttrueHides prompts behind walls.
HideInVehicletrueNo prompts while sitting in a vehicle.

Look

Lua
Config.Scale = 0.85
Config.KeyShape = 'square'
Config.HoldStyle = 'ring'
SettingDefaultBehaviour
Scale0.85Size of the prompt, from 0.5 to 1.25.
KeyShape'square''square' (rounded corners) or 'circle'.
HoldStyle'ring''ring' fills a ring around the key; 'fill' fills the key from the bottom. Any shape works with any hold style.

Bridges

Config.Bridge decides which resources RX Interact answers for. Scripts written for them keep working without changes and use the RX Interact look. Set an entry to false to keep the original resource.

Lua
Config.Bridge = {
    ['qb-target'] = true,
    ['ox_target'] = true,
    ['qb-menu'] = true,
    ['qb-input'] = true,
    ['qb-core DrawText'] = true,
    ['ox_lib textUI'] = true,
    ['ox_lib context'] = true,
    ['ox_lib inputDialog'] = true,
    ['ox_lib alertDialog'] = true,
    ['ox_lib notify'] = true,
}
Config.MaxDistance = 7.0
Config.OxDistance = 2.0
Config.VehicleDoors = true
Config.CdnFuel = true
EntryWhat it covers
qb-targetZones, entities, models, bones, global ped, vehicle, object, and player options, job, gang, and item checks, and canInteract.
ox_targetThe same, called the ox_target way.
qb-menu, qb-inputMenus and input forms.
qb-core DrawTextDrawText, ChangeText, HideText, and KeyPressed, shown as key hints.
ox_lib textUI, context, inputDialog, alertDialog, notifyText UI, context menus, input forms, confirm boxes, and notifications.
SettingDefaultBehaviour
MaxDistance7.0Distance for qb-target options that do not set their own.
OxDistance2.0Distance for ox_target options that do not set their own. ox_target’s 7 m is meant for aiming and is too far here.
VehicleDoorstrueBuilt-in door, bonnet, and boot prompts on unlocked cars.
CdnFueltrueSupport for cdn-fuel’s nozzle and charger prompts on cars.

Moving over from qb-target

The tables from qb-target’s init.lua can be pasted into config.lua as they are:

Lua
Config.CircleZones = {}
Config.BoxZones = {}
Config.PolyZones = {}
Config.TargetBones = {}
Config.TargetModels = {}
Config.GlobalPedOptions = {}
Config.GlobalVehicleOptions = {}
Config.GlobalObjectOptions = {}
Config.GlobalPlayerOptions = {}
Config.Peds = {}

Key hints

Lua
Config.Hints = {
    Position = 'bottom',
    FollowPosition = false,
}
SettingDefaultBehaviour
Position'bottom'bottom, left, right, or top.
FollowPositionfalsetrue uses the position a script asks for, such as DrawText 'left' or text UI 'right-center'.

Also used for qb-menu and ox_lib context menus.

Lua
Config.Menu = {
    Position = 'right',
    Sounds = true,
    Volume = 0.6,
}
SettingDefaultBehaviour
Position'right'right or left.
Soundstruetrue plays RX Interact’s own soft sounds, 'game' plays GTA’s sounds, false plays none.
Volume0.6Volume of RX Interact’s own sounds, from 0 to 1.

Forms and confirm boxes

Also used for qb-input and ox_lib input and alert dialogs. Config.Dialog needs nothing set; put your own button texts in Config.Dialog.Text if you want to change them.

Notifications

Also used for ox_lib notify, and for qb-core’s Notify after the small change in qb-core.

Lua
Config.Notify = {
    Position = 'left',
    Top = 0.075,
    Duration = 5000,
    Max = 5,
    Sound = true,
    Types = {
        info = { icon = 'fa-solid fa-circle-info' },
        success = { icon = 'fa-solid fa-circle-check' },
        error = { icon = 'fa-solid fa-circle-exclamation', color = { 222, 82, 64 } },
        warning = { icon = 'fa-solid fa-triangle-exclamation', color = { 232, 168, 64 } },
        police = { icon = 'fa-solid fa-shield-halved', color = { 96, 150, 232 } },
        ambulance = { icon = 'fa-solid fa-truck-medical', color = { 222, 82, 64 } },
    },
}
SettingDefaultBehaviour
Position'left'left or right.
Top0.075How far down the screen the first notification sits, from 0 to 1.
Duration5000Milliseconds a notification stays when the script does not say.
Max5Most notifications on screen at once. The oldest goes first.
Soundtruetrue plays RX Interact’s own sound, 'game' plays GTA’s, false plays none.
TypesIcon (a Font Awesome class) and colour for each type. Without a colour, Config.Color is used. A script’s own icon or colour always wins.

Safe minigame

Lua
Config.Safe = {
    Count = 3,
    Max = 99,
    Feel = true,
    Sounds = 'game',
    Camera = true,
    CameraFov = 42.0,
    Anim = {
        dict = 'mini@safe_cracking',
        idle = { 'idle_base' },
        right = { 'dial_turn_clock_normal', 'dial_turn_clock_slow', 'dial_turn_clock_fast' },
        left = { 'dial_turn_anti_normal', 'dial_turn_anti_slow', 'dial_turn_anti_fast' },
    },
}
SettingDefaultBehaviour
Count3How many numbers a random code has.
Max99The dial goes from 0 to this number.
FeeltrueThe right number clicks and the gamepad rumbles, so the safe can be cracked by ear.
Sounds'game''game' plays GTA’s own safe sounds, true plays RX Interact’s own, false plays none.
CameratrueAn over-the-shoulder camera on the dial, when the script gives the safe’s coordinates.
CameraFov42.0Field of view of that camera.
AnimThe player’s animation at the dial, or false for none.

Starter cord minigame

For boat motors, generators, and anything else started with a pull cord.

Lua
Config.Pull = {
    Pulls = 3,
    Sounds = true,
    Rumble = true,
    Anim = { dict = 'mini@repair', clip = 'fixing_a_player' },
}
SettingDefaultBehaviour
Pulls3Good pulls needed to start it.
SoundstruePlays the pull sounds.
RumbletrueGamepad rumble on each pull.
AnimThe player’s animation, or false for none.

Adding a language

English and Turkish are included.

  1. Copy locales/en.lua to locales/<code>.lua.
  2. Change Locales.en to Locales['<code>'] and translate the texts.
  3. Set Config.Locale = '<code>'.

Anything left untranslated falls back to English.