In practice, I encountered a unique event called gameEventTriggered, which is designed to capture various in-game actions. This event can, for instance, detect entity damage, track movement of entities within vehicles, and much more—all without needing a continuously ticking while loop withDocumentation Index
Fetch the complete documentation index at: https://fivem.volkman.cz/llms.txt
Use this file to discover all available pages before exploring further.
Citizen.Wait(0).
The event itself contains two parameters:
name: string- specifies the type of actiondata: table- holds data related to the event
Each event action and the data mentioned below are based on my own testing.
If you find anything different, feel free to reach out, and I’ll gladly take
a look at it to improve the documentation with you.
CEventNetworkEntityDamage
Triggered when an entity is damaged.
data[1]- damaged entity iddata[2]- attacker entity iddata[3]- could be hash of something, unknowndata[4]- always 0, unknowndata[5]- always 0, unknowndata[6]- did damage lead to deathdata[7]- weapon hashdata[8]- sometimes looks like hash but sometimes is 0, unknowndata[9]- sometimes looks like hash but sometimes is 0, unknowndata[10]- always 0, unknowndata[11]- somethis 1, somethimes 0, unknowndata[12]- is melee attackdata[13]- some flags, not sure what they mean
CEventNetworkPlayerEnteredVehicle
Triggered when a player enters a vehicle.
data[1]- network id of the playerdata[2]- vehicle entity id
