# Deferrals: what players see while connecting

> Use FiveM connection deferrals: playerConnecting and the deferrals object (defer, update, presentCard, done, handover), the mandatory wait after defer, ban and whitelist checks, progress messages, passing data to the loading screen, and common mistakes that leave players stuck.

Source: https://fam-tools.com/guides/fivem-deferrals-connecting-cards · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 10 min

**Short answer.** In `playerConnecting`, call `deferrals.defer()`, wait at least one tick, then use `deferrals.update(text)` for progress, `deferrals.presentCard(card, cb)` for an interactive Adaptive Card, and finish with `deferrals.done()` to admit or `deferrals.done(reason)` to refuse. `deferrals.handover(data)` passes data to the loading screen. Every code path must end in `done`.

## Key points

- `defer()` → wait a tick → `update` / `presentCard` → wait a tick → `done`.
- `done()` admits; `done('reason')` refuses with that message.
- `source` in `playerConnecting` is a temporary ID.
- `handover` data shows up in the loading screen.
- A missing `done` = a player stuck on “Connecting”.

Between clicking Connect and the loading screen, a server can hold the player on a connecting screen — to check bans, verify a whitelist, show a queue position or simply greet them. That is what deferrals are for, and a few strict rules decide whether they work or leave players stuck forever.

## The deferrals object

*From the playerConnecting documentation.*

| Member | Does |
| --- | --- |
| `defer()` | Takes over the connection for your resource |
| `update(message)` | Shows a progress message |
| `presentCard(card, cb)` | Shows an Adaptive Card; `cb` receives submitted data |
| `done(reason?)` | Admits (no reason) or refuses (with reason) |
| `handover(data)` | Passes data to the loading screen for this player |

## A ban check with progress messages

*server.lua*

```lua
AddEventHandler('playerConnecting', function(name, setKickReason, deferrals)
    local src = source
    deferrals.defer()
    Wait(0) -- mandatory

    deferrals.update(('Hello %s, checking your account…'):format(name))
    local license = GetPlayerIdentifierByType(src, 'license')

    local ban = MySQL.single.await('SELECT reason FROM bans WHERE license = ?', { license })
    Wait(0)

    if ban then
        deferrals.done(('You are banned: %s. Appeal on our Discord.'):format(ban.reason))
        return
    end

    deferrals.handover({ name = name, joinedAt = os.time() })
    deferrals.done()
end)
```

The loading screen can read the handover data — see [handover data](https://fam-tools.com/guides/fivem-loading-screen-handover-data).

## The rules

- Wait at least one tick after `defer()` before `update`, `presentCard` or `done`.
- Wait a tick between a prior deferral call and `done`.
- Use the temporary `source` only with identifier and name functions — the player is not in the game yet.
- Several resources can defer the same connection; the player gets in only when all finish.
- Always finish — including when a database or HTTP call fails.

## What deferrals are used for

| Use | Guide |
| --- | --- |
| Ban checks | Above |
| Discord role whitelist | [Discord whitelist](/guides/fivem-discord-whitelist-script) |
| Interactive rules / password cards | [Adaptive Cards in deferrals](/guides/fivem-adaptive-cards-deferrals) |
| Queues and priority | [Connect queue and priority](/guides/fivem-connect-queue-priority) |

## Questions

### What are deferrals in FiveM?

A way to hold a connecting player in `playerConnecting` while your server checks something, showing messages or cards, then admitting or refusing them.

### Why are players stuck on Connecting?

A deferral was started but `deferrals.done` was never called on some code path.

### Why does deferrals.update not show?

You must wait at least one tick (`Wait(0)`) after `deferrals.defer()`.

### How do I refuse a connection with a message?

Call `deferrals.done('your message')`.

## Related

- https://fam-tools.com/guides/fivem-adaptive-cards-deferrals
- https://fam-tools.com/guides/fivem-connect-queue-priority
- https://fam-tools.com/guides/fivem-loading-screen-handover-data
- https://fam-tools.com/guides/fivem-server-connect-link-cfx-re
