Skip to content

Installation

Dependencies

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

DependencyOptions
Librarysd_lib
ZonesPolyZone
Interactionox_target / qb-target / qtarget (or use TextUI)

Step 1: Add the Resource

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

Step 2: Add Items

If using the sealed cache system (Config.UsingSealedCache = true), register these items:

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

['sealed_cache'] = {
    label = 'Sealed Cache',
    weight = 15000,
    stack = false,
    close = true,
    description = 'A heavy and resilient lockbox',
    server = {
        export = 'sd-cokemission.useSealed_cache',
    },
},
['cache_key'] = {
    label = 'Cache Key',
    weight = 500,
    stack = false,
    close = true,
    description = 'Key used for lock boxes',
},
lua
-- Add to qb-core/shared/items.lua

['sealed_cache'] = { name = 'sealed_cache', label = 'Sealed Cache', weight = 15000, type = 'item', image = 'sealed_cache.png', unique = true, useable = true, shouldClose = false, description = 'A heavy and resilient lockbox' },
['cache_key']    = { name = 'cache_key',    label = 'Cache Key',    weight = 500,   type = 'item', image = 'cache_key.png',    unique = true, useable = true, shouldClose = true,  description = 'Key used for lock boxes' },
sql
-- Import sd-cokemission/[SQL]/ESX/items.sql or run manually:

INSERT INTO `items` (`name`, `label`, `weight`) VALUES
  ('sealed_cache', 'Sealed Cache', 150),
  ('cache_key', 'Cache Key', 5);

Also ensure your reward items exist (default: coke_brick, weed_brick).

Step 3: Copy Item Images

Copy the item images from sd-cokemission/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/
Coke Mission Item Images2 images
Cache Key
cache_key.png
Sealed Cache
sealed_cache.png

TIP

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

Step 4: Start and Verify

  1. Start your server
  2. Check the server console for any errors
  3. The Boss NPC spawns at one of 3 random locations
  4. If Config.Blip.Enable is true, look for the blip on the map

WARNING

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

TIP

No database tables are required. All state is managed in memory.