EZ Scripts
DiscordTebex
  • 💡Welcome To EZ Scripts
  • FIVEM
    • 🍀EZ White Widow
      • Config File
      • Add more locations
      • Common Issues
    • 🟣EZ Lean Drug
      • Config File
      • Add more locations
    • ❄️EZ Coke & Crack Drug
      • Config File
      • Add more locations
    • 🔠EZ Plate Changer
      • Config File
    • 📑Ez Lib
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
  • RedM
    • 💼EZ Society & Job Meny
      • Config File
      • Exports
      • Syn Society
    • 🌍EZ Fast Travel
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🍖Ez Consumables
      • Config File
    • 📺Ez HUD
      • Config File
      • Exports and Events
    • 🚷EZ Combat Logging
      • Config File
    • 🗽EZ Life Style
      • Getting Life Style
      • Config File
    • ☢️EZ Radial Menu
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
Powered by GitBook
On this page
  • VORP
  • QBCORE

Was this helpful?

  1. RedM
  2. Ez Item Spawner

Permission Check

A function which checks if player is allowed to open the adminitem menu, i.e. checks if player is admin. How you can adapt the function for other framework example.

VORP

SConfig.PermissionCheck = function(source)
    local user = Core.getUser(source)
    if not user then return false end
    if user.getGroup == "admin" then
        return true
    end
    return false
end

QBCORE

SConfig.PermissionCheck = function(source)
    return QBCore.Functions.HasPermission(source, 'admin')
end
PreviousConfig FileNextAdd Item

Last updated 4 months ago

Was this helpful?

🫳