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 asMovement, orall. - 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
Explosionorallis 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
Movementfor 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
RefreshBypassto recalculate it at once. - Pauses do not count. During
SetTemporaryBypassthis export still returnsfalse.
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). IsPlayerBypassedkeeps returningfalse, 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, orMovement,Timingorall. Keys are case-sensitive. An empty key pausesall - 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
AllowTeleportanyway: your script then keeps working when a server owner turns that check on.
Keys You Can Pause
| Key | What it pauses | Typical use |
|---|---|---|
all | Every detection of the player | Cutscenes, character creators, scripted events |
Movement | The server teleport and speed check and the client teleport-to-waypoint check | Teleports, the same pause as AllowTeleport |
Timing | The client's measuring of reload, run and strafe speed, used by the fast reload, fast run and strafe boost checks | Effects that make a player run or reload faster on purpose |
Noclip | The noclip check | Jetpacks, drones or scripts that let a player hover |
Invisible | The invisibility check | Character creators or hidden staff cameras |
GodMode | The god mode check (off by default) | Safe zones or character select screens that make players invincible |
HealthArmor | Health or armor above the allowed maximum | Scripts that give extra health for an event |
SpeedHack | On-foot speed | Drug or power-up effects that make players run faster |
SuperJump | Jump height | Minigames with jump boosts |
Spectate | The spectate mode check | Your own spectate or replay script |
Freecam | The freecam check (off by default) | Scripted cameras that move far away from the player |
VehicleModifier | Engine power boosts and impossible vehicle speeds | Nitro or tuning scripts |
PlateChange | Plate text changing while the player is seated | Fake plate scripts |
FastVehicleExit | Instant vehicle exits | Scripts that warp players out of vehicles |
VehicleGodMode | A driven vehicle that takes no damage | Mission vehicles your script makes bulletproof |
Explosion | Every explosion check of the player. Explosions are not blocked during the pause | Only scripted explosions you fully trust |
External | Your own FlagPlayer calls | Switching 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)// Usage in chat: /tpcoords 215.0 -810.0 30.7 (needs the ACE permission command.tpcoords)
RegisterCommand('tpcoords', (src: number, args: string[]) => {
const [x, y, z] = args.map(Number);
if (src === 0 || [x, y, z].some((v) => Number.isNaN(v))) return;
// Pause the movement checks first, then move the player
exports['cxa-anticheat'].AllowTeleport(src, 5);
SetEntityCoords(GetPlayerPed(src.toString()), x, y, z, false, false, false, false);
}, 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// Called by your multicharacter script on the server when it opens the creator
function openCreator(src: number): void {
// The creator hides the player and makes them invincible
exports['cxa-anticheat'].PauseDetection(src, 'Invisible', 300);
exports['cxa-anticheat'].PauseDetection(src, 'GodMode', 300);
emitNet('my-multichar:client:openCreator', src);
}
// Called when the player has finished the creator
function closeCreator(src: number): void {
// 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);
}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
endfunction startRace(racers: number[], grid: { x: number; y: number; z: number; h: number }[]): void {
racers.forEach((src, i) => {
// 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);
emitNet('my-race:client:toGrid', src, grid[i]);
});
}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// Your server starts a 45 second intro cutscene for a new player
function playIntro(src: number): void {
// A few seconds longer than the cutscene itself
exports['cxa-anticheat'].SetTemporaryBypass(src, 50);
emitNet('my-intro:client:play', src);
}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))))
endfunction setDuty(src: number, onDuty: boolean): void {
const action = onDuty ? 'add_principal' : 'remove_principal';
ExecuteCommand(`${action} player.${src} group.admin`);
// Bypass results are cached, so recalculate them now
exports['cxa-anticheat'].RefreshBypass(src);
console.log(`Bypassed now: ${exports['cxa-anticheat'].IsPlayerBypassed(src)}`);
}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;---@alias CxaPauseKey 'all'|'Movement'|'Timing'|string Any detection key, case-sensitive
---@class CxaBypassExports
---@field IsPlayerBypassed fun(self: CxaBypassExports, src: integer): boolean
---@field RefreshBypass fun(self: CxaBypassExports, src: integer)
---@field SetTemporaryBypass fun(self: CxaBypassExports, src: integer, seconds: number)
---@field PauseDetection fun(self: CxaBypassExports, src: integer, key: CxaPauseKey, seconds: number)
---@field AllowTeleport fun(self: CxaBypassExports, src: integer, seconds?: number) Default 5 seconds
---@type CxaBypassExports
local cxa = exports['cxa-anticheat']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
PauseDetectionwith one key overSetTemporaryBypass. - To end a pause early, call the same export again with
1second. A value of0does 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
RefreshBypassafter every group or permission change your scripts make, so staff are not flagged during the 60 second cache.
Related Features
Staff Bypass
- The bypass rules that
IsPlayerBypassedreads 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)
- Goto, Bring, Freeze and Spectate in the In-Game Panel (/cxa) pause detections in the same way.
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
AllowTeleportbefore 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
MovementorWaypointTeleport, pause that key withPauseDetectionas 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)// ❌ 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.bypassACE 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.
SetTemporaryBypassis a pause, andIsPlayerBypassedonly reports the permanent bypass rules. Track your own pauses in your script if you need to know about them.
© 2026 CodeXart Studios · CXA Anticheat