Bypass & Pause Exports

Some scripts do things on purpose that look like cheating to an anticheat: a teleport, a character creator that hides the player, a cutscene or a nitro boost. These exports let your script tell CXA Anticheat about it, for one player and for a short time. They are also the way to switch off a single detection for a single player, because CXA has no per-detection bypass permission.

Never Pause From an Unchecked Client Event

A cheater can trigger any event your client scripts can trigger. If a client event like my-script:server:startCutscene pauses detections without checks, cheaters will call it themselves. Only pause from server code that already knows the action is real, for example because the server started the cutscene itself.

When to Use It

  • An admin teleport script, a jail script or a race start moves players across the map.
  • A character creator hides the player or makes them invincible.
  • A cutscene or intro camera plays for a few seconds.
  • A fake plate script changes the plate while the player sits in the car.
  • A script warps players out of a vehicle instantly.
  • A staff member goes on or off duty and their group changes during the session.

How It Works

  • A pause belongs to one player and one key, and has an end time. The key is a detection key such as Noclip, a group key such as Movement, or all.
  • While a key is paused, the server skips punishments for it and the player's client stops running that check.
  • Pauses end by themselves. Calling the export again for the same key sets a new end time, so you can extend or shorten a pause.
  • Pauses are kept in memory. They end when the player leaves, and also when CXA restarts, for example a few seconds after you save a new config in the panel.
  • A pause skips the punishment, not every protection. Blacklisted entity spawns and entities above the spam limit are still blocked. Explosions are the exception: while Explosion or all is paused, the player's explosions are neither blocked nor logged.
  • A bypass is different from a pause. Bypass comes from the Staff Bypass rules and lasts as long as the player matches them. A pause is temporary and only comes from scripts.
  • The In-Game Panel (/cxa) uses the same pauses: Goto and Bring pause Movement for 15 seconds, Freeze pauses it for 5 seconds, and Spectate pauses every check of the spectating staff member.

Exports

IsPlayerBypassed

Tells you whether a player skips every check.

exports['cxa-anticheat']:IsPlayerBypassed(src)

Parameters:

  • src (number): The player's server ID

Returns: true when the player matches any bypass rule, otherwise false.

What happens:

  • CXA checks the rules from Staff Bypass: logged-in txAdmin admins (when that option is on), the ACE permission cxa.bypass, the listed identifiers and the framework groups.
  • The result is cached per player for 60 seconds by default (Cache time in the bypass settings). Use RefreshBypass to recalculate it at once.
  • Pauses do not count. During SetTemporaryBypass this export still returns false.

RefreshBypass

Recalculates a player's bypass right away.

exports['cxa-anticheat']:RefreshBypass(src)

Parameters:

  • src (number): The player's server ID

Returns: Nothing.

What happens:

  • The cached result is thrown away and calculated again.
  • The new state is sent to the player's client, so client checks stop or start at once.
  • Nothing happens while CXA has not started, or while the player's client has not finished loading the anticheat. In that case CXA calculates a fresh result when the client is ready.
  • CXA already refreshes by itself when txAdmin reports an admin login, when an ESX player loads (esx:playerLoaded) and when a QBCore player loads (QBCore:Server:PlayerLoaded). Call this export when your own script changes a group, a job permission or an ACE principal during the session.

SetTemporaryBypass

Pauses every detection for one player.

exports['cxa-anticheat']:SetTemporaryBypass(src, seconds)

Parameters:

  • src (number): The player's server ID
  • seconds (number): How long the pause lasts. 0, a negative value or no value does nothing

Returns: Nothing.

What happens:

  • It is the same as PauseDetection(src, 'all', seconds).
  • IsPlayerBypassed keeps returning false, because this is a pause, not a bypass.
  • The player's explosions are not blocked while it runs. Keep it as short as you can.

PauseDetection

Pauses one detection, or a group of detections, for one player.

exports['cxa-anticheat']:PauseDetection(src, key, seconds)

Parameters:

  • src (number): The player's server ID
  • key (string): A detection key such as Noclip, or Movement, Timing or all. Keys are case-sensitive. An empty key pauses all
  • seconds (number): How long the pause lasts. 0, a negative value or no value does nothing

