> For the complete documentation index, see [llms.txt](https://gscripts.gitbook.io/gscripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gscripts.gitbook.io/gscripts-docs/gs-citations/inventory-setup.md). Agents can also search and read this documentation through its [MCP server](https://gscripts.gitbook.io/gscripts-docs/~gitbook/mcp).

# Inventory setup

Register the book items listed in Config.CitationBooks and the single paper item in Config.Items.paper. The 0.6.7 release uses citbook\_pd, citbook\_sd, citbook\_sahp and citation. citation\_book.png is an image filename, not the default book item name.

#### Before you start

Keep the installed resource folder named gs\_citations. Each issued paper stores its reference in metadata.citationId (ox\_inventory) or info.citationId (qb-inventory). Do not create an item definition for every citation ID.

#### ox\_inventory

Add these entries inside the returned table in ox\_inventory/data/items.lua. Edit existing entries instead of creating duplicates.

```lua
['citbook_pd'] = {
    label = 'LSPD Citation Book', weight = 150,
    stack = false, close = true, consume = 0,
    client = { image = 'citation_book.png', export = 'gs_citations.useBook' }
},
['citbook_sd'] = {
    label = 'LSSD Citation Book', weight = 150,
    stack = false, close = true, consume = 0,
    client = { image = 'citation_book.png', export = 'gs_citations.useBook' }
},
['citbook_sahp'] = {
    label = 'SAHP Citation Book', weight = 150,
    stack = false, close = true, consume = 0,
    client = { image = 'citation_book.png', export = 'gs_citations.useBook' }
},
['citation'] = {
    label = 'Citation', weight = 5,
    stack = false, close = true, consume = 0,
    client = { image = 'citation.png', export = 'gs_citations.usePaper' },
    buttons = {
        {
            label = 'Copy citation ID',
            action = function(slot)
                exports.gs_citations:copyCitationId(slot)
            end
        }
    }
},
```

consume = 0 keeps the item after use. stack = false keeps individual papers separate. Any holder may read the paper; only its named character can pay the debt.

#### qb-inventory

Add these entries to qb-core/shared/items.lua. Use the exact spelling useable used by QBCore.

```lua
citbook_pd = {
    name = 'citbook_pd', label = 'LSPD Citation Book', weight = 150,
    type = 'item', image = 'citation_book.png', unique = true,
    useable = true, shouldClose = true, combinable = nil,
    description = 'Los Santos Police Department citation book.'
},
citbook_sd = {
    name = 'citbook_sd', label = 'LSSD Citation Book', weight = 150,
    type = 'item', image = 'citation_book.png', unique = true,
    useable = true, shouldClose = true, combinable = nil,
    description = 'Los Santos County Sheriff citation book.'
},
citbook_sahp = {
    name = 'citbook_sahp', label = 'SAHP Citation Book', weight = 150,
    type = 'item', image = 'citation_book.png', unique = true,
    useable = true, shouldClose = true, combinable = nil,
    description = 'San Andreas Highway Patrol citation book.'
},
citation = {
    name = 'citation', label = 'Citation', weight = 5,
    type = 'item', image = 'citation.png', unique = true,
    useable = true, shouldClose = true, combinable = nil,
    description = 'A written citation.'
},
```

GS Citations registers usable callbacks when QBCore and qb-inventory are selected. References are stored in item info and printed on the paper. Dynamic inventory labels and copy context buttons depend on your inventory UI. The adapter is included; live QBCore testing remains pending.

#### Images

Copy citation.png and citation\_book.png from gs\_citations/install/inventory-images into ox\_inventory/web/images or qb-inventory/html/images. All three books share citation\_book.png by default; you may give each a different image.

#### Agency permissions

The release allows citbook\_pd for police, citbook\_sd for sheriff and citbook\_sahp for highway, starting at grade 0. Rename these jobs in both Config.Jobs and the appropriate Config.CitationBooks profile to match your server. A police character cannot use the sheriff/highway book unless you add police to those profiles or grant officer ACE access.

For a test server only, use jobs = { sheriff = 0, police = 0 } in the LSSD profile and jobs = { highway = 0, police = 0 } in the SAHP profile. Remove extra access before production if departments should be restricted.

#### After editing item definitions

Perform a planned server restart to load framework/inventory item definitions, then test each book and one issued paper. Confirm its printed agency matches the book used. Start framework and inventory before gs\_citations.

#### Adding another agency

Register its book item in your inventory, add the same name to Config.CitationBooks with department and jobs, and include the job in Config.Jobs. Keep citation as the shared paper item. Detailed examples are on the Configuration page.

#### No inventory

Set Config.Inventory = 'none'. Authorized officers open /citationbook; players use /citationpapers. Papers are held in the built-in document wallet and may be given or discarded there. No physical item definitions are needed. Payments still need a framework or custom money adapter. The wallet transfer uses a nearby player's server ID; fine ownership is assigned by character name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gscripts.gitbook.io/gscripts-docs/gs-citations/inventory-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
