Installation
Install tc-divisions: resources, server.cfg, database, items and per-framework notes.
#1. Copy the resource
Copy tc-divisions into resources.
#2. Database
Import sql/install.sql (optional: the tc_div_* tables are created at start-up). See Database.
#3. server.cfg
After your framework, oxmysql, ox_lib, tc-ui and your inventory:
ensure oxmysql
ensure ox_lib
ensure es_extended # or core / qb-core / qbx_core
ensure ox_inventory # your inventory
ensure tc-ui
ensure tc-divisionsThe framework is detected when the resource starts: start it after the framework, or force Config.Bridge.Framework.
#4. Edit config.lua
At minimum, set up staff access (see Configuration):
| Option | Role |
|---|---|
Config.Permissions, Config.AdminDiscords | Staff access on Vision |
Config.Bridge.Admins / AdminAce | Staff access outside Vision (add_ace group.admin command allow) |
Config.Commands | Command names |
Config.Panic | Panic button outside Vision (jobs concerned) |
#5. Create your first point
In game, as staff: /divgestion. First create divisions for a job, then chests, shops or garages (position, access, capacity…). Each point is placed with my position or, outside Vision, with the gizmo (object_gizmo).
#Items to create
The script does not need any item to run: shops sell items already in your inventory. Only outfits (Config.Outfits) use a dedicated item (outfit by default), which receives the outfit as metadata.
On Vision it already exists. Elsewhere, copy the file for your inventory then set Config.Outfits.Enabled = true — provided your clothing resource can use this item (it must read the skin / sex metadata). Otherwise leave outfits disabled.
Copy the entry into ox_inventory/data/items.lua:
-- Entrée à copier dans le `return { ... }` de ox_inventory/data/items.lua (uniquement si vous vendez
-- des tenues dans les shops : Config.Outfits). Le nom doit correspondre à Config.Outfits.Item.
-- Entry to copy into ox_inventory/data/items.lua (only needed if you sell outfits in shops).
return {
['outfit'] = {
label = 'Tenue',
weight = 500,
stack = false,
close = true,
description = 'Une tenue de service.',
},
}Copy the entry into qb-core/shared/items.lua:
-- Entrée à copier dans qb-core/shared/items.lua (uniquement si vous vendez des tenues dans les shops :
-- Config.Outfits). Le nom doit correspondre à Config.Outfits.Item.
-- Entry to copy into qb-core/shared/items.lua (only needed if you sell outfits in shops).
return {
outfit = { name = 'outfit', label = 'Tenue', weight = 500, type = 'item', image = 'outfit.png', unique = true, useable = true, shouldClose = true, description = 'Une tenue de service.' },
}Run in the database (adapt columns to your items table):
-- ESX : objet « tenue » (uniquement si vous vendez des tenues dans les shops : Config.Outfits).
-- Le nom doit correspondre à Config.Outfits.Item. Adaptez les colonnes à votre table `items`.
INSERT IGNORE INTO `items` (`name`, `label`, `weight`) VALUES ('outfit', 'Tenue', 1);#Notes per framework
- Vision: everything is available (
/gestioncard, green-screen photo, core panic, temporary keys). - Outside Vision: the staff menu opens with
/divgestion; the green-screen photo is hidden; mouse placement requiresobject_gizmo(otherwise a “my position” button); panic notifies and marks on the map the players of theConfig.Panic.Jobsjobs; outfits are disabled by default.
Test each type of point (division, chest, shop, garage, panic) with a staff account and a player account after installing, especially on ESX, QBCore and Qbox.