Returns: Nothing.

What happens:

  • The server skips punishments for this key, and the player's client stops running the matching check.
  • An unknown key is accepted without an error and simply does nothing. Copy keys from All Detections or the table below.

AllowTeleport

Pauses the movement checks so a scripted teleport is not flagged.

exports['cxa-anticheat']:AllowTeleport(src, seconds)

Parameters:

  • src (number): The player's server ID
  • seconds (number, optional): How long the pause lasts. Default: 5

Returns: Nothing.

What happens:

  • It is the same as PauseDetection(src, 'Movement', seconds).
  • It pauses the server teleport and speed check and the client teleport-to-waypoint check.
  • The server movement check is off by default. Call AllowTeleport anyway: your script then keeps working when a server owner turns that check on.

Keys You Can Pause

KeyWhat it pausesTypical use
allEvery detection of the playerCutscenes, character creators, scripted events
MovementThe server teleport and speed check and the client teleport-to-waypoint checkTeleports, the same pause as AllowTeleport
TimingThe client's measuring of reload, run and strafe speed, used by the fast reload, fast run and strafe boost checksEffects that make a player run or reload faster on purpose
NoclipThe noclip checkJetpacks, drones or scripts that let a player hover
InvisibleThe invisibility checkCharacter creators or hidden staff cameras
GodModeThe god mode check (off by default)Safe zones or character select screens that make players invincible
HealthArmorHealth or armor above the allowed maximumScripts that give extra health for an event
SpeedHackOn-foot speedDrug or power-up effects that make players run faster
SuperJumpJump heightMinigames with jump boosts
SpectateThe spectate mode checkYour own spectate or replay script
FreecamThe freecam check (off by default)Scripted cameras that move far away from the player
VehicleModifierEngine power boosts and impossible vehicle speedsNitro or tuning scripts
PlateChangePlate text changing while the player is seatedFake plate scripts
FastVehicleExitInstant vehicle exitsScripts that warp players out of vehicles
VehicleGodModeA driven vehicle that takes no damageMission vehicles your script makes bulletproof
ExplosionEvery explosion check of the player. Explosions are not blocked during the pauseOnly scripted explosions you fully trust
ExternalYour own FlagPlayer callsSwitching off your own checks for one player

Every other detection key works the same way. All Detections lists them all.

Examples

Admin Teleport

-- Usage in chat: /tpcoords 215.0 -810.0 30.7 (needs the ACE permission command.tpcoords)
RegisterCommand('tpcoords', function(src, args)
    local x, y, z = tonumber(args[1]), tonumber(args[2]), tonumber(args[3])
    if src == 0 or not x or not y or not z then
        return
    end
    -- Pause the movement checks first, then move the player
    exports['cxa-anticheat']:AllowTeleport(src, 5)
    SetEntityCoords(GetPlayerPed(src), x, y, z, false, false, false, false)
end, true)

Character Creator

Your multicharacter resource opens the creator from server code, so the server knows the player really is in it.

-- Called by your multicharacter script on the server when it opens the creator
local function openCreator(src)
    -- The creator hides the player and makes them invincible
    exports['cxa-anticheat']:PauseDetection(src, 'Invisible', 300)
    exports['cxa-anticheat']:PauseDetection(src, 'GodMode', 300)
    TriggerClientEvent('my-multichar:client:openCreator', src)
end

-- Called when the player has finished the creator
local function closeCreator(src)
    -- A new 1 second pause replaces the 300 seconds, so the checks return almost at once
    exports['cxa-anticheat']:PauseDetection(src, 'Invisible', 1)
    exports['cxa-anticheat']:PauseDetection(src, 'GodMode', 1)
end

Race Start

local function startRace(racers, grid)
    for i, src in ipairs(racers) do
        -- The grid teleport would look like a teleport hack
        exports['cxa-anticheat']:AllowTeleport(src, 10)
        -- The race gives nitro, which raises engine power, for up to 10 minutes
        exports['cxa-anticheat']:PauseDetection(src, 'VehicleModifier', 600)
        TriggerClientEvent('my-race:client:toGrid', src, grid[i])
    end
