Advertisement
Guest User

server.lua

a guest
Sep 20th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local ESX = nil
  2.  
  3. TriggerEvent('esx:getSharedObject', function(obj)
  4. ESX = obj
  5. end)
  6.  
  7. ESX.RegisterServerCallback("esx_marker:fetchUserRank", function(source, cb)
  8. local player = ESX.GetPlayerFromId(source)
  9.  
  10. if player ~= nil then
  11. local playerGroup = player.getGroup()
  12.  
  13. if playerGroup ~= nil then
  14. cb(playerGroup)
  15. else
  16. cb("user")
  17. end
  18. else
  19. cb("user")
  20. end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement