Dominó Game

Installation

Installation

1. Drop the resource

Extract the package into your resources folder. The final path should look like:

server-data/resources/[suty]/suty-domino/

The folder must be named exactly suty-domino. A renamed copy stops itself and prints FATAL: resource must be named "suty-domino". Check that fxmanifest.lua sits directly inside the folder, with no double folder like suty-domino/suty-domino/.

Props, animations, sounds and the placement gizmo all ship inside the resource. You don't need object_gizmo or any emote menu to play.

2. Game build and OneSync

Sitting at the table uses an animation from The Contract update, so the server must enforce game build 2545 or newer in server.cfg:

sv_enforceGameBuild 2545

Any newer build works too. OneSync must be enabled on the server.

With an older game build, tables can be placed but nobody can sit. Players get «No se pudo iniciar la animación de sentado» (English locale: «Could not start the sitting animation.»).

3. Start order in server.cfg

Ready-made examples live in install/server/. Merge only the one for your framework into your server.cfg, without duplicating resources you already start. suty-domino goes after the framework, the inventory and the target.

setr inventory:framework "qbx"
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
# ox_target or qb-target
ensure ox_target
ensure suty-domino

Config.Framework = 'auto' looks for qbx_core, then qb-core, then es_extended. Start only one framework.

4. Items

Two items are required:

Item Label What it does ox_inventory export
domino_table Mesa de dominó Portable table with its four chairs suty-domino.useTable
domino_case Estuche de dominó Wooden case with the 28 tiles. Use it seated at a table suty-domino.useCase

Pick the tab for your inventory. Paste the entries inside the existing item table. Don't replace the file, don't add a second return, and don't duplicate names that already exist.

Add to ox_inventory/data/items.lua (works on QBX, QB-Core and ESX):

['domino_table'] = {
    label = 'Mesa de dominó',
    weight = 10000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Mesa portátil de dominó con cuatro sillas. Las fichas se llevan en un estuche aparte.',
    client = { export = 'suty-domino.useTable', image = 'domino_table_custom.png' }
},
['domino_case'] = {
    label = 'Estuche de dominó',
    weight = 800,
    stack = false,
    close = true,
    consume = 0,
    description = 'Estuche de madera con 28 fichas de doble seis. Úsalo sentado en una mesa de dominó.',
    client = { export = 'suty-domino.useCase', image = 'domino_case.png' }
},

Keep consume = 0 and stack = false. The domino takes the item when you place the table or load the case, and gives it back when you pack up. If the inventory consumed it too, players would lose an extra one. Don't register a second usable item for these names.

Item images

The package ships every item image in install/ox_inventory/images/. Copy them to your inventory's image folder, keeping the file names:

Inventory Folder
ox_inventory ox_inventory/web/images/
qb-inventory qb-inventory/html/images/
qs-inventory the folder that holds its stock images

The two required images are domino_table_custom.png and domino_case.png.

Drinks (optional)

The same item files bring the drinks. Copy only the ones you want, plus their images.

Item Label Type
suty_beer_brisa Brisa Verde Beer, bottle
suty_beer_sol Sol de Isla Beer, bottle
suty_beer_costa Costa Fina Light Beer, bottle
suty_beer_brisa_can Brisa Verde (lata) Beer, can
suty_beer_sol_can Sol de Isla (lata) Beer, can
suty_beer_costa_can Costa Fina Light (lata) Beer, can
suty_malta_indigena Malta Indígena Non-alcoholic, bottle
suty_soda_sprunk Sprunk Soda, bottle
suty_soda_ecola eCola Soda, bottle
suty_soda_sprunk_can Sprunk (lata) Soda, can
suty_soda_ecola_can eCola (lata) Soda, can
suty_sixpack_brisa Six pack Brisa Verde Six-pack, 6 bottles
suty_sixpack_sol Six pack Sol de Isla Six-pack, 6 bottles
suty_sixpack_costa Six pack Costa Fina Light Six-pack, 6 bottles
Inventory Copy the entries from
ox_inventory install/ox_inventory/items.lua. Drinks use the export suty-domino.useBeer, six-packs suty-domino.useSixpack
qb-inventory install/qb-core/shared_items.lua (beers, cans and six-packs). The malta and the two sodas are in install/qs-inventory/items.lua, in the same QB-Core format
qs-inventory install/qs-inventory/items.lua

Six-packs keep the bottles left inside the item, so they must stay non-stackable (stack = false / unique = true).

5. Admin access

Admins can open /dominodiseno, customize tables and use the admin commands. A player is an admin when any of these is true:

Check Default
ACE permission Config.Admin.ace (every framework) admin
QB-Core: QBCore permission group admin, god
QBX: ACE admin, god
ESX: player group admin, superadmin

To use your own ACE instead, set Config.Admin.ace = 'suty.domino.admin' in shared/config.lua before the first start (if the panel already saved that field, change it in the panel). Then add to your permissions:

add_ace group.domino_admin suty.domino.admin allow
add_principal identifier.license:YOUR_LICENSE group.domino_admin

Framework groups still count next to the ACE. Never give this permission to builtin.everyone.

6. Restart and test

Do a full server restart after adding the items: the inventory only loads its item list when it starts. On a healthy boot the console prints the SUTY DOMINO banner with the version and Loaded.

Quick test in game:

  1. Give yourself one domino_table and one domino_case with your inventory's admin tool.
  2. Use Mesa de dominó standing and outside a vehicle. Aim at flat ground, turn with the mouse wheel, click or press Enter to place (H switches to the gizmo).
  3. Sit on a chair with the target eye.
  4. While seated, use Estuche de dominó: the tiles come out on the table.
  5. Hold the mouse button and move it to shuffle. When the bar is full, press E to finish and take your tiles.
  6. When you're done: Put tiles away, then Pack up table. Each item must come back exactly once.

Updating

  • Finish the matches first. Hands in progress and match scores are not restored after a restart. Placed tables keep their spot and their items.
  • Back up the resource, your inventory data and the server's KVP storage.
  • Keep your shared/config.lua and locale edits, and compare them with the new defaults.
  • Keep the folder name suty-domino.
  • Don't wipe the server KVP like a cache: it holds the panel settings and the placed tables.

Merry Christmas.

From Suty.