RX Interact Configuration
Everything is in config.lua.
Restart
rx_interactafter changing the configuration, then restart the scripts that use DrawText or text UI.
Key and colour
Config.Color = { 255, 255, 255 }
Config.Locale = 'en'
Config.Key = 'E'
Config.Hold = 0.6| Setting | Default | Behaviour |
|---|---|---|
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. |
Hold | 0.6 | Seconds the key is held for an action. 0 makes it a simple press. Any option can override it. |
Distances
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| Setting | Default | Behaviour |
|---|---|---|
ShowDistance | 8.0 | Metres from which the dot shows up. |
UseDistance | 1.6 | Metres within which the action can be used. |
Approach | 1.2 | The key already shows, greyed out, this many metres before the player is in reach. 0 turns it off. |
ZoneDotRange | 5.0 | How far past their own distance zones and entities show their dot. |
VehicleDotRange | 3.0 | How far past the doors’ reach a car’s door ring shows. Only the nearest car shows one. |
MaxDots | 8 | Most dots on screen at once. The nearest ones win. |
LineOfSight | true | Hides prompts behind walls. |
HideInVehicle | true | No prompts while sitting in a vehicle. |
Look
Config.Scale = 0.85
Config.KeyShape = 'square'
Config.HoldStyle = 'ring'| Setting | Default | Behaviour |
|---|---|---|
Scale | 0.85 | Size 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.
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| Entry | What it covers |
|---|---|
qb-target | Zones, entities, models, bones, global ped, vehicle, object, and player options, job, gang, and item checks, and canInteract. |
ox_target | The same, called the ox_target way. |
qb-menu, qb-input | Menus and input forms. |
qb-core DrawText | DrawText, ChangeText, HideText, and KeyPressed, shown as key hints. |
ox_lib textUI, context, inputDialog, alertDialog, notify | Text UI, context menus, input forms, confirm boxes, and notifications. |
| Setting | Default | Behaviour |
|---|---|---|
MaxDistance | 7.0 | Distance for qb-target options that do not set their own. |
OxDistance | 2.0 | Distance for ox_target options that do not set their own. ox_target’s 7 m is meant for aiming and is too far here. |
VehicleDoors | true | Built-in door, bonnet, and boot prompts on unlocked cars. |
CdnFuel | true | Support 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:
Config.CircleZones = {}
Config.BoxZones = {}
Config.PolyZones = {}
Config.TargetBones = {}
Config.TargetModels = {}
Config.GlobalPedOptions = {}
Config.GlobalVehicleOptions = {}
Config.GlobalObjectOptions = {}
Config.GlobalPlayerOptions = {}
Config.Peds = {}Key hints
Config.Hints = {
Position = 'bottom',
FollowPosition = false,
}| Setting | Default | Behaviour |
|---|---|---|
Position | 'bottom' | bottom, left, right, or top. |
FollowPosition | false | true uses the position a script asks for, such as DrawText 'left' or text UI 'right-center'. |
Menu
Also used for qb-menu and ox_lib context menus.
Config.Menu = {
Position = 'right',
Sounds = true,
Volume = 0.6,
}| Setting | Default | Behaviour |
|---|---|---|
Position | 'right' | right or left. |
Sounds | true | true plays RX Interact’s own soft sounds, 'game' plays GTA’s sounds, false plays none. |
Volume | 0.6 | Volume 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.
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 } },
},
}| Setting | Default | Behaviour |
|---|---|---|
Position | 'left' | left or right. |
Top | 0.075 | How far down the screen the first notification sits, from 0 to 1. |
Duration | 5000 | Milliseconds a notification stays when the script does not say. |
Max | 5 | Most notifications on screen at once. The oldest goes first. |
Sound | true | true plays RX Interact’s own sound, 'game' plays GTA’s, false plays none. |
Types | Icon (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
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' },
},
}| Setting | Default | Behaviour |
|---|---|---|
Count | 3 | How many numbers a random code has. |
Max | 99 | The dial goes from 0 to this number. |
Feel | true | The 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. |
Camera | true | An over-the-shoulder camera on the dial, when the script gives the safe’s coordinates. |
CameraFov | 42.0 | Field of view of that camera. |
Anim | The 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.
Config.Pull = {
Pulls = 3,
Sounds = true,
Rumble = true,
Anim = { dict = 'mini@repair', clip = 'fixing_a_player' },
}| Setting | Default | Behaviour |
|---|---|---|
Pulls | 3 | Good pulls needed to start it. |
Sounds | true | Plays the pull sounds. |
Rumble | true | Gamepad rumble on each pull. |
Anim | The player’s animation, or false for none. |
Adding a language
English and Turkish are included.
- Copy
locales/en.luatolocales/<code>.lua. - Change
Locales.entoLocales['<code>']and translate the texts. - Set
Config.Locale = '<code>'.
Anything left untranslated falls back to English.