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
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.