Skip to content

10% off shop orders, applied at checkout

RPScripts

RK Anti-AFK CAPTCHA: Source and Timer Problems to Fix

By Luke

Anti-AFK CAPTCHA
On this page

The original Anti AFK CAPTCHA System was posted by yeptys in October 2024 with ox_lib as a requirement and no support offered. Its rk3gaming repository link now returns 404. The release discussion links a rewrite by Hajdenko; we reviewed the surviving Hajdenko repository at 4824c7d. That community revision should not be presented as an actively supported original release.

Original release and rewrite discussion

Hajdenko’s reviewed community revision

Configuration and detection behavior

The revision loads ox_lib, client/main.lua, server/edit_me.lua and config.lua. Defaults are afkTimeMinutes = 10, kickTime = 60 and captchaLength = 6. Detection uses a sphere with radius 10 around the player, rather than tracking all keyboard or gameplay activity. Moving within that area is not necessarily treated as activity.

Repair the retry and cleanup paths first

On a wrong answer, checkAFK starts another challenge without completing the previous challenge’s countdown. That older countdown can still request a kick after a later answer succeeds. Cancelling the input dialog also requests a kick immediately. Test wrong-then-correct and cancelled-input behavior before enabling this for players.

The zone-exit code calls destroy on an ox_lib zone, while the documented Lua removal method is remove. Timer cancellation and replacement also need review: the code assumes a destroy method on the SetTimeout result. Correct lifecycle handling before relying on movement to reset the challenge. Do not advertise this revision as ready to install unchanged.

Limits of the kick mechanism

The server handler kicks whichever player requests it and never checks inactivity or the CAPTCHA, so the client decides when the kick happens. Treat it as an inactivity prompt, not as tamper-resistant anti-cheat. The source has no license file; ask the creator before redistributing it. No gameplay test or repaired package is provided.

  • Basic HUD for QBCore: Setup Notes

    Basic HUD for QBCore: Setup Notes

    KM-HUD is a small QBCore resource that shows cash, bank, job and grade. Requirements, install order, the files to edit and the checks to run before going live.

  • Yoda Tasks Task UI System for FiveM

    Yoda Tasks Task UI System for FiveM

    Review Yoda Tasks for FiveM: progress display exports, one-task state, simple-task API mismatches and input checks needed before integration.