ZeroTrust
ZeroTrust
ZeroTrust
  • Welcome
  • Getting Started
    • Installing the Anti-Cheat
      • Installing for Standalone
      • Installing for ESX
      • Installing for QBCore
      • Installing for vRP
  • Commands
    • Ban players
    • Unban players
    • Re-ban unbanned players
    • Ban infos
    • Cross-servers bans
    • Delete players entities
    • Delete all entities
    • Blacklist IP
    • Ignoring bans
  • Safe Modes
    • Only Kick
    • Only Logs
  • Web Panel
    • Soon
Powered by GitBook
On this page
  1. Getting Started
  2. Installing the Anti-Cheat

Installing for Standalone

If you're using a standalone framework, you'll need to configure the Cfg.GetAdminGroup function to correctly retrieve the player's permission levels based on your own framework. Use the following configuration:

Cfg.WhitelistedGroups = { 
    -- Change with your framework's admin groups
    [2] = true,
    [3] = true,
    [4] = true,
    [5] = true
}

Cfg.GetAdminGroup = function(source) 
    if source == nil then return 0 end
    if source == 0 then return 5 end
    
    -- You should use exports to get the player permission
    return exports["core"]:GetPlayerPerm(source)
end

This setup ensures that the player's permission level is fetched correctly, allowing ZeroTrust to verify admin access. You should replace "core" and GetPlayerPerm(source) with your framework's appropriate export and permission check.

To avoid excessive calls to the export function and improve server performance, ZeroTrust caches the result of Cfg.GetAdminGroup after the first use per player. This ensures that each player's admin group is checked only once, minimizing unnecessary export calls and avoiding potential spam.

PreviousInstalling the Anti-CheatNextInstalling for ESX

Last updated 4 months ago