Skip to content

AFKManager.as

Drake Denston edited this page Oct 2, 2017 · 8 revisions

Information about AFKManager.as

First Created: April 28th, 2017
Last Updated: October 2nd, 2017. Current Status: Stable.
Works with the 5645 (v5.14) Build of Sven Co-Op. Thank you to all those who have assisted me with this plugin!

Installation Instructions

Copy 'AFKManager.as' to 'svencoop\scripts\plugins'. And add this to 'default_plugins.txt':

    "plugin"
    {
        "name" "AFKManager"
        "script" "AFKManager"
        "concommandns" "afkm"
    }

Add this to 'server.cfg'

// AFK Manager Global Configuration
as_command afkm.bShouldSpec 1
as_command afkm.secondsUntilSpec 180
as_command afkm.bShouldKick 1
as_command afkm.secondsUntilKick 600
as_command afkm.bKickAdmins 1
as_command afkm.secondsWarnInterval 30

Documentation

This plugin handles players who are inactive based on configuration settings. The default path is to punt them into Spectate Mode then Kick them off the server after the defined times.

Configs:

There are 6 Variables you can manipulate, you have to go to console and type as_command afkm.cvarhere value.
Add the below defaults to your "server.cfg" file if you haven't already.

You can use a .cfg file to give a map unique settings for the plugin.
Just navigate to the folder of the map, and find/create a file named mapname.cfg and input any of these

as_command afkm.bShouldSpec 1
as_command afkm.secondsUntilSpec 180
as_command afkm.bShouldKick 1
as_command afkm.secondsUntilKick 600
as_command afkm.bKickAdmins 1
as_command afkm.secondsWarnInterval 30

Adjust values above as needed. If a .cfg file is not found for the map, then it will assume the values you put in server.cfg

CVar Help:

bShouldSpec - (1 or 0) Should players get moved to spectate? 1 for yes, 0 for no.
secondsUntilSpec - How many seconds until an AFK player gets moved to spectate.
bShouldKick - (1 or 0) Should players get kicked? 1 for yes, 0 for no.
secondsUntilKick - How many seconds until an AFK player gets kicked.
bKickAdmins - (1 or 0) Should admins get kicked? 1 for yes, 0 for no.
secondsWarnInterval - How many seconds until player is warned about their AFK status, it loops.

To Do List

  • To be Decided...

Clone this wiki locally