Event Name
baseevents:onPlayerKilledParameters
- player killerID: The Client ID of the player who killed the player or -1 if the player was run over by a vehicle
- object deathData: An object containing:
- int killerType: The pedType of the ped who killed the player
- hash weaponHash: The hash of the weapon which was used to kill the player
- bool killerInVeh: Whether the killer was in a vehicle
- int killerVehSeat: The seat number the killer is sitting in
- string killerVehName: The display name of the vehicle the killer is in
- array killerpos: The x, y, z coordinates of where the player died
Example
on('baseevents:onPlayerKilled', (killerID, deathData) => {
const [x, y, z] = deathData.killerpos
console.log('killed at:', { x, y, z })
})