View Single Post
Author Message
Chrissucks
New Member
Join Date: Mar 2020
Old 03-23-2020 , 23:55   Chris's simple anti-afk plugin
Reply With Quote #1

Hey, after looking at the anti-afk plugins and noticing that most have tons of extra bloat and unneed code when most of their functionality is already built into the game. I have developed this anti-afk plugin.

Code:
Update 3/24/2020 1.0.1
- Changed event to player_footstep to allow for more gametypes

Update 3/23/2020 1.0.0
- Initial release
It works pretty simply, when a player runs the server calls the event "player_foostep"
we store this value in the bool "stepped" then when the buytime ends. Any players who hasn't caused a footstep at least once will be moved to spectator. this plugin does not kick players as there already exists settings to kick spectators after a specific amount of time.

there are no CVars required for this plugin as it only uses in-game functions.

I have included the source code for this plugin if you wish to modify it in anyway.

Enjoy!
Attached Files
File Type: sp Get Plugin or Get Source (chrisafkmanager.sp - 221 views - 1.7 KB)

Last edited by Chrissucks; 03-24-2020 at 14:37.
Chrissucks is offline