View Single Post
kot4404
Senior Member
Join Date: Mar 2013
Old 01-17-2018 , 15:07   Re: New API and Syntax
Reply With Quote #901

Quote:
Originally Posted by Crasher_3637 View Post
I use this check to exclude idle players from seeing vote menus:

PHP Code:
bool bIsPlayerIdle(int client)
{
    if (
GetClientTeam(client) != 1)
    {
        return 
false;
    }

    for (
int iPlayer 1iPlayer <= MaxClientsiPlayer++)
    {
        if (
bIsSurvivor(iPlayer) && IsFakeClient(iPlayer))
        {
            if (
GetClientOfUserId(GetEntProp(iPlayerProp_Send"m_humanSpectatorUserID")) == client)
            return 
true;
        }
    }

    return 
false;

Seems to work for me.
Do you think it is possible to use this method in https://forums.alliedmods.net/showthread.php?p=2521418 plugin?

Quote:
Originally Posted by kot4404 View Post
This thing actually fully works with L4D2, the admins aren't visible in status commands

Edit*
Or not that fully 100% because being idle renames you to unconnected but the other things work
Not sure if i'm adding it wrong or the game just doesn't allow that but my nickname is completly removed from the game setting my nick to unconnected when i'm idle or just stays completly visible
kot4404 is offline