end

Cutscene

-- Your server starts a 45 second intro cutscene for a new player
local function playIntro(src)
    -- A few seconds longer than the cutscene itself
    exports['cxa-anticheat']:SetTemporaryBypass(src, 50)
    TriggerClientEvent('my-intro:client:play', src)
end

Refresh After a Duty Change

Your duty script gives on-duty staff the group.admin principal, and server.cfg contains add_ace group.admin cxa.bypass allow.

local function setDuty(src, onDuty)
    local action = onDuty and 'add_principal' or 'remove_principal'
    ExecuteCommand(('%s player.%d group.admin'):format(action, src))
    -- Bypass results are cached, so recalculate them now
    exports['cxa-anticheat']:RefreshBypass(src)
    print(('Bypassed now: %s'):format(tostring(exports['cxa-anticheat']:IsPlayerBypassed(src))))
end

Typed Signatures

type CxaPauseKey = 'all' | 'Movement' | 'Timing' | (string & {}); // Any detection key, case-sensitive

interface CxaBypassExports {
  IsPlayerBypassed(src: number): boolean;
  RefreshBypass(src: number): void;
  SetTemporaryBypass(src: number, seconds: number): void;
  PauseDetection(src: number, key: CxaPauseKey, seconds: number): void;
  AllowTeleport(src: number, seconds?: number): void; // Default 5 seconds
}

const cxa = exports['cxa-anticheat'] as CxaBypassExports;

Recommendations

Good to Know

  • Pause before the action, not after it. The pause needs a moment to reach the player's client.
  • Pause the narrowest key for the shortest time that works. Prefer PauseDetection with one key over SetTemporaryBypass.
  • To end a pause early, call the same export again with 1 second. A value of 0 does nothing.
  • Long pauses do not survive a CXA restart. If your event runs for a long time, pause again at each stage, for example at every race checkpoint.
  • Call RefreshBypass after every group or permission change your scripts make, so staff are not flagged during the 60 second cache.

Staff Bypass

  • The bypass rules that IsPlayerBypassed reads are set up in Staff Bypass.
  • Bypassed players skip every check permanently. Use pauses when only a script action needs an exception.

In-Game Panel (/cxa)

Detections & Punishments

  • If one of your scripts keeps triggering a detection for everyone, tune that detection instead of pausing it for every player. See Detections & Punishments.

Common Problems

Players Are Still Flagged After a Teleport

What you see: You call AllowTeleport, but the teleport is still logged.

How to fix it:

  • Call AllowTeleport before the teleport, not after it.
  • Give it enough time. If your teleport waits for a fade or a loading screen, use 10 seconds or more.
  • Check the detection key in the log. If it is not Movement or WaypointTeleport, pause that key with PauseDetection as well.

PauseDetection Does Nothing

What you see: You pause a detection, but it still fires for the player.

How to fix it:

  • Keys are case-sensitive. Copy them from All Detections.
  • Check the order of the arguments: player, key, seconds.
  • Seconds must be greater than 0.
-- ❌ Wrong case: this key does not exist, nothing is paused
exports['cxa-anticheat']:PauseDetection(src, 'noclip', 10)

-- ❌ Wrong order: seconds and key are swapped
exports['cxa-anticheat']:PauseDetection(src, 10, 'Noclip')

-- ✅ Player, exact key, seconds
exports['cxa-anticheat']:PauseDetection(src, 'Noclip', 10)

Staff Are Flagged Right After a Group Change

What you see: A staff member gets a new group, but CXA keeps checking them for up to a minute.

How to fix it:

  • Call RefreshBypass(src) right after your script changes the group.
  • Check that the new group is in the bypass framework groups, or that it has the cxa.bypass ACE permission.

IsPlayerBypassed Returns false During a Temporary Bypass

What you see: You called SetTemporaryBypass, but IsPlayerBypassed says false.

How to fix it:

  • This is expected. SetTemporaryBypass is a pause, and IsPlayerBypassed only reports the permanent bypass rules. Track your own pauses in your script if you need to know about them.

© 2026 CodeXart Studios · CXA Anticheat