Configuration
The config.lua options: key, targeting, security, built-in option pack and bridge.
#Language and command
Lua
Config.Locale = 'fr' -- Lua messages: 'fr' | 'en' (the NUI interface is in French)
Config.Command = 'gestioncontexte' -- in-game management command (admins)Interface language
The management panel (NUI) is currently in French. Config.Locale only changes the messages sent from Lua.
#Opening
Lua
Config.OpenMode = 'toggle' -- 'toggle' (press = open / close) or 'hold' (keep the key pressed)
Config.DefaultKey = 'LMENU' -- Left Alt; every player can change it in Settings > Key Bindings > FiveM#Targeting
| Option | Default | Role |
|---|---|---|
Config.RayDistance | 60.0 | Maximum ray range from the camera (m) |
Config.DefaultDistance | 6.0 | Player → aimed point distance when the option gives none (0 = unlimited) |
Config.RayFlags | 31 | What the ray hits: 1 world + 2 vehicles + 4/8 peds + 16 objects |
Config.HoverInterval | 100 | Milliseconds between two hover rays |
Config.EdgeScroll | true | Turn the camera by pushing the cursor to the screen edge |
#Highlight of the hovered entity
Lua
Config.Highlight = { enabled = true, r = 115, g = 132, b = 232, a = 255 }#Security
| Option | Role |
|---|---|
Config.ServerDistanceTolerance | Margin (m) on the server-side distance check (server_export actions) |
Config.ManageAce | ACE required for /gestioncontexte (nil = Config.Bridge.AdminAce / admin groups) |
Config.AllowedActionTypes | Action types that can be created: client_event, server_event, command, export, server_export |
Config.MaxOptions | Maximum number of options (default 400) |
Hardening a server
Set to false the action types you do not need in Config.AllowedActionTypes (for example command): they can no longer be created from the panel.
#Options declared in the file
A way to add options without the panel or a script's code. They are read-only and reloaded at every start.
Lua
Config.Options = {
{ key = 'rumor', label = 'Talk', icon = 'user', types = { 'ped' }, distance = 3.0,
serverEvent = 'myscript:talk', args = { topic = 'rumor' } },
{ key = 'trunk', label = 'Open the trunk', icon = 'box', types = { 'vehicle' }, groups = { police = 0 },
export = 'myscript.openTrunk' },
}#Built-in option pack
Each group can be switched off separately. “Staff” options require admin rights.
Lua
Config.Pack = {
Enabled = true,
Player = true, -- search, carry, detach object, clean up, combat on/off
Vehicle = true, -- doors, tow, trunk
Object = true, -- props (duplicate / move / delete)
Staff = true, -- “Staff” submenus: player, ped, vehicle, object, world
Dev = true, -- “Dev” submenus: armour, drift mode, copy coords, teleport, orbital strike
Vision = true, -- calls Vision core functions / commands / events when present
OrbitalCountdown = 3, -- seconds before the orbital strike (0 = immediate); Backspace cancels
OrbitalDamage = 5000,
DevAce = nil, -- extra ACE required for Dev options outside Vision
}Pack details are on the Usage page.
#Bridge
Lua
Config.Bridge = {
Framework = 'auto', -- auto | vision | qbox | qbcore | esx | standalone
Inventory = 'auto',
Target = 'auto',
Society = 'auto',
Callbacks = 'auto',
Debug = false,
Admins = {}, -- allowed identifiers (e.g. 'license:xxxx')
AdminAce = 'command', -- ACE treated as admin
Standalone = {}, -- standalone hooks (getJob, ...)
}#Full file
Show config.lua (78 lines)
config.luaDownload
Config = {}
-- ═══════════════════════════════════════════════════════════════════════════
-- TC Context Menu - configuration / settings
-- ═══════════════════════════════════════════════════════════════════════════
Config.Locale = 'fr' -- messages Lua : 'fr' | 'en' (l'interface NUI est en français)
-- Commande de gestion en jeu (admins) / in-game management command (admins)
Config.Command = 'gestioncontexte'
-- Ouverture : 'toggle' (appui = ouvre/ferme) ou 'hold' (maintenir la touche)
-- Opening: 'toggle' (press to open/close) or 'hold' (keep key pressed)
Config.OpenMode = 'toggle'
Config.DefaultKey = 'LMENU' -- Alt gauche ; chaque joueur peut la changer dans Paramètres > Touches > FiveM
-- Ciblage / targeting
Config.RayDistance = 60.0 -- portée max du rayon depuis la caméra (m)
Config.DefaultDistance = 6.0 -- distance joueur -> point visé si l'option n'en précise pas (0 = illimité)
Config.RayFlags = 31 -- 1 map + 2 véhicules + 4/8 peds + 16 objets
Config.HoverInterval = 100 -- ms entre deux rayons de survol
Config.EdgeScroll = true -- tourner la caméra en poussant le curseur sur le bord de l'écran
-- Surbrillance de l'entité survolée / hovered entity outline
Config.Highlight = { enabled = true, r = 115, g = 132, b = 232, a = 255 }
-- Sécurité / security
Config.ServerDistanceTolerance = 6.0 -- marge (m) sur la vérif de distance côté serveur (actions `server_export`)
Config.ManageAce = nil -- ACE requis pour /gestioncontexte (nil = Config.Bridge.AdminAce / groupes admin)
Config.AllowedActionTypes = { -- types d'action autorisables à la création
client_event = true, -- TriggerEvent(nom, ctx, args) (client)
server_event = true, -- TriggerServerEvent(nom, ctx, args) (client -> serveur)
command = true, -- ExecuteCommand(nom .. args) (client)
export = true, -- exports[res]:fn(ctx, args) (client)
server_export = true, -- exports[res]:fn(src, ctx, args) (serveur, revalidé)
}
Config.MaxOptions = 400
-- ─── Options déclarées ici (facultatif) ─────────────────────────────────────
-- Autre façon de les ajouter : /gestioncontexte (en base, permanent) ou depuis un script (voir README / init.lua).
-- Mêmes champs que dans le panneau ; lecture seule, rechargées à chaque démarrage. Exemple :
Config.Options = {
-- { key = 'rumeur', label = 'Parler', icon = 'user', types = { 'ped' }, distance = 3.0,
-- serverEvent = 'monscript:parler', args = { sujet = 'rumeur' } },
-- { key = 'coffre', label = 'Ouvrir le coffre', icon = 'box', types = { 'vehicle' }, groups = { police = 0 },
-- export = 'monscript.ouvrirCoffre' },
}
-- ─── Pack d'options intégrées (équivalent du menu contextuel Vision) ───────
-- Chaque groupe peut être coupé. Les options « staff » exigent un droit admin :
-- Vision : permissions du panneau staff (contextmenu / dev / devcontextmenu...), lues côté client
-- autres : admin vérifié par le serveur (ACE / groupe, voir Config.Bridge.AdminAce)
Config.Pack = {
Enabled = true,
Player = true, -- fouiller, porter, détacher un objet, se nettoyer, combat on/off
Vehicle = true, -- portes, remorque, coffre
Object = true, -- décor (dupliquer / déplacer / supprimer)
Staff = true, -- sous-menus « Staff » : joueur, PNJ, véhicule, objet, monde
Dev = true, -- sous-menus « Dev » : armure, mode drift, copier coords, téléport, frappe orbitale
Vision = true, -- appelle les fonctions/commandes/événements du core Vision quand il est présent
OrbitalCountdown = 3, -- secondes avant la frappe orbitale (0 = immédiat) ; Retour arrière annule
OrbitalDamage = 5000,
DevAce = nil, -- ACE supplémentaire exigé pour les options Dev hors Vision (nil = admin suffit)
}
-- ─── Couche de compatibilité framework / framework compatibility ──────────
Config.Bridge = {
Framework = 'auto', -- auto | vision | qbox | qbcore | esx | standalone
Inventory = 'auto',
Target = 'auto',
Society = 'auto',
Callbacks = 'auto',
Debug = false,
Admins = {}, -- identifiants autorisés (ex: 'license:xxxx') / allowed identifiers
AdminAce = 'command', -- ACE considéré comme admin / ACE treated as admin
Standalone = {}, -- hooks standalone (getJob, ...)
}#Theme
The theme is tc-ui's (the kit's --tc-* variables, see NUI kit). Only the floating menu styles are in web/ctx.css.