Skip to content

dronelektron/sm-afk-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFK detector

Allows you to detect inactive players. The active player must perform the following actions:

  • Press buttons
  • Look around
  • Write messages to chat
  • Use voice commands
  • Change team
  • Change class

Supported Games

  • Day of Defeat: Source

Installation

  • Download latest release (compiled for SourceMod 1.11)
  • Extract "plugins" folder to "addons/sourcemod" folder of your server

Console Variables

  • sm_afkdetector_inactivity_delay - Delay (in seconds) before calling AfkDetector_OnClientInactive forward [default: "5.0", min: "1.0"]

API

Called when the client is no longer AFK

forward void AfkDetector_OnClientActive(int client);

Called when the client is AFK

forward void AfkDetector_OnClientInactive(int client);

Checks if the client is active

native bool AfkDetector_IsClientActive(int client);