Studios
Casinohouse-3.jpg

Installation

SoonCasinoQBCore · Qbox · ESX
PAGE 02 OF 09  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

The server

Framework qbx_core (Qbox). qb-core and es_extended bridges are included but have not been tested on a live server.
Resources ox_lib, oxmysql, ox_target, ox_inventory. On qb-core and ESX the bridge falls back to the framework inventory without ox_inventory. Native Qbox (without the qb-core compatibility layer) needs ox_inventory.
Server OneSync enabled.
Props The pickle_casinos props, from your own pickle_casinos download. They are escrowed to Pickle Mods and are not part of this package. A small stream-only resource, glitch-casino-props, ships with it as a template.
Licence A pickle_casinos licence on the Cfx account of the server. glitch-casino is an edition of pickle_casinos by Pickle Mods and replaces it.
Database MariaDB or MySQL through oxmysql.
Optional ox_doorlock (door for /casino on and /casino off), object_gizmo (placement gizmo in the creator), qbx_vehicles (lucky wheel cars), omes_banking, Renewed-Banking, qb-management or qb-banking (house casino society accounts), pickle_xp (lucky wheel xp prizes)
Glitch Studios glitch-treasury (casino tax), glitch-admin (logs), glitch-uiElements (key hints, rigging drawer, item feed), glitch-spawnselector and glitch-cloudsLoading (the chip tracker waits for the spawn), glitch-pauseMenu (casino names in the map legend). None of them is required and each has a fallback.

Tested with qbx_core 1.24.0, ox_inventory 2.48.0, ox_lib 3.40.0, ox_target 1.17.2, oxmysql 2.14.2 and ox_doorlock 1.22.1.

Installation steps#

  1. Make sure the server's Cfx account owns pickle_casinos. Stop and remove any old pickle_casinos folder. Both use the same events and database tables, so they cannot run together.

  2. Copy __INSTALL/glitch-casino-props into your resources folder. From your own pickle_casinos download, copy the stream folder and the .fxap file into it. If you rename the folder, set ConfigSV.PropsResource to the new name.

  3. Put the glitch-casino folder in your resources folder. The folder name is case-sensitive.

  4. Add the items. __INSTALL/Items/ox_inventory.lua has them for ox_inventory and __INSTALL/Items/qbcore.lua for qb-core. __INSTALL/Items also holds esx_limit.sql and esx_weight.sql for ESX. Copy __INSTALL/Images into your inventory's image folder. The chip item can have any name and you pick it per casino in /casinos; the example item files call it casino_chips. Use your own images for the chip item and lucky_ticket.

  5. Create the tables. They are made when the resource starts. If your database user cannot create tables, run __INSTALL/install.sql once by hand.

  6. Add to server.cfg, after ox_lib, oxmysql, ox_target, your framework and your inventory:

    ensure glitch-casino-props
    ensure glitch-casino
    add_ace group.admin admin allow
    
  7. Look through config.lua and config_sv.lua. At minimum check Config.ImageDirectory, Config.Currency, Config.CreatorOptions.stores, Config.LuckyWheel, Config.CasinoSociety, Config.EntryNotice and ConfigSV.OpenClose.

  8. Start the server, go to where the casino should be and run /casinos as an admin. Create the casino, then add a cashier and the games.

[!WARNING] Without the props, tables and machines are invisible. The games stay closed and the console prints games are closed: the pickle_casinos props are not loaded every 5 minutes until glitch-casino-props runs.

If your server does not accept the .fxap under the new resource name, put the files in a folder called pickle_casinos instead and set ConfigSV.PropsResource = "pickle_casinos".

Permissions#

Setting Who it covers
Config.AdminGroups Casino admins: /casinos, /hhscreen, /slotscreen, /mapobjects, /setwheelticket and the owner picker. Framework groups and ACEs.
ConfigSV.OpenClose.aces Who may use /casino on and /casino off. Defaults to admin. The console always can.
ConfigSV.Rigging.ace Who may open /casinoadmin. Defaults to admin.

Updating#

Replace the resource folder with the new one and keep your own files in profile/. Casinos, tables and machines live in the database and are not touched. Screen positions saved with /hhscreen and /slotscreen, and map props hidden with /mapobjects, are kept in the resource's KVP store, so they survive an update. harbourheist_screen.json, slot_screen.json and mapobjects.json are only the defaults used before the first save. Leave glitch-casino-props as it is.