Framework not recognized

To integrate ZeroTrust with an unrecognized framework, you'll need to create your own Cfg.GetGroupsFromSource function inside config.lua :

Lets say the anticheat didn't find your ESX, the function Cfg.GetGroupsFromSource can override the actual check inside the anticheat if it returns something else than nil .

Cfg = {}

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

Cfg.GetGroupsFromSource = 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"]:GetPlayerGroups(source)
end

This function ensures that ZeroTrust correctly retrieves the player's admin group.

Last updated