Configuration
This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.
This configuration serves as the main example, as each map includes its own unique config file.
qs-diamondcasino/config/main.lua
--──────────────────────────────────────────────────────────────────────────────
-- Quasar Store · Configuration Guidelines
--──────────────────────────────────────────────────────────────────────────────
-- This configuration file defines all adjustable parameters for the script.
-- Comments are standardized to help you identify which sections you can safely edit.
--
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
-- • [INFO] – Informational note describing what the variable or block does.
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
-- • [AUTO] – Automatically handled by the system. Never edit manually.
--
-- Always make a backup before editing configuration files.
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
--──────────────────────────────────────────────────────────────────────────────
Config = Config or {} -- [CORE] Main configuration table.
Locales = Locales or {} -- [CORE] Language container.
--──────────────────────────────────────────────────────────────────────────────
-- Language Selection [EDIT]
-- [INFO] Choose your preferred language. Files are located in locales/*.
-- [INFO] If missing, add a new file in locales/* and customize it.
--──────────────────────────────────────────────────────────────────────────────
Config.Language = 'en' -- [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- Framework Detection [AUTO]
-- [INFO] Auto-detects qb-core or es_extended. If you renamed the resource,
-- remove the auto value and set your framework after adapting files inside this script.
-- Do not edit if you don't know how it works.
--──────────────────────────────────────────────────────────────────────────────
local frameworks = { -- [CORE]
['es_extended'] = 'esx',
['qb-core'] = 'qb',
}
Config.Framework = DependencyCheck(frameworks) or 'standalone' -- [AUTO]
--──────────────────────────────────────────────────────────────────────────────
-- Map / MLO Detection [AUTO]
-- [INFO] Detects supported casino maps. Falls back to 'default' if none found.
--──────────────────────────────────────────────────────────────────────────────
local maps = { -- [CORE]
['gabz_casino'] = 'gabz_casino',
['k4mb1-casino'] = 'k4mb1-casino',
['molo_casino'] = 'molo_casino',
['tstudio_jurassic_jackpot'] = 'tstudio_jurassic_jackpot',
['energy_atlantiscasino'] = 'energy_atlantiscasino'
}
Config.Map = DependencyCheck(maps) or 'default' -- [AUTO]
--──────────────────────────────────────────────────────────────────────────────
-- Vehicle Keys Detection [AUTO]
-- [INFO] Auto-detects your vehicle-key system. Avoid using duplicates (e.g., two key systems).
-- If yours isn't listed, create an adapter in client/custom following the examples.
--──────────────────────────────────────────────────────────────────────────────
local vehicleKeys = { -- [CORE]
['qs-vehiclekeys'] = 'qs-vehiclekeys',
['qb-vehiclekeys'] = 'qb-vehiclekeys',
['F_RealCarKeysSystem'] = 'F_RealCarKeysSystem',
['fivecode_carkeys'] = 'fivecode_carkeys',
['glfp10_carkeys'] = 'glfp10_carkeys',
['mono_carkeys'] = 'mono_carkeys',
['ti_vehicleKeys'] = 'ti_vehicleKeys',
['vehicles_keys'] = 'vehicles_keys',
['wasabi_carlock'] = 'wasabi_carlock',
['xd_locksystem'] = 'xd_locksystem',
['qbx_vehiclekeys'] = 'qbx_vehiclekeys'
}
Config.Vehiclekeys = DependencyCheck(vehicleKeys) or 'none' -- [AUTO]
--──────────────────────────────────────────────────────────────────────────────
-- Casino NPCs & Chips [INFO]
-- [INFO] You can extend NPC configurations (chips, teleporters, memberships, market).
-- Ensure correct models/coords/anims per NPC role.
--──────────────────────────────────────────────────────────────────────────────
Config.ChipBuyLimit = 5000 -- [EDIT] Max chips purchasable per day (false to disable limit).
Config.ChipsAsItem = false -- [EDIT] Store chips as an inventory item?
Config.ChipItemName = 'casinochips' -- [EDIT] Item name used for chips.
--──────────────────────────────────────────────────────────────────────────────
-- Marketplace Items (priced in chips) [EDIT]
-- [INFO] Luxury goods / consumables available from NPC vendors.
--──────────────────────────────────────────────────────────────────────────────
Config.MarketItems = {
{ item = 'gold_watch', label = 'Gold Watch', price = 5000 },
{ item = 'diamond_ring', label = 'Diamond Ring', price = 15000 },
{ item = 'luxury_cigar', label = 'Luxury Cigar Box', price = 2000 },
{ item = 'expensive_champagne', label = 'Expensive Champagne', price = 7500 },
}
--──────────────────────────────────────────────────────────────────────────────
-- Ambience & Society [EDIT]
-- [INFO] Toggle ambience peds and choose society backend for commissions.
--──────────────────────────────────────────────────────────────────────────────
Config.DisableAmbiencePeds = false
Config.Society = 'esx_society' -- [EDIT] 'none', 'esx_society', 'ap-government', 'esx_society' or 'qb-management'
Config.SocietyCommision = 0.3 -- [EDIT] Company commission (0.30 = 30%)
--──────────────────────────────────────────────────────────────────────────────
-- Alcohol Shop Items & Payment Method [EDIT]
-- [INFO] money_type defines if payment is via 'bank' or 'money'.
--──────────────────────────────────────────────────────────────────────────────
Config.AlcoholItems = {
{ item = 'royal_flush_whiskey', label = 'Royal Flush Whiskey', price = 150, money_type = 'bank' },
{ item = 'high_roller_vodka', label = 'High Roller Vodka', price = 200, money_type = 'bank' },
{ item = 'lucky_7s_tequila', label = 'Lucky 7’s Tequila', price = 180, money_type = 'bank' },
{ item = 'blackjack_bourbon', label = 'Blackjack Bourbon', price = 220, money_type = 'bank' },
}
--──────────────────────────────────────────────────────────────────────────────
-- Useable Items → Effects [EDIT]
-- [INFO] Defines effect mapping when consuming listed alcohol items.
--──────────────────────────────────────────────────────────────────────────────
Config.UseableDrugItems = {
{ name = 'royal_flush_whiskey', effectType = 'drink', effectDuration = 25, effects = { 'drunk_walk' } },
{ name = 'high_roller_vodka', effectType = 'drink', effectDuration = 25, effects = { 'drunk_walk' } },
{ name = 'lucky_7s_tequila', effectType = 'drink', effectDuration = 25, effects = { 'drunk_walk' } },
{ name = 'blackjack_bourbon', effectType = 'drink', effectDuration = 25, effects = { 'drunk_walk' } },
}
--──────────────────────────────────────────────────────────────────────────────
-- Core Experience [EDIT]
-- [INFO] First-person enforcement, memberships, target settings, staff jobs, music.
--──────────────────────────────────────────────────────────────────────────────
Config.ForceFirstPerson = true -- [EDIT] Force first-person view inside the casino.
-- Membership prices
Config.MembershipPrice = 5000 -- [EDIT] Regular access.
Config.VIPMembershipPrice = 50000 -- [EDIT] VIP access.
-- Interaction system
Config.UseTarget = false -- [EDIT] Enable targeting system for interactions.
Config.TargetDistance = 5.0 -- [EDIT]
Config.TargetWidth = 5.0 -- [EDIT]
Config.TargetLength = 5.0 -- [EDIT]
-- Casino Management Jobs
Config.CasinoJobs = { -- [EDIT] Jobs allowed to manage the casino.
'police'
}
-- Ambient music (xsound supported). Set false to disable.
Config.Sound = 'https://www.youtube.com/watch?v=XnouxUYJRRo' -- [EDIT] URL or false.
Config.SoundVolume = 0.1 -- [EDIT] 0.0–1.0
--──────────────────────────────────────────────────────────────────────────────
-- HUD Handling [EDIT]
-- [INFO] Replace with your framework HUD events if needed.
--──────────────────────────────────────────────────────────────────────────────
function DisableHud()
DisplayRadar(false) -- [INFO] Disables minimap radar.
DisplayHud(false) -- [INFO] Replace with your custom HUD event.
Debug('Hud Disabled')
end
function EnableHud()
DisplayRadar(true) -- [INFO] Enables minimap radar.
DisplayHud(true) -- [INFO] Replace with your custom HUD event.
Debug('Hud Enabled')
end
--──────────────────────────────────────────────────────────────────────────────
-- bob74_ipl Compatibility [ADV]
-- [INFO] On build ≥ 2060, remove conflicting IPLs to avoid interior glitches.
--──────────────────────────────────────────────────────────────────────────────
local function destroyBob74ipl()
if GetGameBuildNumber() >= 2060 then -- [INFO]
local object = exports['bob74_ipl']:GetDiamondCasinoObject() -- [INFO]
object.Ipl.Building.Remove() -- [CORE]
object.Ipl.Main.Remove() -- [CORE]
Debug('Removed bob74ipl Diamond Casino IPLs')
end
end
--──────────────────────────────────────────────────────────────────────────────
-- bob74_ipl Init Guard [CORE]
-- [INFO] Waits for bob74_ipl to initialize, then removes conflicting IPLs.
--──────────────────────────────────────────────────────────────────────────────
CreateThread(function()
Wait(5000) -- [ADV] Delay to allow bob74_ipl init.
if GetResourceState('bob74_ipl'):find('started') then -- [AUTO]
Debug('Removing bob74_ipl elements')
destroyBob74ipl()
end
end)
--──────────────────────────────────────────────────────────────────────────────
-- bob74_ipl Restart Handler [CORE]
-- [INFO] Removes IPLs again if bob74_ipl restarts while server is running.
--──────────────────────────────────────────────────────────────────────────────
AddEventHandler('onResourceStart', function(resourceName)
if resourceName == 'bob74_ipl' then -- [AUTO]
Wait(2500) -- [ADV]
Debug('Removing bob74_ipl elements after restart')
destroyBob74ipl()
end
end)
--──────────────────────────────────────────────────────────────────────────────
-- Editor & Action Controls [EDIT]
-- [INFO] Keybind labels and control codes used by interaction/editor modes.
--──────────────────────────────────────────────────────────────────────────────
ActionControls = {
key_e = { label = 'Interact', codes = { 38 } },
key_g = { label = 'Change Bet', codes = { 47 } },
key_space = { label = 'Jump', codes = { 22 } },
key_backspace = { label = 'Back', codes = { 177 } },
key_enter = { label = 'Enter', codes = { 191 } },
key_q = { label = 'Quit', codes = { 44 } },
key_r = { label = 'Reload', codes = { 45 } },
arrows = { label = 'Up/down', codes = { 172, 173 } },
arrow_up = { label = 'Up', codes = { 172 } },
arrow_down = { label = 'Down', codes = { 173 } },
forward = { label = 'Forward +/-', codes = { 33, 32 } },
right = { label = 'Right +/-', codes = { 35, 34 } },
up = { label = 'Up +/-', codes = { 52, 51 } },
mouse_left = { label = 'Add Point', codes = { 24 } },
mouse_wheel_up = { label = 'Increase Value', codes = { 17 } },
mouse_wheel_down= { label = 'Decrease Value', codes = { 16 } },
set_any = { label = 'Set', codes = { 24 } },
undo_point = { label = 'Undo Last', codes = { 25 } },
set_position = { label = 'Set Position', codes = { 24 } },
add_garage = { label = 'Add Garage', codes = { 24 } },
rotate_z = { label = 'RotateZ +/-', codes = { 20, 73 } },
rotate_z_scroll = { label = 'RotateZ +/-', codes = { 17, 16 } },
increase_z = { label = 'Z Boundary +/-', codes = { 180, 181 } },
decrease_z = { label = 'Z Boundary +/-', codes = { 21, 180, 181 } },
done = { label = 'Done', codes = { 191 } },
change_player = { label = 'Player +/-', codes = { 82, 81 } },
change_shell = { label = 'Change Shell +/-', codes = { 189, 190 } },
select_player = { label = 'Select Player', codes = { 191 } },
cancel = { label = 'Cancel', codes = { 194 } },
change_outfit = { label = 'Outfit +/-', codes = { 82, 81 } },
delete_outfit = { label = 'Delete Outfit', codes = { 178 } },
select_vehicle = { label = 'Vehicle +/-', codes = { 82, 81 } },
spawn_vehicle = { label = 'Spawn Vehicle', codes = { 191 } },
leftApt = { label = 'Previous Apartment', codes = { 174 } },
rightApt = { label = 'Next Apartment', codes = { 175 } },
testPos = { label = 'Test Pos', codes = { 47 } },
}
--──────────────────────────────────────────────────────────────────────────────
-- Debug [EDIT]
-- [INFO] Verbose logging; keep disabled on production servers.
--──────────────────────────────────────────────────────────────────────────────
Config.Debug = true -- [EDIT]
Config.ZoneDebug = false -- [EDIT]