Configuration
All settings are in config.lua, which is not escrow-protected. Each option is also commented in the file itself.
General
Section titled “General”| Option | Default | Description |
|---|---|---|
Config.Framework |
'auto' |
'auto', 'qb', 'qbx', 'esx' or 'standalone'. Used for job and gang conditions and notifications |
Config.Inventory |
'auto' |
'auto', 'ox', 'qs', 'qb', 'esx' or 'none'. Used for item conditions and item pictures |
Config.Bridge |
'auto' |
Whether SL-Interact answers for ox_target, qb-target and qtarget. 'auto': only when that system isn’t running on the server. true: always. false: never. Also one per system: { ox_target = 'auto', ['qb-target'] = false }. See target scripts |
Config.Locale |
'en' |
Language: 'en' or 'es'. Missing texts fall back to English |
Config.Debug |
false |
Developer tools (/slinteract_perf, /slinteract_test) and extra messages in F8. Keep it off on a live server |
| Option | Default | Description |
|---|---|---|
Config.Keys |
{ 'E', 'G', 'H' } |
Keys of the label, in order. Options without a key take the first free one |
Config.BackKey |
'BACK' |
Goes one step back in a menu, or closes the label. In a menu, the second key (G) and Esc do the same |
Config.Reveal.key |
'LMENU' |
Reveal key (left Alt). See when points show |
These are the default keys. Every player can change them in Settings > Key Bindings > FiveM. FiveM only applies a new default to players who have never changed it.
When points show
Section titled “When points show”Config.Reveal sets when a point shows, by class of interaction:
| Mode | Meaning |
|---|---|
'always' |
When the player gets close |
'look' |
Only when the player looks almost straight at it |
'key' |
Only while the player holds the reveal key (Alt), like a classic target |
| Option | Default | Applies to |
|---|---|---|
default |
'always' |
Points, entities and models (addCoords, addEntity, addLocalEntity, addModel) |
globals |
'key' |
Every vehicle, ped or object (addGlobalVehicle, addGlobalPed, addGlobalObject) and scripts that come from ox_target, qb-target or qtarget global options |
players |
'key' |
Every other player (addGlobalPlayer) |
force |
nil |
A mode for everything, whatever the scripts ask. 'key' requires Alt everywhere |
mode |
'hold' |
How Alt works: 'hold' (like ox_target) or 'toggle'. See the Alt key: hold or toggle |
closeDelay |
300 |
'toggle' only: how long an open label waits before closing after you look away, in milliseconds |
lookRadius |
0.10 |
For 'look': how close to the center of the screen it must be, as a fraction of the screen height |
A script can ask for its own mode with reveal on each interaction. Admins can also choose a mode per script or per interaction in the interactions panel. Who wins, from most to least:
- The interaction, in the panel.
- Its script, in the panel.
force(or For everything in the style editor).- What the script asks (
reveal). - The class default above.
So you can require Alt for everything and still let the scripts you choose show directly, with players pressing their usual key.
The Alt key: hold or toggle
Section titled “The Alt key: hold or toggle”Config.Reveal.mode sets how Alt works with the points that only show with it (by default, vehicles and other players). It doesn’t change the points that show by themselves when you get close or look at them.
'hold' (default) |
'toggle' |
|
|---|---|---|
| How to use it | Hold Alt, aim and press the option’s key (E, G…) without letting go of Alt | Tap Alt while aiming at something and the label stays open after you let go; press the option’s key whenever you want |
| When it closes | As soon as you let go of Alt | When you tap Alt again, look away (closeDelay) or walk off |
| Menus with submenus or quantities | Navigated while holding Alt | Navigated hands-free |
| Similar to | ox_target and qb-target | SL-Interact 1.0.0 |
'hold' is what players coming from ox_target or qb-target expect. 'toggle' is more comfortable for long menus, since you don’t have to hold anything while you choose.
Config.Reveal = { -- ... mode = 'hold', -- or 'toggle' closeDelay = 300, -- 'toggle' only}The mode is only set in config.lua (the style editor doesn’t change it) and applies to every player. Restart the server to apply it. The key itself (Alt) can be changed by each player in Settings > Key Bindings > FiveM.
Points and label
Section titled “Points and label”Config.Points:
| Option | Default | Description |
|---|---|---|
distance |
2.0 |
Default meters up to which a point is visible. Each interaction can set its own |
focusRadius |
0.15 |
How close to the center of the screen a point must be to get focus |
stickiness |
1.3 |
The focused point keeps focus until another one is this many times closer to the center. 1 = always the closest |
scale |
1.0 |
Size of the points and the label |
sounds |
true |
Sounds of the label |
volume |
0.12 |
Volume, from 0.0 to 1.0 |
hideDelay |
1000 |
Milliseconds looking at the same point before the other points hide |
fade |
see file | How points fade with the distance from the crosshair: inner, outer, shade and min |
easy.angle |
28.0 |
Degrees from the center of the view for interactions marked easy |
highlight |
'outline' |
How the focused object is highlighted: 'outline', 'box', 'both' or false. The outline is only drawn on objects |
outline |
{ 255, 255, 255, 255 } |
Color of the outline and the box (r, g, b, a) |
outlineShader |
1 |
Thickness of the game outline (0 or 1) |
focusScale |
1.12 |
How much objects with grow = true grow when looked at |
Admins
Section titled “Admins”Config.StyleEditor sets who can use the style editor and the interactions panel:
| Option | Default | Description |
|---|---|---|
ace |
'sl_interact.style' |
ACE permission: add_ace group.admin sl_interact.style allow |
admins |
{} |
Identifiers allowed without the ACE: 'license:...', 'discord:...', 'fivem:...' |
Config.Shape and Config.Colors set the default look. The style editor changes the same values live, which is easier.
Config.Shape |
Default | Description |
|---|---|---|
radius |
10 |
Corners, in px. 0 = square |
border |
1.5 |
Outline thickness, in px |
edge |
2 |
3D edge under the pieces, in px. 0 = flat |
glow |
0 |
Soft glow around the pieces, in px |
dot |
'round' |
'round' or 'square' |
font |
'geist' |
'geist', 'system' or 'mono' |
uppercase |
true |
Key and option texts in capitals |
Config.Colors |
Used for |
|---|---|
ink |
Outlines and shadows |
panel |
Background of the label and the keys |
paper |
Points, icons, keys and their texts |
paperEdge |
3D edge of the light parts |
text |
Name on the label |
label |
Key and option texts |
dim |
Secondary texts |
warn |
Waiting for confirmation |
deny |
Key that can’t be used, red status |
ok |
Green status |
Any CSS color works: '#rrggbb', 'rgb(r, g, b)'…
Open files
Section titled “Open files”Besides config.lua, these are not escrow-protected:
| Path | What for |
|---|---|
bridge/framework/ |
Jobs, gangs and notifications for each framework |
bridge/inventory.lua |
Items and item pictures for each inventory |
bridge/server.lua |
Money, items and jobs on the server, used by the creator |
locales/ |
Texts. Copy en.json to add a language |
sl_interact_demo (its own folder) |
The example resource |