Studios
Casinohouse-3.jpg

Configuration

SoonCasinoQBCore · Qbox · ESX
PAGE 03 OF 09  ·  INSTALLATION → CONFIGURATION → EXAMPLESdocs.glitchstudios.dev
Browse docs

config.lua is shared with clients and config_sv.lua holds the server-only settings. Both are open files you can edit. To keep your changes out of them, add your own files:

  • profile/shared/<name>.lua loads right after config.lua, on the server and on clients.
  • profile/server/<name>.lua loads right after config_sv.lua and before every other server script.

Each file only sets what it changes:

Config.SlotBrand = "DIAMOND"
ConfigSV.OpenClose.door = "casino_frontdoor"

config.lua#

Setting Default / what it does
Config.Language "en". Strings are in locales/translations/en.lua.
Config.Debug false
Config.ImageDirectory "nui://ox_inventory/web/images/". Where item icons load from.
Config.RenderDistance 50.0. How close a player must be for tables, dealers and machines to spawn.
Config.InteractDistance 2.5
Config.EventRange 100.0. Table updates go to players within this distance. Keep it above Config.RenderDistance.
Config.UseObjectGizmo true. Use object_gizmo when it runs; otherwise the default movement system.
Config.CashierUI "nui". Use "ox" for ox_lib context and input dialogs.
Config.MaximumChipPurchaseAmount 100000. Most chips bought at once.
Config.MaximumItemPurchaseAmount 100. Most items bought from a casino store at once.
Config.MaxWager 1000000
Config.MaxVipPrice 1000000. Highest VIP price a manager can set.
Config.PlaceDistance 15.0. How close a player must be to place or move a personal casino machine.
Config.ManagementRange 25.0. How close a manager must be to the manage point to deposit or withdraw.
Config.CooldownTime 10. Wager actions per second a player can send. Extra ones are ignored.
Config.XPEnabled false. Pay lucky wheel xp prizes through bridge/xp.
Config.PauseMenuLegend true. Report blip names to glitch-pauseMenu when it runs.
Config.SlotBrand "THE CASINO". Name in the slot screen header.
Config.DisplayCurrencyAsChips false
Config.NuiVolume 0.25. Volume of every casino UI sound, 0.0 to 1.0.
Config.Currency { currency = "USD", countryCode = "en-US" }
Config.AdminGroups group.admin, group.god, admin, superadmin, god
Config.FrameworkSettings.dirtyMoney "black_money". Dirty money item name, or "DEFAULT" for dirty_money.

Integrations and employees#

Config.Integrations = { uiElements = true, spawnSelector = true, cloudsLoading = true }
Config.Employees = { range = 10.0, onlyUnemployed = false, unemployedJob = "unemployed" }

Each integration is also checked at run time, so a resource that is not started is skipped.

Casino economy#

Config.Casinos = {
    vipExpireTime = 86400 * 7,
    tax = 10,
    taxRecipients = { ["police"] = 50, ["ambulance"] = 50 },
    profitPercent = 5,
}

tax is the percentage taken from profit when a casino withdraws clean cash. It goes to glitch-treasury when that runs. Otherwise it is split between taxRecipients, which should add up to 100. profitPercent is the store profit the casino keeps. Set vipExpireTime to 0 for permanent VIP.

Games#

Setting What it does
Config.GameTimes seatTurnTime and waitingTime per table game, 15 seconds each by default.
Config.Roulette StraightPayout = 36.
Config.BlackjackOdds Percent chances (out of 100) that the dealer's cards are forced. Set a value to 0 to leave that phase fully random.
Config.Poker buttonModel, the prop that marks the dealer.
Config.Slots The three slot games: symbols, reel weights, pays and paylines.
Config.HarbourHeist bets = { 20, 50, 100, 150, 200 }, defaultBet = 2 (an index), bigWin = { big = 15, mega = 50, epic = 100 }, announceX = 100, spectateRange, drawRange, spectateMax = 2, collectTimeout = 180, machineModels, screen fitting and sounds. The maths are in modules/harbourheist/shared.lua.
Config.HorseRacing Tracks and odds.
Config.LuckyWheel spinCooldown = 86400, paidCooldown = true, rotateVehicle = true, rotateVehicleRange = 25.0 and the prize sections.
Config.LuckyTicket enabled = false, item = "lucky_ticket", chipsPerTicket = 5000, skipsCooldown = false and eligibleGames.
Config.CreatorOptions Store stock and prices, dealer peds and table models offered in the creator. The creator only accepts the models listed here.
Config.PlaceableEntities Which item places which game: blackjack_table, baccarat_table, roulette_table, thunder_roulette_table, poker_table, wheel_machine, horseracing_machine and slot_machine.

Lucky wheel prizes are vehicle, money, item and chips, each with a casinoCost. In a player-owned casino the vault has to cover that cost, otherwise the spin is refunded and the prize cancelled. An item prize that does not exist in your inventory is skipped with a console warning.

Screens, HUD and audio#

Setting Default
Config.MachineScreens attract = true, attractRange = 20.0, watchRange = 25.0, watchMax = 2. Each live screen is a browser, so keep these low.
Config.CasinoHud enabled = true, history = 20, dayOffsetHours = 0, defaultStyle = "cycle", cycleSeconds = 300. Set dayOffsetHours to your server's UTC offset.
Config.PlaySession bigWinX = 15, summary = true. A toast on big wins and one summary when a player leaves a machine.
Config.PickMany max = 40, sameModelRadius = 6.0, undoSeconds = 300. Laser several map cabinets in /casinos and create them at once.
Config.AmbientAudio Presets for casino audio zones. file is an audio URL your players can reach. Leave it nil for the GTA casino stream only.
Config.CasinoSociety Empty. [3] = "casino" banks casino id 3 into the casino society account.
Config.EntryNotice enabled = false. Lists casino ids with entrance triggers and a leave spot. The commented example in the file shows the layout.

config_sv.lua#

Setting Default / what it does
ConfigSV.SocietyBanking "auto". The first started of omes_banking, Renewed-Banking, qb-management and qb-banking. Name one, or use "none".
ConfigSV.Treasury { enabled = true, resource = "glitch-treasury", category = "casino_tax" }
ConfigSV.LogResource "glitch-admin". Logs go to its Log export when it runs.
ConfigSV.Webhooks Entries harbourHeistBigWin, purchaseChips, sellChips and casinoRig. Each has webhook (a glitch-admin channel name) and url (a webhook URL, used only without glitch-admin), both nil by default.
ConfigSV.OpenClose enabled = true, defaultOpen = true, remember = true, door = nil, aces = { "admin" }.
ConfigSV.Rigging enabled = false, ace = "admin".
ConfigSV.PropsResource "glitch-casino-props"
ConfigSV.VehicleGarage { qbx = "motelgarage", legacy = "pillboxgarage" }. Where lucky wheel cars are stored. A car that cannot be stored is held and retried on the player's next load.
ConfigSV.Transactions flushSeconds = 30, retentionDays = 7.