Anti AFK Captcha
Store · JRaxionPrices and availability may change. Confirm the terms in the original store.
About this resource
Package Description FiveM anti-AFK that asks idle players to type a code Every full server has them: the player parked behind a wall at 3am holding a slot someone in the queue wants. bp_antiafk finds them by watching position on the server, then asks for a typed code. Someone at the keyboard can answer in seconds. Wiggling the mouse without moving the character does not count as activity. What an idle player sees A warning. After 14 minutes near the same spot, a notification says "You look AFK. Move in the next 60 seconds or you will get a captcha." Moving more than 2 metres clears it. The captcha. At 15 minutes a beep plays and an ox_lib box titled "Are you still there?" opens. It shows a 5 character code, the attempt number and the time allowed, 30 seconds per code. Escape does not close it. A second chance. A wrong or late answer brings a fresh code and a message with the attempts left. The result. A correct code closes the box and starts the 15 minutes again. Three fails in one check kick the player with "You were kicked for being AFK." Codes leave out characters that look alike (0 and O, 1, I and L) and upper or lower case makes no difference by default, so honest players don't fail on a font. What the server decides The server checks positions every 5 seconds, keeps the idle time, makes the code and judges the answer. The client draws the input box and sends back what was typed. An answer for an old challenge, or a second answer to the same one, is ignored. The check is about movement: someone who keeps moving more than 2 metres, by hand or by macro, counts as active. Settings you will adjust All of these are in config.lua: AfkTime (900 seconds), WarnBefore (60, or 0 for no warning) and Distance (2.0 metres) decide when a player counts as idle. AnswerTime (30), Attempts (3), CodeLength (5) and CaseSensitive (off) set how hard the captcha is. BypassAce exempts anyone with the bp_antiafk.bypass ACE. StaffBypass also exempts anyone who holds the command ACE. OnlyLoggedIn skips players without a loaded character on Qbox, QBCore and ESX. Sound turns the beep on or off, and Locale holds every message players see, ready to translate. Staff with the command.bp_afkcheck ACE can run /bp_afkcheck to send a captcha at once. It also works from the server console and on exempt players, so use a test player you don't mind kicking. Frameworks and requirements Needs ox_lib and OneSync. No framework is required. The login check detects qbx_core, qb-core and es_extended by itself. On any other setup, every connected player who is not exempt is checked until you edit IsLoggedIn. Three files are open: config.lua, server/open.lua (who is exempt, who counts as logged in, what happens on a fail) and client/open.lua (the notification). Full setup is in the bp_antiafk docs , and help is on our Discord .