Advertisement
Guest User

Untitled

a guest
Mar 20th, 2023
837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | Gaming | 0 0
  1. Config = {}
  2.  
  3. Config.Framework = 'qb-core' -- esx, qb-core,
  4.  
  5. Config.Weapon = 'weapon_nightstick' -- add any weapon you want or make it nil
  6.  
  7. Config.IsAllowed = function()
  8. if Config.Framework == 'qb-core' then
  9. local QBCore = exports['qb-core']:GetCoreObject()
  10. return QBCore.Functions.GetPlayerData().job.name == "police"
  11. else
  12. ESX = exports.es_extended:getSharedObject()
  13. local pdata = ESX.GetPlayerData()
  14. return pdata.job.name == "police"
  15. end
  16. end
  17.  
  18. Config.Notify = function(text, type)
  19. if Config.Framework == 'qb-core' then
  20. local QBCore = exports['qb-core']:GetCoreObject()
  21. QBCore.Functions.Notify(text, type)
  22. else
  23. ESX = exports.es_extended:getSharedObject()
  24. ESX.ShowNotification(text)
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement