Skip to content

Installation

Dependencies

Ensure the following resources are installed and running before sd-traphouse:

DependencyOptions
Librarysd_lib
Interactionox_target / qb-target / qtarget
Doorlockox_doorlock / qb-nui_doorlock

Step 1: Add the Resource

  1. Download sd-traphouse from Keymaster
  2. Extract it into your server's resources directory
  3. Add ensure sd-traphouse to your server.cfg after all dependencies
ini
ensure sd_lib
ensure ox_lib
ensure ox_target
ensure ox_doorlock
ensure sd-traphouse

Step 2: Import Doorlock Data

Import the front door entry for your doorlock system:

sql
-- Import sd-traphouse/doorlock/ox_doorlock/traphouse.sql into your database
-- This creates 1 door entry: traphouse-front
lua
-- Copy the contents of sd-traphouse/doorlock/qb-nui_doorlock/traphouse.lua
-- into your qb-nui_doorlock config file

Step 3: Add Items

Register the required items in your inventory system:

lua
-- Add to ox_inventory/data/items.lua

['gang-keychain'] = {
    label = 'Keychain',
    weight = 50,
    stack = true,
    close = true,
    description = 'A keychain with a load of oddly labelled keys',
},
['safecracker'] = {
    label = 'Safe Cracker',
    weight = 500,
    stack = true,
    close = true,
    description = 'A specialized tool used for breaking into safes.',
},
lua
-- Add to qb-core/shared/items.lua

['gang-keychain'] = { name = 'gang-keychain', label = 'Gang Keychain', weight = 20,  type = 'item', image = 'gang-keychain.png', unique = true,  useable = false, shouldClose = true, description = 'A keychain with a load of oddly labelled keys' },
['safecracker']   = { name = 'safecracker',   label = 'Safe Cracker',  weight = 500, type = 'item', image = 'safecracker.png',   unique = true,  useable = false, shouldClose = true, description = 'A specialized tool used for breaking into safes.' },

Step 4: Copy Item Images

Copy the item images from sd-traphouse/images/ to your inventory's image folder:

InventoryImage Path
ox_inventoryox_inventory/web/images/
qb-inventory / ps-inventory<inventory>/html/images/
qs-inventoryqs-inventory/html/images/
codem-inventorycodem-inventory/html/itemimages/
origen_inventoryorigen_inventory/ui/images/
Traphouse Item Images2 images
Gang Keychain
gang-keychain.png
Safecracker
safecracker.png

TIP

If you are using a custom inventory, place the images wherever your inventory loads item icons from.

Step 5: Start and Verify

  1. Start your server
  2. Check the server console for any errors
  3. If Config.Blip.Enable is true, look for the Vagos Traphouse blip on the map
  4. Ensure the minimum police requirement is met before attempting the robbery

WARNING

Make sure sd_lib is started before sd-traphouse in your server.cfg, or the resource will fail to load.

TIP

No database tables are required. All robbery state is managed in memory and resets on server restart.