Install
Put the cc_pcmining folder in your resources/ (any sub-folder is fine). In server.cfg, after your framework, inventory and cc_lib:
1. The resource
Put the cc_pcmining folder in your resources/ (any sub-folder is fine). In server.cfg, after your framework, inventory and cc_lib:
ensure ox_lib
ensure oxmysql
ensure cc_lib
# your framework and inventory here
ensure cc_pcminingThe folder must be named cc_pcmining: the NUI and item images load from nui://cc_pcmining/....
2. Items
Add the 30 items to your inventory. Pick the file for yours:
| Inventory | File | Where |
|---|---|---|
| ox_inventory (Qbox, ESX, ox_core, QBCore with ox) | install/items/ox_inventory.lua | paste the entries inside return { ... } of ox_inventory/data/items.lua |
| qb-inventory, ps-inventory, lj-inventory | install/items/qb-core.lua | paste into QBShared.Items in qb-core/shared/items.lua |
| qs-inventory | install/items/qb-core.lua | paste into qs-inventory/shared/items.lua |
| ESX default inventory | not supported | use ox_inventory: graphics cards need item metadata (install/items/esx.md) |
Images: ox_inventory reads them from this resource (nothing to copy). For the others, copy install/images/*.png into your inventory's image folder (html/images for qb, ps, lj, qs).
Restart the inventory after adding items.
Materials. Refurbishing a dead card and recycling it at the shop use four ordinary items: copper, plastic, aluminum, electronickit (and metalscrap from the top card). If your server calls them something else, rename them in ServerConfig.Refurb.materials and ServerConfig.Scrap (server/config.lua). The console names any that is missing at start.
3. Database
Nothing to do: on start the resource creates and upgrades its tables (all prefixed pcm_). If your database user may not CREATE or ALTER, run sql/cc_pcmining.sql once by hand.
4. Permissions (ACE)
add_ace group.admin cc_pcmining.admin allow # /pcmadmin: economy panel, price, pause, calibrate
add_ace group.admin cc_pcmining.wipe allow # wipe a rig, a warehouse or a wallet (give to fewer people if you like)5. The exchange pepper (do this before players make codes)
Players open their crypto wallet with a personal 6-digit code. Only a salted hash is stored, mixed with a secret "pepper". Set your own:
set cc_pcmining_pepper "a-long-random-text-only-you-know"Use set, never setr. Changing it later means every player must reset their code at the exchange (it costs them the reset fee, ServerConfig.Access).
6. Discord logs (optional)
Four channels: economy, security, admin, work. Either paste the webhook URLs into ServerConfig.Webhooks in server/config.lua (server only, never sent to players), or keep them out of the files with convars:
set cc_pcmining_webhook_economy "https://discord.com/api/webhooks/..."
set cc_pcmining_webhook_security "..."
set cc_pcmining_webhook_admin "..."
set cc_pcmining_webhook_work "..."An empty work channel posts to economy. Every row is also kept in the pcm_log table and the admin panel's Activity log (ServerConfig.ActivityLog sets how long).
7. Houses (optional)
Rigs at the server farm need nothing. For rigs in houses, Config.Housing.provider:
'auto'(default): tcc-housing if it is started, else your bridge incustom/server.lua.'custom': write two functions incustom/server.luafor any housing script:
-- The integer id of the house the player stands in, or nil.
Custom.housingUnit = function(src)
-- example for a script with an `GetCurrentHouse(src)` export that returns a number:
-- return exports['my_housing']:GetCurrentHouse(src)
end
-- May this player put a rig in that house (owner or key holder)?
Custom.housingCanBuild = function(src, unit)
-- return exports['my_housing']:HasKey(src, unit)
endHouse ids must be whole numbers. If your housing script names houses by text, map them to a number in your bridge (and keep the map stable: saved rigs remember the number).
8. Locations
Everything is placed on the base map: the PC shop (Little Seoul), the crypto exchange (downtown), the server-farm desk (Cypress Flats) and the warehouses (the base-game executive small warehouse interior, one private routing bucket per rented warehouse). To move one, stand on the spot and run /pcmadmin pos; paste the printed vec4 into config.lua. Inside the warehouse, /pcmadmin calibrate moves slots, screens and props live and saves them to data/calibration.json.
Routing buckets 77001–77008 are used for the warehouses (ServerConfig.Farm.bucketBase). Move the range if another script uses it.
9. Language
set cc_pcmining_locale "en" picks locales/.json. To translate, copy en.json to your code and translate the values (keep the keys and the {placeholders}).
10. Check the console
On start you should see cc_pcmining config OK (... rigs loaded, LGC $...). Any other cc_pcmining config: line names the exact setting to fix. See TROUBLESHOOTING.md.