TeamGames icon indicating copy to clipboard operation
TeamGames copied to clipboard

Client 17 is not in game -- IsPlayerAlive -- Command_BindAction

Open SHAREN opened this issue 8 years ago • 1 comments

[SM] Exception reported: Client 17 is not in game
[SM] Blaming: TeamGames/TeamGames.smx
[SM] Call stack trace:
[SM]   [0] IsPlayerAlive
[SM]   [1] Line 5, Commands.sp::Command_BindAction

SHAREN avatar Nov 02 '16 10:11 SHAREN

from smlib

stock bool:Client_IsValid(client, bool:checkConnected=true)
{
    if (client > 4096) 
        client = EntRefToEntIndex(client);
    if (client < 1 || client > MaxClients) 
        return false;
    if (checkConnected && !IsClientConnected(client)) 
        return false;
    return true;
}

from Commands.sp::Command_BindAction

    if (!Client_IsValid(iClient, true) || !IsPlayerAlive(iClient) || GetClientTeam(iClient) != CS_TEAM_CT) {
        return Plugin_Continue;
    }

I think need || !IsClientInGame(iClient)

SHAREN avatar Nov 03 '16 19:11 SHAREN