How Integrations Work#
Everything that depends on another resource goes through a small, unencrypted bridge file. These live in custom/ for the framework, client/custom/ for target, keys and weather, and server/custom/ for society, logs and quests. The framework, the map and the keys resource are detected when the casino starts. Everything else is either checked when it is needed, or set in config/main.lua.
Layer | Supported | Without it |
|---|---|---|
Framework |
| A standalone bridge you have to fill in yourself. |
Casino map | The GTA Diamond Casino and six MLOs (below). | The GTA Diamond Casino layout. |
Inventory | Any inventory your framework uses, such as | — |
Target |
| A 3D prompt and |
Vehicle keys | Eleven resources (below). | The Lucky Wheel car is handed over without keys. |
Society |
| Set |
Music |
| Set |
Notifications · prompts |
| ox_lib's notifications and progress bar, and the game's own 3D text. |
Screenshots |
| The jackpot win is posted without a photo. |
Phone · quests · photos |
| No casino phone app, no casino quests, and no photos in the Players tab. |
Weather sync | Renewed-Weathersync · qb-weathersync · cd_easytime · vSync · av_weather | Nothing to pause. These are only paused while a player is in a VIP room. |
Database |
| Required. |
Detection only sees resources that are already started. Anything you want found must be above
ensure qs-diamondcasinoinserver.cfg.
Casino Maps#
Every coordinate the casino uses lives in a map preset, a folder in config/. It covers the NPCs, tables, machines, doors, the casino zone, cameras, the wheel, the podium and the crowd. The preset is chosen by the name of the casino MLO resource that is running:
Preset | Picked when this resource runs | Where |
|---|---|---|
| None of the others. Use it with the included | The GTA Diamond Casino, Vinewood |
|
| Same building |
|
| Same building |
|
| Same building |
|
| Downtown Los Santos |
|
| The coast, by Vespucci |
|
| Del Perro |
The names must match exactly. If your copy of an MLO has a different resource name, add it to the list in config/main.lua and point it at the right folder:
local maps = { -- started resource name -> preset folder it loads
['gabz_casino'] = 'gabz_casino',
['my_gabz_casino'] = 'gabz_casino', -- your renamed copy
-- ...
}
Config.Map = DependencyCheck(maps) or 'default'Adding your own MLO#
Copy the closest preset
Duplicate a folder in
config/and name it after your map. It must contain all nine files:main,ambience,blackjack,roulette,poker,slots,inside_track,wheelandbillard.Register it
Add a row to
mapsinconfig/main.luawith your MLO's resource name and the new folder.Move everything into place
Edit the coordinates. Turn on Draw the casino zone in
/casinoconfig→ General to see the zone and the interaction points (this needs a restart)./poolplaceprints the line for a pool table. If your casino is not in Vinewood, also changeConfig.Vip.exitCoordsinconfig/main.lua. That is where players leave a VIP room after a restart.
Frameworks#
Framework | Notes |
|---|---|
ESX | Bar drinks can be paid from |
QBCore | Bar drinks can be paid from |
Qbox | Not detected by name. It runs through its QBCore compatibility layer, so set |
Standalone | A template. Each function in |
Forcing a value#
Each detection line in config/main.lua can be replaced with a fixed value. Do this when two candidates run at once, or when a resource has a different name on your server:
Config.Framework = 'qb' -- 'esx', 'qb' or 'standalone': a folder in custom/
Config.Map = 'gabz_casino' -- a folder in config/
Config.Vehiclekeys = 'qs-vehiclekeys' -- a file in client/custom/vehiclekeys/Target#
By default, every NPC and game is reached with a 3D prompt and E. Set Config.UseTarget = true in config/main.lua to use a target resource instead. Config.TargetDistance (5.0) is the reach on NPCs; tables, machines and the wheel use 2 metres. Billiards always uses the prompt.
The bridge, client/custom/target/main.lua, talks to qtarget. ox_target answers those same calls, so it works as it is. For qb-target, rewrite the calls in that file with qb-target's exports, or keep target mode off.
Target mode is read while the client starts, so it stays in the file and is not in the settings panel. Restart the resource after changing it.
Vehicle Keys#
Used for the Lucky Wheel car. The first one found running is used. Do not run two key systems at once.
qs-vehiclekeys · qb-vehiclekeys · qbx_vehiclekeys · wasabi_carlock · vehicles_keys · ti_vehicleKeys · mono_carkeys · glfp10_carkeys · F_RealCarKeysSystem · fivecode_carkeys · xd_locksystem
Each has its own file in client/custom/vehiclekeys/. To support another key system, copy the closest file, change the call inside it, and set Config.Vehiclekeys to the new name.
Society#
Config.Society in config/main.lua picks where the Casino cut is paid. It is not detected, and it ships set to esx_society.
Value | Pays into |
|---|---|
| The |
| The |
| The |
| City tax, under |
| Nothing. The cut is not paid anywhere. |
On ESX, create the account once if your server does not have it yet:
INSERT INTO `addon_account` (`name`, `label`, `shared`) VALUES ('society_casino', 'Casino', 1);Music#
The casino and the VIP rooms stream music through xsound, or mx-surround if xsound is not running. Tracks are files in music/, listed in config/main.lua. Internet links are not supported.
Config.MusicTracks = {
{ label = 'Midnight Tokyo', file = 'midnight_tokyo.mp3' },
{ label = 'Digital Bloom', file = 'digital_bloom.mp3' },
{ label = 'Crystal Pulse', file = 'crystal_pulse.mp3' },
{ label = 'My Track', file = 'my_track.ogg' }, -- your own file in music/
}
Config.Sound = 'midnight_tokyo.mp3' -- the starting track; false = no music at allAfter that, the track is chosen in /casino → Music, or by the renter in a VIP room. The volume is in /casinoconfig → Audio. If neither sound resource is running, set Config.Sound = false, or the client console repeats an error.
Notifications, Prompts and the HUD#
Notifications go through qs-interface when it is running, otherwise through ox_lib. To use another resource, change Notification in custom/client.lua. The 3D prompts use qs-textui when it is running. Menus and input boxes are ox_lib's, wrapped in client/custom/main.lua.
While a player is at a game or in a casino menu, the radar and HUD are hidden by DisableHud() and brought back by EnableHud(), both in config/main.lua. To hide your own HUD as well, put your HUD's export in those two functions.
Discord Logs#
Casino activity can be posted to Discord as embeds. Turn it on in server/custom/webhooks.lua and give each category a webhook. An empty URL turns that category off, and one URL can serve several categories.
CasinoWebhooks = {
enabled = true,
username = 'Diamond Casino',
avatar = '',
footer = 'Quasar Diamond Casino',
urls = {
economy = 'https://discord.com/api/webhooks/...', -- casino funds deposited / withdrawn
chips = '', -- chips bought / sold at the cashier
staff = '', -- owner set/removed, employees hired/fired, permissions
bans = '', -- players banned / unbanned
wins = '', -- jackpot winners
customization = '', -- vehicle, music, wall theme, cameras, custom walls
events = '', -- happy hour / high stakes started / stopped
vip = '', -- VIP room rentals
},
}The jackpot winner photo has its own webhook, set in game in
/casinoconfig→ Jackpot. It is kept on the server and never sent to players.
Phone, Quests and Player Photos#
Resource | What it adds |
|---|---|
| A casino app that shows the player's chips and membership, prices, the shops and whether the doors are open, plus a waypoint to the casino. The waypoint is the first cashier unless you set |
| Ten casino quests, such as Lucky Beginner, High Roller, Elite Access, Blackjack Master and Spin to Win. They are defined in |
| Each player's face on their card in the Players tab of |
| Nothing to do. Its copy of the casino interior is removed automatically, and removed again if it restarts. |
Languages#
41 translations ship in locales/, including English, Spanish, French, German, Portuguese, Italian, Dutch, Polish, Russian, Turkish, Arabic, Chinese, Japanese and Korean. Pick one in /casinoconfig → General → Language. It changes for every player at once, with no restart. To reword something, edit that language's .json file. Any text missing from it falls back to English.



