Skip to content

In-game printingNew

Print a document or a record from the tablet: the player receives a “document” item they open on screen, show or give to a nearby player. Supported inventories and item declaration.

On this page05
  1. Turning printing on
  2. Supported inventories
  3. What the officer sees
  4. Bridge settings
  5. Security

In the in-game tablet, a record’s Export menu also offers Print in game. The officer receives a “document” inventory item: the printed sheet, with its title, number, issuer and department.

  • Using the item shows the sheet on screen (one image per page, “1 / 3” when there are several; ← → arrows or the buttons change pages).
  • To read a detail, zoom up to 400%: mouse wheel (centered on the cursor), − / + / Fit buttons under the sheet, +, − and 0 keys, double-click (fitted ↔ 200%) or pinch on a touch screen. Once zoomed, hold the click to move the sheet around. The percentage shows next to the buttons; each page change goes back to fitted.
  • From the sheet, Show lets the nearest player (3 m) see it without giving the item; Give hands the item to the nearest player (2 m).
  • The verification code of an issued document is at the bottom of the sheet: any department can verify it.

The sheet closes with Close or Esc. A player it is shown to sees “Someone is showing you this document”, without Show or Give.

  1. In the Documents module, Settings tab (“Document settings” permission), turn on Allow in-game printing.
  2. Enter the Inventory item name: supermdt_document by default, or a department-specific name (police_report…).
  3. Declare this item in your server’s inventory (below).
  4. Every officer who prints needs “Print in game” in their rank (given to everyone by default).
The department’s printing setting

Printing needs the game integration and bridge 0.7.0 or later.

Inventory Status
ox_inventory (ESX, QBCore, Qbox) Verified in code
qb-inventory (QBCore) Tested in game
ps-inventory Experimental
qs-inventory Experimental
codem-inventory Experimental
ESX inventory without ox_inventory Not supported (no items with information)

Tested in game tried in game on a real server. Verified in code written from the inventory’s source code, not tried in game yet. Experimental written from the publisher’s documentation, not yet tried on a real server.

The item must be unique (never stacked): each sheet keeps its own information.

ox_inventory (ox_inventory/data/items.lua):

['supermdt_document'] = {
label = 'Document',
weight = 10,
stack = false,
close = true,
consume = 0,
description = 'Document printed from the SuperMDT tablet',
server = { export = 'supermdt-bridge.useDocument' },
},

qb-inventory, ps-inventory (qb-core/shared/items.lua):

supermdt_document = { name = 'supermdt_document', label = 'Document', weight = 10, type = 'item', image = 'supermdt_document.png', unique = true, useable = true, shouldClose = true, description = 'Document printed from the SuperMDT tablet' },

qs-inventory, codem-inventory: same declaration, in their own item list. Provide a supermdt_document.png image in your inventory’s image folder, then start the bridge after the inventory.

In the tablet, after Print in game: “Document printed: check your inventory”, or an error.

Message Cause What to do
“In-game printing is turned off for this department.” Allow in-game printing is off Turn it on in Documents › Settings.
“The server’s inventory doesn’t support items with information.” No compatible inventory detected (ESX without ox_inventory…) See the supported inventories.
“Your inventory is full.” No room for the sheet Make room, then print again.
“Wait a moment before printing again.” One print per player every 4 seconds (and one per second for the whole server) Wait.
“The print expired: try again.” The print code (10 minutes) is no longer valid Print again from the tablet.
“In-game printing isn’t available here.” Page opened outside the tablet, old bridge, or printing turned off on the server (Config.Documents.enabled) Print from the in-game tablet; update the bridge.

In game, with the sheet: “Nobody is close enough to you.” (Show or Give with no player within range), “The other person’s inventory is full: you keep the document.”, “You no longer have this document on you.” (the item left the inventory), and for the receiver: “You were given a document: …”.

In config.lua, Config.Documents:

Setting Role Default
enabled Printing on the game server side (false: off, whatever SuperMDT says) on
item The default item name; names set by services in SuperMDT are made usable too supermdt_document
showDistance Show range, in meters 3
giveDistance Give range, in meters 2
cooldownMs One print per player at most every… 4 s
globalRate Prints per second for the whole server (burst: twice that) 1
actionCooldownMs Use, Show, Give: one action per player every… 1.5 s

On startup, the bridge checks that the item is declared in the inventory: if not, supermdt log flags it (“the item … is not declared in …”).

  • The player only asks: the game server claims the print from SuperMDT with their license and a single-use code (10 minutes) created by the same member.
  • SuperMDT first checks that the officer can see the object, as for an export, and writes the print to the audit log.
  • Show and give re-read the item in the inventory on the server side and measure the distance with the server’s positions.

Diagnostics: supermdt status (“Printed documents” line), supermdt log.