DocsCrosshair

Configuration

Every option in config.lua and how to switch language.

Not released yet. These pages are written from the code of manniche_crosshair and can change before the release.

General

All options are in config.lua. Values are validated on start.

OptionDefaultWhat it does
Config.Framework'auto''auto', 'esx', 'qbcore', 'qbox' or 'standalone'.
Config.Locale'da'Language of Lua-side messages and the starting language for new players. 'en' or 'da'.
Config.Command'crosshair'Chat command that opens the editor.
Config.CommandAliasfalseOptional second command, for example 'mnc'.
Config.OpenKey''Default key for the key mapping. Empty means unbound.
Config.RegisterKeyMappingtrueShows the binding "Open Manniche Crosshair" in FiveM Key Bindings.
Config.HideDefaultReticletrueHides the GTA reticle. This is the only per-frame native call, and only while armed.
Config.DefaultProfile'mn-clean'Preset id used for new players.
Config.GlobalScale1.0Multiplier on top of each profile's scale.
Config.DebugfalseDebug output. Also enables the client command manniche_crosshair_debug.

Feature flags

OptionDefaultWhat it does
Config.EnableWeaponProfilestrueSwitch crosshair automatically per weapon category.
Config.EnableDamageFeedbacktrueRecolour or animate the reticle when the player damages a ped.
Config.EnablePresetstrueShow the built-in preset library.
Config.EnableSharingtrueAllow import and export of share codes. When off, the server refuses imports.
Config.EnableFireFeedbacktrueBrief expansion while shooting.

Visibility

Config.Visibility hides the crosshair when a rule is enabled and matches.

KeyDefaultWhat it does
hideWhenUnarmedtrueNo weapon in hand.
hideOnMeleetrueMelee weapons.
hideOnThrownfalseGrenades, molotovs and similar.
hideWhenScopedtrueSniper scope.
hideInVehiclefalseHide inside vehicles.
hideWhenDeadtrueHide when dead.
hideInPauseMenutrueHide in the pause menu.

Limits and performance

Config.Limits

KeyDefaultWhat it does
maxProfiles60Saved profiles per player.
maxNameLength32Longest profile name.
maxImportLength2048Longest accepted share code.

Config.Performance

KeyDefaultWhat it does
stateInterval250Milliseconds between weapon and visibility checks. The config comment suggests 150 to 400.
idleInterval750Interval in milliseconds while the player is unarmed.

Storage and admin

Config.Storage

KeyDefaultWhat it does
driver'json''json' or 'mysql'. See Storage.
saveDebounce5000Milliseconds between writes of changed data. The flush loop never runs faster than every 1000 ms.
identifier'license'Identifier type used as key: 'license', 'steam', 'discord' or 'fivem'.

Config.Admin

KeyDefaultWhat it does
enabledfalseTurns on admin actions for players. See Admin.
acePermission'manniche_crosshair.admin'ACE permission checked for players.
command'manniche_crosshair_admin'Name of the console command.

Weapon overrides

Config.WeaponOverrides (default {}) maps weapon names or hashes to a category. Valid categories: pistol, smg, rifle, shotgun, sniper, lmg, melee, thrown, heavy, special. An unknown category prints a console warning.

Config.WeaponOverrides = {
    ['WEAPON_MY_CUSTOM_AR'] = 'rifle',
}

Language

Config.Locale sets the language of chat and notification messages. It is also the starting language for new players. Players can change the panel language under Settings. The supported values are 'en' and 'da'.

To add a language, copy locales/en.lua to a new file, change Locales['en'] to your code and translate it. The top-level keys are Lua messages. The optional ui table overrides interface text. Missing keys fall back to English. The per-player language setting only accepts en and da.