Developers
Safe zones (client)
Make players invincible or invisible in greenzones without triggering godmode detections.
Safe zones (hospitals, spawn areas, police stations) often make players invincible or semi-transparent. Those are client-side effects, so Apex offers a client export for them.
lua
-- client-side, while the player is inside the zone
CreateThread(function()
while true do
if insideSafeZone() then
exports['ApexAC']:apexExempt('antiGodmode', 5000)
exports['ApexAC']:apexExempt('antiInvisible', 5000)
end
Wait(3000)
end
end)
Refresh the exemption every few seconds while the player is in the zone (as above). It expires by itself when they leave.
Signature#
lua
exports['ApexAC']:apexExempt(detectionName, durationMs) -- client
TriggerEvent('apex:det:exempt', detectionName, durationMs) -- client, same thing
Supported detections#
Use it for the typical safe-zone effects:
| Detection | Use for |
|---|---|
antiGodmode |
Invincibility in the zone |
antiInvisible |
Transparent / ghosted players |
antiNoRagdoll |
Players that can't be knocked over |
Armour, health, teleports
Those are not client-exemptable on purpose (a cheater controls their own client). Use the server export allow instead.
Apex