> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/badges/configuration/presenting.md).

# Presenting and validity

Showing a badge, the prop and animation, the close key, validity and where the badge appears on screen.

All blocks are in `config/config.lua`.

## Present

Showing a badge: using the item, or `/badge`.

```lua
Config.Present = {
    ShowToNearby = true,        -- nearby players see the badge too
    Distance = 3.5,             -- metres
    Duration = 7000,            -- ms the badge stays on screen
    Cooldown = 10,              -- seconds between two presentations by the same player
    OwnerOnly = false,          -- true = only the person named on the badge can show it
    LookAtPresenter = true,     -- viewers turn their head towards the presenter
    CloseKey = 'BACK',          -- default key to put the badge away (players can rebind it)
    Command = 'badge',          -- /badge shows a badge you carry (false = item only)
    Prop = {
        model = 'prop_fib_badge',
        bone = 28422,
        pos = vec3(0.065, 0.029, -0.035),
        rot = vec3(80.0, -1.90, 75.0),
    },
    Anim = { dict = 'paper_1_rcm_alt1-9', clip = 'player_one_dual-9', flag = 49 },
}
```

| Option            | Default                                    | Meaning                                                                                                                 |
| ----------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `ShowToNearby`    | `true`                                     | Nearby players see the badge too.                                                                                       |
| `Distance`        | `3.5`                                      | Metres (same routing bucket).                                                                                           |
| `Duration`        | `7000`                                     | Milliseconds the badge stays on screen.                                                                                 |
| `Cooldown`        | `10`                                       | Seconds between two presentations by the same player.                                                                   |
| `OwnerOnly`       | `false`                                    | `true`: only the person named on the badge can show it ("This badge is not yours.").                                    |
| `LookAtPresenter` | `true`                                     | Viewers turn their head towards the presenter.                                                                          |
| `CloseKey`        | `'BACK'`                                   | Default key of the binding "Put the badge away" (Backspace).                                                            |
| `Command`         | `'badge'`                                  | `/badge` shows a badge you carry: right away when you have one, with a menu when you have several. `false` = item only. |
| `Prop`            | `prop_fib_badge` on bone `28422`           | The prop in the presenter's hand. `false` = no prop.                                                                    |
| `Anim`            | `paper_1_rcm_alt1-9` / `player_one_dual-9` | The presenter's animation. Keep it set.                                                                                 |

{% hint style="warning" %}
**Without an inventory, `/badge` is the only way to show a badge.** Don't set `Command = false` in that case.
{% endhint %}

{% hint style="info" %}
**The close key is a FiveM key binding.** Players can change it in **Settings → Key Bindings → FiveM**. FiveM remembers each player's binding, so changing `CloseKey` later only affects players who never had it.
{% endhint %}

Dead, downed or cuffed players can't show a badge. A single badge can override `Prop` and `Anim` with `present = { ... }` (see [Badge types](/visionstore-docs/scripts/badges/configuration/badges.md#prop-and-animation)).

## Validity

What viewers see on a shown badge: **VALID**, **REVOKED**, **INACTIVE** (the owner no longer holds any of the badge's jobs) or **UNREGISTERED** (the item has no matching badge record).

```lua
Config.Validity = {
    CheckMembership = true,     -- a badge whose owner left the job shows as "INACTIVE"
    CacheSeconds = 60,          -- membership answers are cached this long
}
```

| Option            | Default | Meaning                                                                                                                   |
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| `CheckMembership` | `true`  | Check that the owner still holds one of the badge's jobs; if not, the badge shows **INACTIVE**. `false` = never INACTIVE. |
| `CacheSeconds`    | `60`    | How long one answer is remembered per person and badge type.                                                              |

The owner may be offline, so the check also reads your framework's database tables. If the check can't answer (for example a failed query), the badge counts as valid: a database hiccup never voids a badge. On standalone servers badges never show INACTIVE.

## On-screen badge

```lua
Config.UI = {
    Position = 'bottom',        -- 'bottom' | 'center' | 'right' | 'left'
    Scale = 1.0,
    ServerName = 'VISION',      -- small tag on the issuing panel
    DateFormat = '%Y/%m/%d',    -- issue date printed on the card (os.date format)
}
```

| Option       | Default      | Meaning                                                                                                                                                                      |
| ------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Position`   | `'bottom'`   | Where a shown badge appears: `'bottom'`, `'center'`, `'right'` or `'left'`.                                                                                                  |
| `Scale`      | `1.0`        | Size multiplier for the whole interface (shown badge, review panel, Badge Studio).                                                                                           |
| `ServerName` | `'VISION'`   | Small tag on the issuing review panel. Put your server's name here.                                                                                                          |
| `DateFormat` | `'%Y/%m/%d'` | Issue date format (Lua `os.date`), used on the card, the review panel, the Registry and the item tooltip. `'%d/%m/%Y'` gives `12/10/2026`, `'%d %b %Y'` gives `12 Oct 2026`. |

The date is stored as a timestamp, so a new `DateFormat` also applies to old badges, except item tooltips (written when the badge was issued).


---

# 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://visionstore.gitbook.io/visionstore-docs/scripts/badges/configuration/presenting.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.
