GIG ScriptsGIG Scripts

Money Printers

Placeable printers that produce cash, drain consumables and overheat.

Dependencies

  • ox_lib
  • oxmysql
  • gig-heistAssets (printer prop and animations)
  • Qbox, QB-Core or ESX
  • ox_target or qb-target (cfg.target)
server.cfg
ensure gig-heistAssets
ensure gig-moneyPrinters

Items

Names are set in cfg.items. Icons are in the resource's icons/ folder.

ItemPurpose
gig_moneyprinterplace a printer (consumed)
gig_batteryrefill the battery (consumed)
gig_cartridgerefill the cartridge (consumed)
ox_inventory/data/items.lua
['gig_moneyprinter'] = {
    label = 'Money Printer',
    weight = 5000,
    stack = false,
    close = true,
    description = 'A device that prints money.',
},
['gig_battery'] = {
    label = 'Printer Battery',
    weight = 1000,
    stack = true,
    close = true,
},
['gig_cartridge'] = {
    label = 'Printer Cartridge',
    weight = 1000,
    stack = true,
    close = true,
},
qb-core/shared/items.lua
['gig_moneyprinter'] = { name = 'gig_moneyprinter', label = 'Money Printer', weight = 5000, type = 'item', image = 'gig_moneyprinter.png', unique = true, useable = true, shouldClose = true, description = 'A device that prints money.' },
['gig_battery'] = { name = 'gig_battery', label = 'Printer Battery', weight = 1000, type = 'item', image = 'gig_battery.png', unique = false, useable = false, shouldClose = false, description = 'Battery for a money printer.' },
['gig_cartridge'] = { name = 'gig_cartridge', label = 'Printer Cartridge', weight = 1000, type = 'item', image = 'gig_cartridge.png', unique = false, useable = false, shouldClose = false, description = 'Cartridge for a money printer.' },
ESX without ox_inventory
INSERT INTO `items` (`name`, `label`, `weight`) VALUES
('gig_moneyprinter', 'Money Printer', 5),
('gig_battery', 'Printer Battery', 1),
('gig_cartridge', 'Printer Cartridge', 1);

Only the printer needs to be usable. Battery and cartridge are taken from the inventory through the printer menu.

How it works

Use the printer item, pick a spot, place it. The printer runs while it has battery and cartridge, and stores cash you collect from its menu. Every level prints faster but burns consumables faster and heats up quicker. Past the smoke threshold it smokes, past the fire threshold it burns, and at the explosion threshold it is gone, along with whatever was inside.

Config

  • cfg.printer.maxLevel, moneyPerMinute, upgradeCost: economy per level.
  • cfg.printer.consumption: battery and cartridge drain per minute per level.
  • cfg.printer.temperature: start value, gain per minute per level, and the three thresholds.
  • cfg.printer.allowOtherAccess: whether anyone can open a printer or only its owner.
  • cfg.printer.allowRelocation: whether a placed printer can be picked up and moved.

Printers survive restarts. State is written to the database every tick they are active.

On this page