AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Basic AFK Manager (https://forums.alliedmods.net/showthread.php?t=74531)

Kigen 07-20-2008 20:12

Re: AFK Manager
 
My bad. Meh. :p Same basic result tho. Its based on the players position in the game.

DJ Tsunami 07-20-2008 21:10

Re: AFK Manager
 
Is it? Snipers/engineers can be standing still on the same spot for 5 minutes, and if they're not moving their eyes it means they're AFK, if they are, they're just turtling :P

Liam 07-20-2008 21:15

Re: AFK Manager
 
well, maybe I'll modify it. :P

Liam 07-22-2008 10:19

Re: AFK Manager
 
Plugin updated. See the OP for changes.

DontWannaName 07-22-2008 15:28

Re: AFK Manager
 
Way to support campers Liam! lol j/k...

edward.81 07-22-2008 15:40

Re: AFK Manager
 
Thx for this plugin.
1.1 hare working very well in my server. now i try this new version.
But i have made a little change in the code for logging plugin action.

Code:

HandleAFKClient(client)
{
    new Float:f_SpecTime = GetConVarFloat(g_Cvar_TimeToMove) / 10.0;
    new Float:f_KickTime = GetConVarFloat(g_Cvar_TimeToKick) / 10.0;

    if(GetConVarInt(g_Cvar_MoveSpec) == 1
        && g_TimeAFK[client] < f_KickTime
        && g_TimeAFK[client] > f_SpecTime)
    {
        new f_Team = GetClientTeam(client);

        if(f_Team > 1){
            ChangeClientTeam(client, 1); // 1 == spec on TF2 and CSS
            LogAction(client, -1, "%L moved to spectator. (%i Players)", client, GetClientCount());
            return;
        }
    }

    if(((GetConVarInt(g_Cvar_MoveSpec) == 0
        && g_TimeAFK[client] >= f_SpecTime)
        || g_TimeAFK[client] >= f_KickTime)
        && !IsAdmin(client))
    {
        LogAction(client, -1, "%L kick for AFK. (%i Players)", client, GetClientCount());
        KickClient(client, "You were AFK for too long.");
    }
}


Liam 07-22-2008 17:17

Re: AFK Manager
 
Okay? Thanks for telling me. :)

dann 07-23-2008 03:54

Re: Basic AFK Manager
 
if "sm_minplayers" isnt reached will it still move players to spectate?

edward.81 07-23-2008 06:46

Re: Basic AFK Manager
 
No, working fine until now. But we have to test the new feature added in 1.2

Quimbo 07-23-2008 08:07

Re: Basic AFK Manager
 
In the AFK manager plugin I wrote for my server I check players angles instead of position.

It works perfect even for bumps.


All times are GMT -4. The time now is 11:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.