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

PreviousConfig FileNextAdd Item

Last updated 1 month ago

Was this helpful?

CtrlK
  • VORP
  • QBCORE
  • Standalone

Was this helpful?

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

Standalone

This will work for all frameworks no matter if FiveM or RedM.

SConfig.PermissionCheck = function(source)
    return IsPlayerAceAllowed(source, 'command')
end

This will give anyone with command ace, such as group.admin permission.

You can give someone group.admin by putting the following at the bottom of your server.cfg:

add_principal identifier.license:958141767e2fdc8ac7824e4dc2e group.admin