> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apex-services.site/llms.txt
> Use this file to discover all available pages before exploring further.

# APEX Timeout System

> Post-revive combat lockout with injured walking.

A combat-lockout system for FiveM / ESX. After a player is revived or respawns, a configurable combat timeout (default 10 min) prevents them from attacking, auto-disarms if they pull a weapon, applies an injured walking animation, and shows a fade-in on-screen countdown. Admins can clear timeouts individually or in a radius.

## Features

* Auto-triggered after respawn (default: `esx_ambulancejob:setDeathStatus`)
* Disables melee + aim controls while active
* Auto-disarm if the player pulls a weapon
* Injured walking clipset (`move_m@injured`) applied + prior walkstyle restored on exit
* Fade-in `mm:ss` on-screen timer
* Per-player GlobalState sync — survives relogs, auto-expires server-side
* Admin commands — `/removetimeout [playerId]` + `/removetimeoutarea [radius]`
* Exempt hook — FFA / duel / combat modes bypass the timeout
* en/de localization

## Requirements

<CardGroup cols={2}>
  <Card title="Required" icon="circle-check">
    `es_extended`, `ox_lib`
  </Card>

  <Card title="Optional" icon="puzzle-piece">
    Your revive resource — default integrates with `esx_ambulancejob`, or trigger via export
  </Card>
</CardGroup>

## Configuration

```lua config.lua theme={null}
Config.TimeoutSeconds   = 600           -- 10 min
Config.AdminGroups      = { 'admin', 'frakverwaltung', 'supporter', 'projektleitung', 'founder' }
Config.RespawnEvent     = 'esx_ambulancejob:setDeathStatus'
Config.DisabledControls = { 37, 24, 140 }     -- melee light, aim, melee alt
Config.InjuredClipset   = 'move_m@injured'
Config.DpemotesWalkKvp  = 'dpemotes_walk'
```

Set `RespawnEvent = nil` and call `exports['apex-timeout-system']:applyTimeout(source)` from your revive script for custom triggers.

## Hooks

See [Hooks reference / Timeout](/hooks/apex-timeout-system). Key hooks: `Hooks.IsExempt`, `Hooks.GetSavedWalkClipset`, `Hooks.OnTimeoutStateChanged`.

## Resource info

<Note>
  Code accessible: `config.lua`, `hooks.lua`, `locales/*`, `html/*`. Approximately 500 lines of Lua + NUI. English + German.
</Note>
