> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-achievements/configuration/rewards.md).

# Rewards

Money, items and custom payouts, granted server-side exactly once.

Rewards are granted server-side, exactly once per completion.

{% tabs %}
{% tab title="Money" %}

```lua
reward = { type = 'money', account = 'bank', amount = 5000 }
```

Paid straight into your framework's balance. `account` is `bank` or `money` (cash); the name is translated for QBCore and Qbox automatically, so one config reads the same everywhere.

Every payout carries the reason `achievement:<id>` so it appears in your framework's own money logs, and the balance is re-read afterwards — if it did not actually move, the award stays unclaimed rather than being marked paid.
{% endtab %}

{% tab title="Item" %}

```lua
reward = { type = 'item', name = 'lockpick', count = 2, label = 'Lockpick' }
```

Delivered through the inventory bridge, which detects `ox_inventory`, `qs-inventory`, `origen_inventory`, `codem-inventory`, `qb-inventory` or your framework's own — see [Inventory](/mango5m-docs/resources/mango-achievements/configuration/inventory.md). `label` is what the popup shows.

`metadata` is passed straight through to inventories that support it.
{% endtab %}

{% tab title="Custom" %}

```lua
reward = {
    type  = 'event',
    event = 'myresource:grantReward',
    args  = { 'vip_pass', 30 },
    label = '30 days VIP',
}
```

Fires a server event and lets your own script decide what to hand out:

```lua
AddEventHandler('myresource:grantReward', function(src, achievementId, pass, days)
    -- pass = 'vip_pass', days = 30
end)
```

{% endtab %}

{% tab title="Several at once" %}

```lua
reward = {
    type = 'multi',
    rewards = {
        { type = 'money', account = 'bank', amount = 1000 },
        { type = 'item',  name = 'phone', count = 1 },
    },
}
```

Partial success still counts — if the player's inventory is full, the money half is not rolled back, and the item half can still be claimed later.
{% endtab %}
{% endtabs %}

{% hint style="success" %}
**No double payouts.** The reward is marked as claimed in the same database write as the completion, so a reconnect, a restart or a hand-edited row can never pay twice.
{% endhint %}

## When a reward cannot be paid

A misspelled account name or an unknown item is refused with a console warning, and the award stays **unclaimed** rather than being silently marked as paid.

A **full inventory** is handled properly rather than just logged: the award grows a **Claim** button in the menu, and the player collects the item once they have room. See [Claiming Rewards](/mango5m-docs/resources/mango-achievements/features/claiming-rewards.md).

## Standalone servers

Without a framework there is nowhere to put money, so money rewards are refused with one clear console warning rather than failing quietly. Item rewards still work if `ox_inventory` is running. Use a `custom` reward to hand the payout to whichever economy script you do run.

## Repeatable awards

A repeatable award pays its reward **every** completion. Points are awarded once, on the first.
