Installation Guide
Complete installation instructions for the Oxide 3D Weapon Printing system including database setup, item registration, and framework configuration.
Prerequisites
Required Resources
| Resource | Minimum Version | Purpose |
|---|---|---|
| ox_lib | v3.0.0+ | Utility library, locale, callbacks |
| oxmysql | latest | MySQL database operations |
| o-link | latest | Framework and system abstraction layer |
Supported Frameworks
| Framework | Support |
|---|---|
| QBCore | Full |
| ESX | Full |
| QBX (qbx_core) | Full |
Installation
Extract the resource
Extract the resource to your resources/ folder (e.g., resources/[oxide]/oxide-weaponprinting).
Add to server.cfg
Dependency order matters:
ensure ox_lib
ensure oxmysql
ensure qb-core
ensure qb-inventory # or your inventory resource
ensure o-link
ensure oxide-weaponprintingensure ox_lib
ensure oxmysql
ensure es_extended
ensure ox_inventory # or your inventory resource
ensure o-link
ensure oxide-weaponprintingensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_inventory # or your inventory resource
ensure o-link
ensure oxide-weaponprintingYour framework core and inventory resource must load before o-link and oxide-weaponprinting.
Import the database
See Database Setup below for the SQL file and tables created.
Register all items
See Item Registration below for the full item list and framework-specific examples.
Configure settings
Configure settings in shared/config.lua and shared/config/*.lua — see the Configuration Reference.
Database Setup
Import the SQL file into your MySQL database:
sql/install.sqlThis creates the following tables:
| Table | Purpose |
|---|---|
3d_printers | Placed 3D printers with position, owner, name, and upgrade metadata |
weapon_benches | Placed weapon benches with position and owner |
placeable_tables | Placed tables with position and owner |
active_prints | Currently printing or uncollected parts linked to printers |
Item Registration
You must register the following items in your framework's item database. These include placeable equipment, consumable materials, 30 printed weapon parts, and 14 printer upgrade components.
Item images: Item icon images are included in the itemimages/ folder within the oxide-weaponprinting resource. Copy all .png files from itemimages/ to your inventory's image directory:
- QBCore (qb-inventory):
qb-inventory/html/images/ - ESX / QBX (ox_inventory):
ox_inventory/web/images/
The image filenames already match the item names, so no renaming is needed.
Updating from an earlier version? Re-copy the itemimages/ folder after updating — every icon filename now matches its item name exactly, including the weapon bench (weaponbench.png). If your items list still registers the bench as weapon_bench, rename it to weaponbench (keep its label, weight, and other properties); bench items players already hold must be re-issued. If you set Config.BenchItem to your own item name, no change is needed.
Required Items
| Item Name | Label | Description |
|---|---|---|
3d_printer | 3D Printer | Placeable printer for manufacturing parts |
printer_usb | Printer USB | USB drive that carries one weapon blueprint |
printer_filament | Printer Filament | Filament spool consumed during printing |
weaponbench | Weapon Bench | Placeable workbench for assembling weapons |
placeable_table | Table | General-purpose placeable table |
printer_manual | The Ghost Gunner's Handbook | In-game guide book for the weapon printing system |
Printed Part Items (30)
| Item Name | Label |
|---|---|
3d_printed_pistol_slide | Printed Pistol Slide |
3d_printed_pistol_grip | Printed Pistol Grip |
3d_printed_pistol_clip | Printed Pistol Magazine |
3d_printed_pistol_compact_frame | Printed Compact Frame |
3d_printed_revolver_frame | Printed Revolver Frame |
3d_printed_revolver_receiver | Printed Revolver Receiver |
3d_printed_trigger_group | Printed Trigger Group |
3d_printed_smg_barrel | Printed SMG Barrel |
3d_printed_smg_receiver | Printed SMG Receiver |
3d_printed_smg_mag | Printed SMG Magazine |
3d_printed_compact_barrel | Printed Compact Barrel |
3d_printed_folding_stock | Printed Folding Stock |
3d_printed_rifle_barrel | Printed Rifle Barrel |
3d_printed_rifle_upper | Printed Rifle Upper |
3d_printed_rifle_lower | Printed Rifle Lower |
3d_printed_rifle_handguard | Printed Rifle Handguard |
3d_printed_rifle_mag | Printed Rifle Magazine |
3d_printed_rifle_stock | Printed Rifle Stock |
3d_printed_bullpup_chassis | Printed Bullpup Chassis |
3d_printed_shotgun_barrel | Printed Shotgun Barrel |
3d_printed_shotgun_receiver | Printed Shotgun Receiver |
3d_printed_shotgun_stock | Printed Shotgun Stock |
3d_printed_pump_handle | Printed Pump Handle |
3d_printed_double_barrel_set | Printed Double Barrel Set |
3d_printed_sniper_barrel | Printed Sniper Barrel |
3d_printed_sniper_receiver | Printed Sniper Receiver |
3d_printed_sniper_mag | Printed Sniper Magazine |
3d_printed_sniper_stock | Printed Sniper Stock |
3d_printed_long_scope | Printed Long Scope |
3d_printed_drum_mag | Printed Drum Magazine |
Printer Upgrade Items (14)
| Item Name | Label |
|---|---|
printer_nozzle_mk1 | Nozzle Mk I |
printer_nozzle_mk2 | Nozzle Mk II |
printer_nozzle_mk3 | Nozzle Mk III |
printer_storage_mk1 | Storage Drive Mk I |
printer_storage_mk2 | Storage Drive Mk II |
printer_storage_mk3 | Storage Drive Mk III |
printer_cooling_mk1 | Cooling Fan Mk I |
printer_cooling_mk2 | Cooling Fan Mk II |
printer_cooling_mk3 | Cooling Fan Mk III |
printer_buildplate_mk1 | Build Plate Mk I |
printer_buildplate_mk2 | Build Plate Mk II |
printer_buildplate_mk3 | Build Plate Mk III |
printer_psu_mk1 | Power Supply Mk I |
printer_psu_mk2 | Power Supply Mk II |
QBCore Item Registration
Step 1: Copy item images
Copy all .png files from oxide-weaponprinting/itemimages/ to qb-inventory/html/images/.
Step 2: Add items to qb-core
Add these to qb-core/shared/items.lua:
-- oxide-weaponprinting: Equipment Items
['3d_printer'] = { name = '3d_printer', label = '3D Printer', weight = 10000, type = 'item', image = '3d_printer.png', unique = false, useable = true, shouldClose = true, description = 'A portable 3D printer for manufacturing parts' },
['printer_usb'] = { name = 'printer_usb', label = 'Printer USB', weight = 100, type = 'item', image = 'printer_usb.png', unique = true, useable = false, shouldClose = true, description = 'A USB drive containing a 3D printing blueprint' },
['printer_filament'] = { name = 'printer_filament', label = 'Printer Filament', weight = 500, type = 'item', image = 'printer_filament.png', unique = false, useable = false, shouldClose = true, description = 'Filament spool for 3D printers' },
['weaponbench'] = { name = 'weaponbench', label = 'Weapon Bench', weight = 15000, type = 'item', image = 'weaponbench.png', unique = false, useable = true, shouldClose = true, description = 'A portable workbench for assembling weapon parts' },
['placeable_table'] = { name = 'placeable_table', label = 'Table', weight = 8000, type = 'item', image = 'placeable_table.png', unique = false, useable = true, shouldClose = true, description = 'A placeable table' },
['printer_manual'] = { name = 'printer_manual', label = 'The Ghost Gunner\'s Handbook', weight = 500, type = 'item', image = 'printer_manual.png', unique = false, useable = true, shouldClose = true, description = 'An in-game guide to 3D weapon printing' },
-- oxide-weaponprinting: Pistol Parts
['3d_printed_pistol_slide'] = { name = '3d_printed_pistol_slide', label = 'Printed Pistol Slide', weight = 300, type = 'item', image = '3d_printed_pistol_slide.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed pistol slide' },
['3d_printed_pistol_grip'] = { name = '3d_printed_pistol_grip', label = 'Printed Pistol Grip', weight = 400, type = 'item', image = '3d_printed_pistol_grip.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed pistol grip and frame' },
['3d_printed_pistol_clip'] = { name = '3d_printed_pistol_clip', label = 'Printed Pistol Magazine', weight = 200, type = 'item', image = '3d_printed_pistol_clip.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed pistol magazine' },
['3d_printed_pistol_compact_frame'] = { name = '3d_printed_pistol_compact_frame', label = 'Printed Compact Frame', weight = 200, type = 'item', image = '3d_printed_pistol_compact_frame.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed compact pistol frame' },
['3d_printed_revolver_frame'] = { name = '3d_printed_revolver_frame', label = 'Printed Revolver Frame', weight = 300, type = 'item', image = '3d_printed_revolver_frame.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed revolver frame' },
['3d_printed_revolver_receiver'] = { name = '3d_printed_revolver_receiver', label = 'Printed Revolver Receiver', weight = 300, type = 'item', image = '3d_printed_revolver_receiver.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed revolver receiver' },
['3d_printed_trigger_group'] = { name = '3d_printed_trigger_group', label = 'Printed Trigger Group', weight = 100, type = 'item', image = '3d_printed_trigger_group.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed trigger assembly' },
-- oxide-weaponprinting: SMG Parts
['3d_printed_smg_barrel'] = { name = '3d_printed_smg_barrel', label = 'Printed SMG Barrel', weight = 200, type = 'item', image = '3d_printed_smg_barrel.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed SMG barrel' },
['3d_printed_smg_receiver'] = { name = '3d_printed_smg_receiver', label = 'Printed SMG Receiver', weight = 300, type = 'item', image = '3d_printed_smg_receiver.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed SMG receiver' },
['3d_printed_smg_mag'] = { name = '3d_printed_smg_mag', label = 'Printed SMG Magazine', weight = 150, type = 'item', image = '3d_printed_smg_mag.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed SMG magazine' },
['3d_printed_compact_barrel'] = { name = '3d_printed_compact_barrel', label = 'Printed Compact Barrel', weight = 150, type = 'item', image = '3d_printed_compact_barrel.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed compact barrel' },
['3d_printed_folding_stock'] = { name = '3d_printed_folding_stock', label = 'Printed Folding Stock', weight = 250, type = 'item', image = '3d_printed_folding_stock.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed folding stock' },
-- oxide-weaponprinting: Rifle Parts
['3d_printed_rifle_barrel'] = { name = '3d_printed_rifle_barrel', label = 'Printed Rifle Barrel', weight = 400, type = 'item', image = '3d_printed_rifle_barrel.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle barrel' },
['3d_printed_rifle_upper'] = { name = '3d_printed_rifle_upper', label = 'Printed Rifle Upper', weight = 300, type = 'item', image = '3d_printed_rifle_upper.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle upper receiver' },
['3d_printed_rifle_lower'] = { name = '3d_printed_rifle_lower', label = 'Printed Rifle Lower', weight = 300, type = 'item', image = '3d_printed_rifle_lower.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle lower receiver' },
['3d_printed_rifle_handguard'] = { name = '3d_printed_rifle_handguard', label = 'Printed Rifle Handguard', weight = 200, type = 'item', image = '3d_printed_rifle_handguard.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle handguard' },
['3d_printed_rifle_mag'] = { name = '3d_printed_rifle_mag', label = 'Printed Rifle Magazine', weight = 200, type = 'item', image = '3d_printed_rifle_mag.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle magazine' },
['3d_printed_rifle_stock'] = { name = '3d_printed_rifle_stock', label = 'Printed Rifle Stock', weight = 300, type = 'item', image = '3d_printed_rifle_stock.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed rifle stock' },
['3d_printed_bullpup_chassis'] = { name = '3d_printed_bullpup_chassis', label = 'Printed Bullpup Chassis', weight = 500, type = 'item', image = '3d_printed_bullpup_chassis.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed bullpup chassis' },
-- oxide-weaponprinting: Shotgun Parts
['3d_printed_shotgun_barrel'] = { name = '3d_printed_shotgun_barrel', label = 'Printed Shotgun Barrel', weight = 500, type = 'item', image = '3d_printed_shotgun_barrel.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed shotgun barrel' },
['3d_printed_shotgun_receiver'] = { name = '3d_printed_shotgun_receiver', label = 'Printed Shotgun Receiver', weight = 400, type = 'item', image = '3d_printed_shotgun_receiver.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed shotgun receiver' },
['3d_printed_shotgun_stock'] = { name = '3d_printed_shotgun_stock', label = 'Printed Shotgun Stock', weight = 300, type = 'item', image = '3d_printed_shotgun_stock.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed shotgun stock' },
['3d_printed_pump_handle'] = { name = '3d_printed_pump_handle', label = 'Printed Pump Handle', weight = 150, type = 'item', image = '3d_printed_pump_handle.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed pump action handle' },
['3d_printed_double_barrel_set'] = { name = '3d_printed_double_barrel_set', label = 'Printed Double Barrel Set', weight = 600, type = 'item', image = '3d_printed_double_barrel_set.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed double barrel assembly' },
-- oxide-weaponprinting: Sniper Parts
['3d_printed_sniper_barrel'] = { name = '3d_printed_sniper_barrel', label = 'Printed Sniper Barrel', weight = 600, type = 'item', image = '3d_printed_sniper_barrel.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed sniper barrel' },
['3d_printed_sniper_receiver'] = { name = '3d_printed_sniper_receiver', label = 'Printed Sniper Receiver', weight = 400, type = 'item', image = '3d_printed_sniper_receiver.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed sniper receiver' },
['3d_printed_sniper_mag'] = { name = '3d_printed_sniper_mag', label = 'Printed Sniper Magazine', weight = 200, type = 'item', image = '3d_printed_sniper_mag.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed sniper magazine' },
['3d_printed_sniper_stock'] = { name = '3d_printed_sniper_stock', label = 'Printed Sniper Stock', weight = 400, type = 'item', image = '3d_printed_sniper_stock.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed sniper stock' },
['3d_printed_long_scope'] = { name = '3d_printed_long_scope', label = 'Printed Long Scope', weight = 300, type = 'item', image = '3d_printed_long_scope.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed long range scope' },
-- oxide-weaponprinting: Machine Gun Parts
['3d_printed_drum_mag'] = { name = '3d_printed_drum_mag', label = 'Printed Drum Magazine', weight = 400, type = 'item', image = '3d_printed_drum_mag.png', unique = false, useable = false, shouldClose = true, description = 'A 3D printed drum magazine' },
-- oxide-weaponprinting: Printer Upgrades
['printer_nozzle_mk1'] = { name = 'printer_nozzle_mk1', label = 'Nozzle Mk I', weight = 200, type = 'item', image = 'printer_nozzle_mk1.png', unique = false, useable = false, shouldClose = true, description = 'Basic printer nozzle upgrade' },
['printer_nozzle_mk2'] = { name = 'printer_nozzle_mk2', label = 'Nozzle Mk II', weight = 200, type = 'item', image = 'printer_nozzle_mk2.png', unique = false, useable = false, shouldClose = true, description = 'Advanced printer nozzle upgrade' },
['printer_nozzle_mk3'] = { name = 'printer_nozzle_mk3', label = 'Nozzle Mk III', weight = 200, type = 'item', image = 'printer_nozzle_mk3.png', unique = false, useable = false, shouldClose = true, description = 'Precision printer nozzle upgrade' },
['printer_storage_mk1'] = { name = 'printer_storage_mk1', label = 'Storage Drive Mk I', weight = 100, type = 'item', image = 'printer_storage_mk1.png', unique = false, useable = false, shouldClose = true, description = 'Basic storage expansion' },
['printer_storage_mk2'] = { name = 'printer_storage_mk2', label = 'Storage Drive Mk II', weight = 100, type = 'item', image = 'printer_storage_mk2.png', unique = false, useable = false, shouldClose = true, description = 'Advanced storage expansion' },
['printer_storage_mk3'] = { name = 'printer_storage_mk3', label = 'Storage Drive Mk III', weight = 100, type = 'item', image = 'printer_storage_mk3.png', unique = false, useable = false, shouldClose = true, description = 'High-capacity storage expansion' },
['printer_cooling_mk1'] = { name = 'printer_cooling_mk1', label = 'Cooling Fan Mk I', weight = 300, type = 'item', image = 'printer_cooling_mk1.png', unique = false, useable = false, shouldClose = true, description = 'Basic cooling system' },
['printer_cooling_mk2'] = { name = 'printer_cooling_mk2', label = 'Cooling Fan Mk II', weight = 300, type = 'item', image = 'printer_cooling_mk2.png', unique = false, useable = false, shouldClose = true, description = 'Advanced cooling system' },
['printer_cooling_mk3'] = { name = 'printer_cooling_mk3', label = 'Cooling Fan Mk III', weight = 300, type = 'item', image = 'printer_cooling_mk3.png', unique = false, useable = false, shouldClose = true, description = 'Industrial cooling system' },
['printer_buildplate_mk1'] = { name = 'printer_buildplate_mk1', label = 'Build Plate Mk I', weight = 500, type = 'item', image = 'printer_buildplate_mk1.png', unique = false, useable = false, shouldClose = true, description = 'Improved build plate' },
['printer_buildplate_mk2'] = { name = 'printer_buildplate_mk2', label = 'Build Plate Mk II', weight = 500, type = 'item', image = 'printer_buildplate_mk2.png', unique = false, useable = false, shouldClose = true, description = 'Advanced build plate' },
['printer_buildplate_mk3'] = { name = 'printer_buildplate_mk3', label = 'Build Plate Mk III', weight = 500, type = 'item', image = 'printer_buildplate_mk3.png', unique = false, useable = false, shouldClose = true, description = 'Precision build plate' },
['printer_psu_mk1'] = { name = 'printer_psu_mk1', label = 'Power Supply Mk I', weight = 800, type = 'item', image = 'printer_psu_mk1.png', unique = false, useable = false, shouldClose = true, description = 'Upgraded power supply unit' },
['printer_psu_mk2'] = { name = 'printer_psu_mk2', label = 'Power Supply Mk II', weight = 800, type = 'item', image = 'printer_psu_mk2.png', unique = false, useable = false, shouldClose = true, description = 'High-output power supply unit' },Note on printer_usb: This item uses unique = true because each USB drive remembers which blueprint it carries (saved as metadata — extra information attached to that specific item). Two USBs holding different blueprints must not stack together, so the item can't be stackable.
ESX / QBX Item Registration (ox_inventory)
Every item above is ready to paste in itemimages/ox_inventory_items.lua in the resource folder. Copy the entries between its braces into your ox_inventory/data/items.lua, above that file's final closing brace, then copy the .png files from itemimages/ into ox_inventory/web/images/. printer_usb is already set to stack = false.
The entries use the standard ox_inventory format, for example:
['3d_printer'] = { label = '3D Printer', weight = 10000, stack = true, close = true, description = 'A portable 3D printer for manufacturing parts' },
['printer_usb'] = { label = 'Printer USB', weight = 100, stack = false, close = true, description = 'A USB drive containing a 3D printing blueprint' },
['weaponbench'] = { label = 'Weapon Bench', weight = 15000, stack = true, close = true, description = 'A portable workbench for assembling weapon parts' },
-- ...every equipment, part, and upgrade itemImportant Notes on Item Metadata
Metadata is extra information attached to one specific item in an inventory. Two items in this resource rely on it, and it must be preserved through inventory operations:
- printer_usb — Carries a
blueprintvalue naming which weapon blueprint is on that USB drive - Assembled weapons — Weapons made at the weapon bench carry their quality grade, durability, and "3D Printed" tag:
printed = true,quality,grade,durability(only while durability tracking is on), a ready-madedescription, and adisplaytable for inventory tooltip rendering
The printer_usb item should be registered as non-stackable (unique = true for QBCore, stack = false for ox_inventory) because each USB holds a different blueprint in its metadata.
Weapon Tooltips in the Inventory
Assembled weapons carry a ready-made description, e.g. 3D Printed - Quality (72%) | Durability: 64%. Inventories that show per-item descriptions (ox_inventory does this out of the box) display it automatically — no setup needed.
They also carry a display table with the same values for inventories patched to render Oxide's clean tooltip format. If your other Oxide resources (e.g., oxide-weed) already show quality tooltips in qb-inventory, this resource will too.
Framework Setup
There is no framework-specific setup beyond registering the items above. The o-link bridge detects whether you run QBCore, ESX, or QBX automatically and handles all the framework plumbing:
- Usable item registration
- Inventory add/remove/check operations
- Saving progression on the character
- Notifications
- Interaction prompts
Verification
Start your server and check the console for a startup line like:
[INFO][oxide-weaponprinting][lifecycle] resource initializedfollowed by the number of printers, benches, and tables loaded from the database.
Use /printer_kit in-game (requires admin permission — see the Admin Guide) to receive filament, a pistol blueprint USB, and the handbook. You'll also want a 3d_printer item — give one with your usual admin give-item command.
Use the 3D Printer item from your inventory — a see-through preview of the printer should appear in front of you.
Place the printer, walk up to it, and interact with it — the printer screen should open.
Distributing Blueprint USBs to Players
oxide-weaponprinting does not include a built-in way for players to obtain blueprint USBs through normal gameplay — this is intentional. Server owners choose how USBs enter their economy: shops, NPC vendors, crafting, loot drops, heists, black market dealers, or any other system. For example, Oxide Blackmarket dealers sell several blueprint USBs in their default higher-tier stock.
USB Metadata Format
A printer_usb item must carry a blueprint value in its metadata (the extra information attached to that specific item) matching a key from Config.Blueprints in shared/config/blueprints.lua. A USB without this cannot be loaded into a printer.
-- The metadata structure for a blueprint USB:
{ blueprint = 'pistol' } -- value must match a Config.Blueprints keyValid Blueprint Keys
These are the keys you can use in the blueprint metadata field. Each key corresponds to a weapon blueprint and is gated behind a player level (see Progression).
| Level | Blueprint Keys |
|---|---|
| 1 | sns_pistol, vintage_pistol, flare_gun, pistol, sns_pistol_mk2, ceramic_pistol, double_action_revolver, marksman_pistol, machine_pistol |
| 2 | micro_smg, mini_smg, smg, smg_mk2, combat_pdw, assault_smg, pump_shotgun, sawnoff_shotgun, db_shotgun, auto_shotgun |
| 3 | combat_pistol, ap_pistol, pistol_mk2, heavy_pistol |
| 4 | assault_rifle, carbine_rifle, special_carbine, compact_rifle, bullpup_rifle, pump_shotgun_mk2, bullpup_shotgun, assault_shotgun |
| 5 | assault_rifle_mk2, carbine_rifle_mk2, special_carbine_mk2, bullpup_rifle_mk2, advanced_rifle, military_rifle, heavy_rifle, heavy_shotgun |
| 6 | pistol_50, heavy_revolver, heavy_revolver_mk2, navy_revolver |
| 7 | sniper_rifle, marksman_rifle, marksman_rifle_mk2 |
| 8 | mg, combat_mg, combat_mg_mk2, heavy_sniper, heavy_sniper_mk2 |
| 9 | perico_pistol |
Integration Examples
Adding USBs to a Shop (oxide-shops)
Add printer_usb entries to your oxide-shops shop config with the appropriate metadata:
-- Example shop item entry
{
name = 'printer_usb',
price = 5000,
metadata = { blueprint = 'pistol' },
},
{
name = 'printer_usb',
price = 15000,
metadata = { blueprint = 'smg' },
},Giving a USB via Server Script
-- QBCore
local Player = QBCore.Functions.GetPlayer(source)
Player.Functions.AddItem('printer_usb', 1, nil, { blueprint = 'assault_rifle' })
-- ESX (ox_inventory)
exports.ox_inventory:AddItem(source, 'printer_usb', 1, { blueprint = 'assault_rifle' })
-- Via o-link (framework-agnostic, recommended)
olink.inventory.AddItem(source, 'printer_usb', 1, nil, { blueprint = 'assault_rifle' })Adding USBs to a Loot Table or Crafting Recipe
Use whatever loot/crafting system your server runs — the only requirement is that the resulting printer_usb item includes the correct metadata. For example, if your crafting system supports metadata on output items:
-- Example crafting recipe (syntax varies by crafting resource)
{
name = 'printer_usb',
amount = 1,
metadata = { blueprint = 'pistol' },
ingredients = {
{ name = 'electronic_parts', amount = 3 },
{ name = 'usb_stick', amount = 1 },
},
}Important Notes
- Each USB is a unique/non-stackable item because each one can hold a different blueprint
- The
blueprintvalue is case-sensitive and must exactly match a key inConfig.Blueprints - A low-level player can load a high-tier USB into a printer (the blueprint stores fine) — but they cannot print from it until they reach the required level
- Loading a USB has a malfunction chance (see USB Malfunction) — USBs are consumed when loaded and can be destroyed by a malfunction
- The admin command
/givewepblueprint [id] [name] [amount]can be used for testing (see Admin Guide)