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 QBCore

To integrate ZeroTrust with an QBCore-based server, you'll need to replace the function Cfg.GetAdminGroup inside config_s.lua with the following code to ensure proper compatibility:

Cfg.WhitelistedGroups = { -- Check your QBConfig.Server.Permissions to make sure its the same
     ["mod"] = true,
     ["admin"] = true,
     ["god"] = true,
}

QBCore = exports["qb-core"]:GetCoreObject()
Cfg.GetAdminGroup = function(source) 
    if source == nil then return 0 end
    if source == 0 then return "god" end

    return QBCore.Functions.GetPermission(source)
end

This function ensures that ZeroTrust correctly retrieves the player's admin group, allowing it to recognize different permission levels (e.g., "god") within your QBCore framework. You can check your config.lua inside the qb-core function and search QBConfig.Server.Permissions to see if its the same has Cfg.WhitelistedGroups.

Make sure you have QBCore installed and properly configured before making these changes.

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 calls and avoiding potential spam.

PreviousInstalling for ESXNextInstalling for vRP

Last updated 3 days ago