View Single Post
olj
Veteran Member
Join Date: Jun 2009
Old 08-19-2009 , 19:30   Re: [L4D] Remember Spectators
Reply With Quote #3

This should work in other mods, but team numbers would be totally different, so you will have to adjust this.

Add this function somewhere in code, then use IsValidClient check before GetClientTeam on 38 line
EDIT: we dont want to do IsPlayerAlive check, so comment this out.
PHP Code:
public IsValidClient (client)
  
{
    if (
client == 0)
        return 
false;
    
    if (!
IsClientConnected(client))
        return 
false;
    
    if (
IsFakeClient(client))
        return 
false;
    
    if (!
IsClientInGame(client))
        return 
false;
   
// if (!IsPlayerAlive(client))
    //    return false;
    
return true;

__________________
olj is offline