Skip to main content

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.

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

Required

es_extended, ox_lib

Optional

Your revive resource — default integrates with esx_ambulancejob, or trigger via export

Configuration

config.lua
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. Key hooks: Hooks.IsExempt, Hooks.GetSavedWalkClipset, Hooks.OnTimeoutStateChanged.

Resource info

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