RX Interact Configuration (RedM)
Everything is in config.lua.
Restart
rx_interactafter changing the configuration, then restart the scripts that use it.
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 > RedM. While a prompt is up on E, the game’s own E is held back. |
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 its reach a wagon bone’s ring shows. Only the nearest one shows. |
MaxDots | 8 | Most dots on screen at once. The nearest ones win. |
LineOfSight | true | Hides prompts behind walls. |
HideInVehicle | true | No prompts on a horse or in a wagon or boat seat. |
Look
Config.Theme = 'rdr'
Config.Scale = 0.85
Config.KeyShape = 'square'
Config.HoldStyle = 'ring'| Setting | Default | Behaviour |
|---|---|---|
Theme | 'rdr' | 'rdr' uses the game’s slab type, a warm white, and a red accent. 'classic' uses the FiveM look. |
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. |
The RDR theme’s typeface is Zilla Slab (SIL Open Font License), kept in html/fonts.
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 = {
['ox_target'] = true,
['rsg-target'] = true,
['murphy_interact'] = true,
['rsg-core DrawText'] = true,
['rsg-core Notify'] = true,
['ox_lib textUI'] = true,
['ox_lib context'] = true,
['ox_lib inputDialog'] = true,
['ox_lib alertDialog'] = true,
['ox_lib notify'] = true,
['qb-menu'] = false,
['qb-input'] = false,
}
Config.MaxDistance = 7.0
Config.OxDistance = 2.0| Entry | What it covers |
|---|---|
ox_target | ox_target and its RedM forks (RSG’s, VORP servers’): zones, entities, models, every ped, vehicle, object, and player, groups, items, canInteract, and onSelect, export, event, serverEvent, and command. |
rsg-target | Its old qb-target style exports (AddBoxZone, AddTargetModel, …) and the new v3 ox-style ones. |
murphy_interact | AddInteraction, AddLocalEntityInteraction, AddModelInteraction, the global interactions, and the removes. |
rsg-core DrawText | DrawText, ChangeText, HideText, KeyPressed, and IsTextShown, shown as key hints. |
rsg-core Notify | exports['rsg-core']:Notify, and the RSGCore:Notify event when your rsg-core has no Notify of its own. |
ox_lib textUI, context, inputDialog, alertDialog, notify | Text UI, context menus, input forms, confirm boxes, and notifications. |
qb-menu, qb-input | Off by default. For scripts ported over from FiveM. |
| Setting | Default | Behaviour |
|---|---|---|
MaxDistance | 7.0 | Distance for rsg-target (qb-target style) 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. |
Moving over from rsg-target
The tables from rsg-target’s config 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 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 the game’s menu 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 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 rsg-core’s Notify.
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-star', color = { 96, 150, 232 } },
ambulance = { icon = 'fa-solid fa-kit-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 the game’s, false plays none. |
Types | Icon (a Font Awesome class) and colour for each type. police is the law, with a sheriff’s star; ambulance is the doctor. Without a colour, Config.Color is used. A script’s own icon or colour always wins. |
Skill check minigame
A dot goes round the key; the player presses when it is on the lit slice. For picking a lock, skinning, breaking a horse, or anything else that wants a steady hand.
Config.Skill = {
Rounds = 3,
Misses = 2,
Speed = 1.0,
Zone = 1.0,
Sounds = true,
Rumble = true,
}| Setting | Default | Behaviour |
|---|---|---|
Rounds | 3 | Hits needed. |
Misses | 2 | Misses allowed. One more fails it. |
Speed | 1.0 | 1 is a round in 1.6 seconds. Each hit is a little faster and turns the other way. |
Zone | 1.0 | The slice’s size, 1 being about 50 degrees. Each hit makes it a little smaller. |
Sounds | true | Plays the skill check sounds. |
Rumble | true | Gamepad rumble on each press. |
Safe minigame
Config.Safe = {
Count = 3,
Max = 99,
Feel = true,
Sounds = true,
Camera = true,
CameraFov = 42.0,
Anim = false,
}| 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 | true | true plays RX Interact’s own safe sounds, 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 | false | The player’s animation at the dial, as { dict, idle = { clips }, right = { clips }, left = { clips } }, or false for none. |
Pump minigame
A water pump, a well, or a bellows, worked a few strokes until it gives.
Config.Pull = {
Pulls = 3,
Sounds = true,
Rumble = true,
Anim = { scenario = 'PROP_HUMAN_PUMP_WATER' },
}| Setting | Default | Behaviour |
|---|---|---|
Pulls | 3 | Good strokes needed. |
Sounds | true | Plays the pump sounds. |
Rumble | true | Gamepad rumble on each stroke. |
Anim | A scenario, or { dict, clip }, or false for none. |
Test command
Config.TestCommand = trueTurns on /rxitest, which places every part in front of you to try in game. Set it to false on a live server.
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.