Getting Started
Configuration
Change the settings to fit your server.
All settings live in the config file inside the script folder. Every option is commented so you know what it does.
Editing the config#
- Open
resources/zolt_crosshair/config.luain a code editor (VS Code is recommended). - Change the values you need. Keep the commas and brackets intact.
- Save the file and restart the script.
config.lua· lua
Config = {} -- Command that opens the crosshair editorConfig.Command = 'crosshair' -- Default key for the command -- Leave '' for no default key.Config.Keybind = '' -- When the crosshair is drawn:-- 'armed' = always while a gun is in hand-- 'aiming' = only while aiming / scoped inConfig.ShowWhen = 'armed' -- Hide the GTA reticle (the white dot) while holding a gunConfig.HideNativeReticle = true -- Crosshair a new player starts withConfig.DefaultCode = '0;P;h;0;0l;4;0o;2;0a;1;0f;0;1b;0' -- Hide crosshair while sitting in a vehicleConfig.HideInVehicle = false -- Hide crosshair while looking through a sniper scope (the scope has its own reticle)Config.HideWhenScoped = true -- Size multiplier. Values are pixels at 1080p.Config.Scale = 1.0 -- Scale relative to 1080p (so 1440p draws 1.33x bigger). Off = pixel-exact.Config.ScaleWithResolution = false -- Community library: players publish crosshairs, others browse / use them by share ID.-- Stored in data/published.json. Admins with the ace 'zolt_crosshair.admin' can delete any entry. * add_ace group.admin zolt_crosshair.admin allow *Config.Community = { Enabled = true, MaxPerPlayer = 10, -- published crosshairs per player PublishCooldown = 30, -- seconds between publishes DiscordAvatars = true,} -- Presets shown in the Library tabConfig.Presets = { { name = 'Classic', code = '0' }, { name = 'Small static cross', code = '0;P;h;0;0l;4;0o;2;0a;1;0f;0;1b;0' }, { name = 'Cyan dot', code = '0;P;c;5;h;0;d;1;z;3;a;1;0b;0;1b;0' }, { name = 'Outlined plus', code = '0;P;c;1;o;1;0t;1;0l;3;0o;0;0a;1;0f;0;1b;0' }, { name = 'Dynamic gap', code = '0;P;c;4;h;0;0t;1;0l;3;0o;3;0a;1;1t;1;1l;2;1o;6;1a;0.6' },}Applying changes#
Restart just this script from the server console or txAdmin:
Server console· bash
restart zolt_crosshairWarning
If you see a Lua syntax error after editing, you've most likely removed a comma or a quote. Undo your last change and try again.