Skip to content

DamageCause

What hurt a player, for PlayerSurvivalPolicy.protectedFrom. A hit can have one cause for who did it and one for how; it is protected when either is in the list. DAMAGE_CAUSES lists them all.

type DamageCause = "players" | "npcs" | "falls" | "explosions" | "fire" | "drowning" | "vehicles" | "other";
Value Description
"players" Another player: their weapon, their fists, the car they drive. Not the player’s own grenade or car.
"npcs" A ped that is not a player, such as a cop or a gang member, or a car one drives.
"falls" Landing from a height.
"explosions" Grenades, rockets, satchel charges, car and other explosions, and a car blowing up with the player inside.
"fire" Molotovs, flamethrowers and burning.
"drowning" Running out of air under water.
"vehicles" Being rammed or run over.
"other" A hit where the game knows neither who nor how.