Skip to Content
ReferenceClient Event Contracts

FiveM client event reference

Use client events for local presentation and observation. A client entity handle belongs to that client’s world; it is not a server entity handle, a network ID or a permanent player identity. Use server events for server lifecycle and policy, and stock-resource events for notifications supplied by chat, baseevents or spawnmanager.

The table includes the generated client-event catalog and the separate population/lifecycle reference pages. Its source data is shared with the contract tests. “Not documented” means this review found no supported cancellation guarantee; calling CancelEvent() is not a substitute for one. These are engine-dispatched events: use local listeners, not newly exposed network events.

Arguments and timing

Client event contracts reviewed 2026-09-22
Event and argumentsCancellationMeaning and constraints
CEventName
entities: number[], eventEntity: number, data: any[]
Not documentedPlaceholder notation: subscribe to a real GTA event name, not the literal CEventName. Payload depends on that event and build. Source
entityDamaged
victim: entity, culprit: entity, weapon: hash, baseDamage: number
NotificationClient-local handles; culprit can be 0. Base damage excludes modifiers. This is not authoritative kill confirmation. Source
gameEventTriggered
name: string, data: number[]
NotificationLow-level game event has already happened. Do not assume one damage-event array layout for every game build. Source
mumbleConnected
address: string, reconnecting: boolean
NotificationLegacy voice connection notification. Avoid publishing private endpoint addresses. Enhanced deprecates Mumble. Source
mumbleDisconnected
address: string
NotificationLegacy voice disconnect notification; not proof that a reconnect has succeeded. Source
onClientResourceStart
resourceName: string
NotificationQueued after startup. Filter to your resource when initializing owned UI or state. Source
onClientResourceStop
resourceName: string
NotificationClient-side stop notification. Release owned focus and handles without depending on another asynchronous tick. Source
onResourceStart
resourceName: string
NotificationRuns during resource startup; do not confuse with the queued client-specific notification. Source
onResourceStarting
resourceName: string
Yes: prevent startupMust be handled by an already-running resource. Cancel synchronously, not after a timer or await. Source
onResourceStop
resourceName: string
NotificationRuns while stopping. Keep cleanup immediate, idempotent and limited to what this resource owns. Source
populationPedCreating
x: number, y: number, z: number, model: hash, setters: object
Yes: skip creationsetters.setModel(name/hash) and setters.setPosition(x,y,z) override the pending population ped; not an event for every scripted ped. Source

CEventName is documentation shorthand, not a wildcard subscription. For example, a listener named CEventShockingCarCrash receives that specific event. The low-level event list names events; it does not establish a stable interpretation of every numeric array slot. See payload diagnosis before decoding them.

Observe damage to the local ped

Create a resource with fx_version 'cerulean', game 'gta5' and client_script 'client.lua'. Put this in client.lua. It produces at most one console message per second, only when the local ped is the victim:

local lastNotice = -1000 AddEventHandler('entityDamaged', function(victim, culprit, weapon, baseDamage) if victim ~= PlayerPedId() then return end local now = GetGameTimer() if now - lastNotice < 1000 then return end lastNotice = now print(('[Damage observation] weapon=%s base=%s culprit-present=%s'):format( tostring(weapon), tostring(baseDamage), tostring(culprit ~= 0))) end)

Test environmental and ped-caused damage separately. A missing culprit is valid context, not an error to “fix” by substituting the local player. This listener does not confirm final health loss, a kill, an attacker account or an award. Do not send its reported damage to the server as trusted state.

Temporarily suppress nearby population for a lab test

This client.lua example is off by default. /fd_population_test toggles a 20-metre exclusion around the position where the command was enabled. It affects future ambient population creation, not existing peds or every script-created ped.

local testCentre = nil RegisterCommand('fd_population_test', function() if testCentre then testCentre = nil print('[Population lab] Disabled.') else testCentre = GetEntityCoords(PlayerPedId()) print('[Population lab] Enabled around this position; repeat to disable.') end end, false) AddEventHandler('populationPedCreating', function(x, y, z, model, setters) if testCentre and #(vector3(x, y, z) - testCentre) < 20.0 then CancelEvent() -- Synchronous veto; no Wait, timer, or async fetch here. end end)

Run this only in an isolated development session. Repeating the command or stopping the resource removes the policy. To replace a model instead, request and validate the replacement in advance, then call setters.setModel while handling the event. Do not yield inside the hook while waiting for it to load.

Resource and voice lifecycle

Keep resource initialization paired with immediate cleanup. The resource-lifecycle guide covers dependency starts, exports and stop handling; the runtime lab demonstrates cancelling pending work and releasing owned NUI focus.

Treat Mumble events as Legacy voice integration, not a universal Enhanced voice API. Hide or clear a local voice-status indicator on disconnect, restore it only on a successful connection notification, and do not publish the endpoint address in telemetry. Check the Legacy/Enhanced migration checklist before choosing a voice implementation.

Sources and verification

Official client-event catalog , populationPedCreating contract , event cancellation , and Enhanced changes  were reviewed on 22 September 2026. The examples are original teaching scenarios; browser tests validate the documentation, not the engine’s event dispatch.