View Single Post
lucasdidur
Senior Member
Join Date: Jan 2011
Location: Brazil
Old 08-19-2012 , 10:16   Re: [TF2] MvM Auto-lock Server (v1.1)
Reply With Quote #16

Little fix for Connect

PHP Code:
public OnMapStart()
{
    
IsMvM(true);
    
currentplayers GetRealClientCount();
}

public 
OnClientDisconnect(client)
{
    if (!
IsMvM()) return;
    if (!
IsFakeClient(client))
    {
        
currentplayers--;
    }
}

stock GetRealClientCountbool:inGameOnly false 
{
    new 
clients 0;
    
    for( new 
1<= GetMaxClients(); i++ ) 
    {
        if( ( ( 
inGameOnly ) ? IsClientInGame) : IsClientConnected) ) && !IsFakeClient) ) 
        {
            
clients++;
        }
    }
    return 
clients;

__________________



lucasdidur is offline