Skip to Content
ResourcesBaseeventsEventsonPlayerDied

This event reports a local player death that was not attributed to another network player. Treat its coordinates as event context and perform authoritative rewards, penalties, or persistence checks on the server.

Event Name

baseevents:onPlayerDied

Parameters

  • int killerType: The pedType of the ped that killed this player
  • array deathCoords: An array containing the x, y, z coordinates of where the player died

Example

on('baseevents:onPlayerDied', (killerType, deathCoords) => { const [x, y, z] = deathCoords console.log('died at:', { x, y, z }) })