Advertisement
FurtzGamesssss

Untitled

Sep 9th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. RegisterServerEvent('esx_ambulancejob:setDeathStatus')
  2. AddEventHandler('esx_ambulancejob:setDeathStatus', function(isDead)
  3. local identifier = GetPlayerIdentifiers(source)[1]
  4. if isDead == false then
  5. exports['saltychat']:SetPlayerAlive(source, true)
  6. else
  7. exports['saltychat']:SetPlayerAlive(source, false)
  8. end
  9.  
  10. if type(isDead) ~= 'boolean' then
  11. print(('esx_ambulancejob: %s attempted to parse something else than a boolean to setDeathStatus!'):format(identifier))
  12. return
  13. end
  14.  
  15. MySQL.Sync.execute('UPDATE users SET is_dead = @isDead WHERE identifier = @identifier', {
  16. ['@identifier'] = identifier,
  17. ['@isDead'] = isDead
  18. })
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement