âŠī¸Events
Client
ds:onDowned
Example
RegisterNetEvent('ds:onDowned', function(deathData)
local headshot = deathData.headshot
local dist = deathData.dist
local attackerName = deathData.attackerName
print('You have been downed by '..attackerName..' from '..dist..'m away with '..(headshot and 'a headshot' or 'a body shot'))
end)
ds:onDeath
Example
RegisterNetEvent('ds:onDeath', function(deathData)
local headshot = deathData.headshot
local dist = deathData.dist
local attackerName = deathData.attackerName
print('You have been killed by '..attackerName..' from '..dist..'m away with '..(headshot and 'a headshot' or 'a body shot'))
end)
ds:onSpawned
Example
RegisterNetEvent('ds:onSpawned', function(bedKey)
if bedKey then
print('You respawned on bed: '..bedKey)
else
print('You respawned at a random or default location')
end
end)
Server
ds:onDeath
Example
AddEventHandler('ds:onDeath', function(deathData)
local headshot = deathData.headshot
local dist = deathData.dist
local attackerName = deathData.attackerName
print('You have been killed by '..attackerName..' from '..dist..'m away with '..(headshot and 'a headshot' or 'a body shot'))
end)
Last updated