↩ī¸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)
ds:getRevived
Example
AddEventHandler('ds:getRevived', function()
    print("I'm getting revived!")
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)
ds:onRevivePlayer
Example
RegisterNetEvent('ds:onRevivePlayer', function(reviverNetId, revivedNetId)
    print('PlayerID: '..reviverNetId..' revived PlayerID: '..revivedNetId)
end)

Last updated