Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RegisterServerEvent('esx_ambulancejob:setDeathStatus')
- AddEventHandler('esx_ambulancejob:setDeathStatus', function(isDead)
- local identifier = GetPlayerIdentifiers(source)[1]
- if isDead == false then
- exports['saltychat']:SetPlayerAlive(source, true)
- else
- exports['saltychat']:SetPlayerAlive(source, false)
- end
- if type(isDead) ~= 'boolean' then
- print(('esx_ambulancejob: %s attempted to parse something else than a boolean to setDeathStatus!'):format(identifier))
- return
- end
- MySQL.Sync.execute('UPDATE users SET is_dead = @isDead WHERE identifier = @identifier', {
- ['@identifier'] = identifier,
- ['@isDead'] = isDead
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement