Electus LogoElectus Documentation

Electus Drugs Installation

Install Electus Drugs, its database tables and inventory items, then set up the first labs and shops.

Installation steps

Please follow these steps carefully. If you need installation help, join our Discord.

Download the package

Download electus_drugs from Cfx.re Portal and place it in your server resources folder.

Install the required dependencies

Install and start:

  • OneSync (set onesync on)
  • oxmysql
  • Electus Core
  • A framework: ESX, QBCore or Qbox
  • A target resource: ox_target, qtarget or qb-target
  • An inventory: ox_inventory (recommended), qb-inventory, qs-inventory, tgiann-inventory or ESX's own inventory

The server uses OneSync to check every distance: shopkeepers, street deals, lab doors and stations. Without OneSync it has no player positions, and shops and selling work from anywhere.

Only ox_inventory, qb-inventory, qs-inventory and tgiann-inventory keep item metadata, so only they show a product's quality, seeds in a dried branch, soil left in a bag or the colour of a pill. On other inventories every batch is stored at full quality without seeds.

tgiann-inventory is not detected automatically. Set Config.Inventory = "tgiann-inventory".

Run the SQL file

electus_drugs.sql

Import electus_drugs.sql. It creates:

  • electus_drugs_labs
  • electus_drugs_effects
  • electus_drugs_addiction
  • electus_drugs_addiction_settings
  • electus_drugs_settings
  • electus_drugs_shop_presets
  • electus_drugs_layout_presets
  • electus_drugs_shops
  • electus_drugs_skills

Updates add the columns they need on start. electus_drugs_lab_backups, which keeps any lab save that could not be read, is created the first time it is needed.

Add the items

Every weed, mushroom, coca, crack, meth and ecstasy item, plus their supplies and the lab equipment, must exist in your inventory's item list. Each item has a 512x512 transparent icon in images/<item>.png.

Configure the resource

Review config/config.lua and config/locales/en.lua.

At minimum, verify:

  • Config.Framework, Config.Inventory and Config.Target
  • Config.NotificationSystem and Config.DispatchSystem
  • Config.BlackMoneyItem
  • Config.Difficulty and Config.Pace

Keep Config.Test.Enabled and Config.ShellTest.Enabled off on a live server. They give admins test tools and free items.

Add the resource to server.cfg

Start your framework first, then your integrations, electus_core and electus_drugs:

set onesync on

ensure oxmysql
ensure ox_inventory
ensure ox_target
ensure electus_core
ensure electus_drugs

Configure admin access

Framework admins get every admin level while Config.Admin.FrameworkAdmins is true. To give other groups access, add ACE lines to server.cfg. Each level includes the ones below it:

add_ace group.admin electus_drugs.admin.manage allow
add_ace group.moderator electus_drugs.admin.edit allow
add_ace group.support electus_drugs.admin.view allow
LevelAccess
manageWipe, delete and hand out labs, set owners
editChange lab contents, place shops, give items
viewBrowse labs and read logs

Set up the first labs and shops

Nothing can be bought or grown until you do this once in the admin panel:

/drugsadmin
  1. Shops: place shopkeepers where players should buy supplies and equipment. The built-in presets cover every supply, seed and piece of lab equipment players need.
  2. Labs, New lab: place a lab behind a street door by standing at the door, or as a world grid on the open map, and pick its owner. Players cannot buy labs, so you hand them out.
  3. Difficulty: select Easy, Default or Hardcore. This shifts timers, care rules and risk together.

Players can also make their own labs without an admin by pitching a lab tent.

The cookbook_<drug>_full books are not sold by any built-in shop. Hand them out as rewards from the admin panel's Items page, or sell them from your own shop preset.