Events

The event of Documents, with its arguments and an example

1 min read · Updated Dec 3, 2026

Documents has one event that other scripts can use.

Client events

topx_documents:use

Opens a document or a printed paper for a player, the same as using the item.

Side: Client (can be sent from the server)

Fires when: the player uses the item on an inventory other than ox_inventory. You can send it yourself.

Arguments

NameTypeRequiredDescription
kindstringYesdocument or paper.
metadatatableYesThe metadata of the item: docId (number) for a document, imageurl (string) and label (string) or docId for a paper.

How to use it

lua
-- server script
TriggerClientEvent('topx_documents:use', source, 'document', { docId = 15 })

-- client script
TriggerEvent('topx_documents:use', 'paper', { imageurl = 'https://example.com/page.png', label = 'Contract' })

Good to know

  • For a picture, use a host your server allows in /printeradmin.