|
| 1 | +import { Callout, Tabs } from "nextra/components"; |
| 2 | + |
| 3 | +# Configuration Guide |
| 4 | + |
| 5 | +This comprehensive guide covers all configuration options available in Zerio Bossmenu. Each configuration file serves a specific purpose and allows you to customize the script to your server's needs. |
| 6 | + |
| 7 | +<Callout type="warning"> |
| 8 | + **Important**: Always restart your server or the resource after making configuration changes. Some changes may require database updates or framework modifications. |
| 9 | +</Callout> |
| 10 | + |
| 11 | +## Configuration Files Overview |
| 12 | + |
| 13 | +Zerio Bossmenu uses multiple configuration files located in the `configs/` folder: |
| 14 | + |
| 15 | +- **`main.lua`** - Core settings, currency, limits, and features |
| 16 | +- **`framework.lua`** - Framework detection and compatibility (shouldnt need editing) |
| 17 | +- **`opentype.lua`** - Interaction methods - options related to opening the Bossmenu |
| 18 | +- **`server.lua`** - Server-side settings such as discord webhooks |
| 19 | +- **`adminmenu.lua`** - Administrative menu configuration |
| 20 | + |
| 21 | +## Main Configuration (`configs/main.lua`) |
| 22 | + |
| 23 | +### Localization & Display |
| 24 | + |
| 25 | +```lua |
| 26 | +Config.Locale = "en" -- Language file to use |
| 27 | +Config.Currency = "USD" -- Official JavaScript currency code |
| 28 | +Config.CurrencySymbol = "$" -- Symbol used in input fields |
| 29 | +Config.TimeFormat = "en-US" -- JavaScript time format |
| 30 | +``` |
| 31 | + |
| 32 | +**Available Locales:** |
| 33 | +Check the `locales/` folder for available language files. |
| 34 | + |
| 35 | +You can create new ones at any time. |
| 36 | + |
| 37 | +### Banking Integration |
| 38 | + |
| 39 | +```lua |
| 40 | +Config.ManagementScript = "esx_society" |
| 41 | +``` |
| 42 | + |
| 43 | +**Supported Options:** |
| 44 | +- `esx_society` - ESX society system |
| 45 | +- `qb-management` - QBCore management |
| 46 | +- `qb-banking` - QBCore banking |
| 47 | +- `okokBanking` - okokBanking (does NOT work with gangs) |
| 48 | +- `renewedbanking` - Renewed Banking |
| 49 | +- `fd_banking` - FD Banking |
| 50 | + |
| 51 | +<Callout type="info"> |
| 52 | + **Custom Banking**: You can add support for custom banking systems by modifying the banking functions in `server/functions.lua`. |
| 53 | +</Callout> |
| 54 | + |
| 55 | +### Employee Management |
| 56 | + |
| 57 | +```lua |
| 58 | +Config.MaxHireDistance = 20 -- Max distance to show in hire list (-1 for no limit) |
| 59 | +Config.DefaultJob = "unemployed" -- Job assigned after firing |
| 60 | +Config.DefaultGrade = 0 -- Grade assigned after firing |
| 61 | +Config.DefaultGang = "none" -- Gang assigned after firing (gangs) |
| 62 | +Config.DefaultGangGrade = 0 -- Gang grade assigned after firing |
| 63 | +``` |
| 64 | + |
| 65 | +### Work Session Tracking |
| 66 | + |
| 67 | +```lua |
| 68 | +Config.TrackWorkSessions = true -- Enable work session monitoring |
| 69 | +``` |
| 70 | + |
| 71 | +When enabled, this feature tracks: |
| 72 | +- Employee clock-in/clock-out times |
| 73 | +- Session duration |
| 74 | +- Activity logging |
| 75 | +- Performance metrics |
| 76 | + |
| 77 | +### Salary Limits |
| 78 | + |
| 79 | +```lua |
| 80 | +Config.MaxSalaries = { |
| 81 | + ["police"] = 15000, |
| 82 | + ["ambulance"] = 12000, |
| 83 | + ["mechanic"] = 8000, |
| 84 | + -- Add more jobs as needed |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +**Usage:** |
| 89 | +- Set maximum salary per job to prevent abuse |
| 90 | +- Use `nil` or omit entry for no limit |
| 91 | +- Applies to both individual and role-based salaries |
| 92 | + |
| 93 | +### Vehicle Management |
| 94 | + |
| 95 | +```lua |
| 96 | +Config.VehicleDeliveryTime = 1 * 60 -- Delivery time in seconds (1 minute) |
| 97 | +Config.VehicleCancelRefundPercentage = 75 -- Refund % when cancelling orders (0-100) |
| 98 | +Config.VehicleSellBackPercentage = 50 -- Refund % when selling vehicles (0-100) |
| 99 | +``` |
| 100 | + |
| 101 | +### Vehicle Plate Configuration |
| 102 | + |
| 103 | +```lua |
| 104 | +Config.PlateFirstLength = 3 -- Length of first part of plate |
| 105 | +Config.PlateHasSpace = false -- Whether plates have spaces |
| 106 | +Config.PlateSecondLength = 3 -- Length of second part of plate |
| 107 | +``` |
| 108 | + |
| 109 | +**Examples:** |
| 110 | +- `ABC123` (PlateFirstLength=3, PlateHasSpace=false, PlateSecondLength=3) |
| 111 | +- `ABC 123` (PlateFirstLength=3, PlateHasSpace=true, PlateSecondLength=3) |
| 112 | + |
| 113 | +### Item Ordering |
| 114 | + |
| 115 | +```lua |
| 116 | +Config.ItemDeliveryTime = 1 * 60 -- Delivery time in seconds |
| 117 | +Config.OrderCancelRefundPercentage = 75 -- Refund % for cancelled orders |
| 118 | + |
| 119 | +-- Stash configuration |
| 120 | +Config.StashNames = { |
| 121 | + ["police"] = "policelocker", |
| 122 | + ["ambulance"] = "ambulance_stash", |
| 123 | + -- Add more job stashes |
| 124 | +} |
| 125 | + |
| 126 | +-- Item metadata (optional) |
| 127 | +Config.ItemMetadata = { |
| 128 | + -- This can be used to add extra metadata to the ordered items |
| 129 | + ["bread"] = { |
| 130 | + ["category"] = "food", |
| 131 | + } |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +### Logging System |
| 136 | + |
| 137 | +```lua |
| 138 | +Config.CleanOldLogs = true -- Enable automatic log cleanup |
| 139 | +Config.LogRetentionDays = 90 -- Keep logs for X days (-1 to disable) |
| 140 | +``` |
| 141 | + |
| 142 | +### Debug Mode |
| 143 | + |
| 144 | +```lua |
| 145 | +Config.Debug = false -- Enable debug output |
| 146 | +``` |
| 147 | + |
| 148 | +Enable for troubleshooting. Adds extra console output for debugging purposes. |
| 149 | + |
| 150 | +## Framework Configuration (`configs/framework.lua`) |
| 151 | + |
| 152 | +<Callout type="info"> |
| 153 | + **Auto-Detection**: This file usually doesn't need modification as framework detection is automatic. |
| 154 | +</Callout> |
| 155 | + |
| 156 | +```lua |
| 157 | +-- Auto-detection logic |
| 158 | +if GetResourceState("es_extended") ~= "missing" then |
| 159 | + Config.Framework = "esx" |
| 160 | + Config.FrameworkResourceName = "es_extended" |
| 161 | + Config.FrameworkEvent = "esx:getSharedObject" |
| 162 | +elseif GetResourceState("qb-core") ~= "missing" or GetResourceState("qbx_core") ~= "missing" then |
| 163 | + Config.Framework = "qbcore" |
| 164 | + Config.IsQBox = GetResourceState("qbx_core") ~= "missing" |
| 165 | + Config.FrameworkResourceName = Config.IsQBox and "qbx_core" or "qb-core" |
| 166 | +end |
| 167 | +``` |
| 168 | + |
| 169 | +**Manual Override** (if needed): |
| 170 | +```lua |
| 171 | +Config.Framework = "esx" -- Force framework type |
| 172 | +Config.FrameworkResourceName = "my_custom_esx" -- Custom resource name |
| 173 | +``` |
| 174 | + |
| 175 | +## Interaction Configuration (`configs/opentype.lua`) |
| 176 | + |
| 177 | +### Interaction Method |
| 178 | + |
| 179 | +```lua |
| 180 | +Config.HelpTextType = "normal" |
| 181 | +``` |
| 182 | + |
| 183 | +**Available Options:** |
| 184 | + |
| 185 | +<Tabs items={['Normal', 'Target', 'Proximity']}> |
| 186 | + <Tabs.Tab> |
| 187 | + **Normal** - Standard floating help text |
| 188 | + |
| 189 | + ```lua |
| 190 | + Config.HelpTextType = "normal" |
| 191 | + Config.OpenKey = 38 -- E key (default) |
| 192 | + ``` |
| 193 | + |
| 194 | + Shows standard FiveM help text when near boss menu positions. |
| 195 | + </Tabs.Tab> |
| 196 | + |
| 197 | + <Tabs.Tab> |
| 198 | + **Target** - Targeting script integration |
| 199 | + |
| 200 | + ```lua |
| 201 | + Config.HelpTextType = "target" |
| 202 | + Config.TargetScript = "ox_target" -- or "qb-target", "qtarget" |
| 203 | + ``` |
| 204 | + |
| 205 | + Integrates with popular targeting scripts for immersive interaction. |
| 206 | + </Tabs.Tab> |
| 207 | + |
| 208 | + <Tabs.Tab> |
| 209 | + **Proximity** - Zerio proximity prompts |
| 210 | + |
| 211 | + ```lua |
| 212 | + Config.HelpTextType = "proximity" |
| 213 | + ``` |
| 214 | + |
| 215 | + Requires `zerio-proximityprompt` resource for enhanced proximity interactions. |
| 216 | + </Tabs.Tab> |
| 217 | +</Tabs> |
| 218 | + |
| 219 | +### Target Script Options |
| 220 | + |
| 221 | +```lua |
| 222 | +Config.TargetScript = "ox_target" |
| 223 | +``` |
| 224 | + |
| 225 | +**Supported Scripts:** |
| 226 | +- `ox_target` - Overextended target |
| 227 | +- `qb-target` - QBCore target |
| 228 | +- `qtarget` - Standalone qtarget |
| 229 | + |
| 230 | +### Distance Configuration |
| 231 | + |
| 232 | +```lua |
| 233 | +Config.Dists = { |
| 234 | + ["HelpText"] = 2.5, -- Distance to show help text |
| 235 | + ["Usage"] = 2.0, -- Distance to allow interaction |
| 236 | + ["DUIRender"] = 20.0 -- Distance to render 3D models |
| 237 | +} |
| 238 | + |
| 239 | +Config.DistanceCheckWait = 500 -- How often to check distance (ms) |
| 240 | +``` |
| 241 | + |
| 242 | +### Controls |
| 243 | + |
| 244 | +```lua |
| 245 | +Config.OpenKey = 38 -- Control ID for opening menu |
| 246 | +``` |
| 247 | + |
| 248 | +Refer to [FiveM Controls Reference](https://docs.fivem.net/docs/game-references/controls/) for more options. |
| 249 | + |
| 250 | +## Server Configuration (`configs/server.lua`) |
| 251 | + |
| 252 | +This file contains server-side specific settings such as discord webhooks. |
| 253 | + |
| 254 | +```lua |
| 255 | +Config.Logs = { |
| 256 | + Enabled = false, -- If set to true discord logs will be enabled. |
| 257 | + |
| 258 | + Color = 16484351, -- Color for embeds, you can use https://www.spycolor.com/ to see the color code (its the "decimal value") |
| 259 | + |
| 260 | + Username = "Zerio-Bossmenu", |
| 261 | + CommunityName = "Zerio-Scripts", |
| 262 | + |
| 263 | + CommunityLogo = "", -- Image link |
| 264 | + FooterIcon = "", -- Image link |
| 265 | + Avatar = "", -- Image link |
| 266 | + |
| 267 | + Webhooks = { |
| 268 | + ACTION = "Webhook Link" |
| 269 | + } |
| 270 | +} |
| 271 | +``` |
| 272 | + |
| 273 | +## Admin Menu Configuration (`configs/adminmenu.lua`) |
| 274 | + |
| 275 | +```lua |
| 276 | +Config.AdminCommand = "bossmenuadmin" -- Command to open admin menu |
| 277 | + |
| 278 | +-- Session tracking settings |
| 279 | +Config.TrackingSessions = true |
| 280 | +Config.SessionTimeout = 30 * 60 -- 30 minutes in seconds |
| 281 | + |
| 282 | +-- Activity tracking settings |
| 283 | +Config.TrackingActivities = true |
| 284 | +Config.ActivityRetentionDays = 30 -- How many days to keep activity logs |
| 285 | +``` |
| 286 | + |
| 287 | +## Troubleshooting Configuration Issues |
| 288 | + |
| 289 | +### Common Problems |
| 290 | + |
| 291 | +**Menu Not Opening:** |
| 292 | +1. Check `Config.HelpTextType` matches your setup |
| 293 | +2. Verify `Config.TargetScript` if using target mode |
| 294 | +3. Ensure boss menu positions are created via admin menu |
| 295 | + |
| 296 | +**Framework Integration Issues:** |
| 297 | +1. Verify `Config.Framework` detection |
| 298 | +2. Check `Config.FrameworkResourceName` matches your setup |
| 299 | +3. Ensure proper load order in server.cfg |
| 300 | + |
| 301 | +**Banking Problems:** |
| 302 | +1. Confirm `Config.ManagementScript` matches your banking system |
| 303 | +2. Verify banking integration in `server/functions.lua` |
| 304 | +3. Check society/gang accounts exist |
| 305 | + |
| 306 | +**Permission Issues:** |
| 307 | +1. Review admin permissions configuration |
| 308 | +2. Verify job grades have proper access |
| 309 | +3. Check framework permission system integration |
| 310 | + |
| 311 | +### Validation |
| 312 | + |
| 313 | +After configuration changes: |
| 314 | + |
| 315 | +1. **Restart Server**: Full server restart required |
| 316 | +2. **Check Console**: Look for configuration errors |
| 317 | +3. **Test Features**: Verify each configured feature works |
| 318 | +4. **Review Logs**: Check for any warning messages |
| 319 | + |
| 320 | +<Callout type="info"> |
| 321 | + **Configuration Templates**: Example configurations for common setups are available in our Discord community. |
| 322 | +</Callout> |
| 323 | + |
| 324 | +## Next Steps |
| 325 | + |
| 326 | +After completing configuration: |
| 327 | +1. Set up boss menu positions using the admin command |
| 328 | +2. Configure job-specific vehicle and item catalogs |
| 329 | +3. Test employee management features |
| 330 | +4. Review and adjust permissions as needed |
| 331 | + |
| 332 | +For advanced customization options, see the [Developer Documentation](/bossmenu/devdocs) section. |
0 commit comments