Thread: [Solved] count mobs l4d
View Single Post
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 05-20-2019 , 13:49   Re: count mobs l4d
Reply With Quote #5

Quote:
Originally Posted by farawayf View Post
as far as i know "3" is a infected team, so i think yes it will.
No, it doesn't work, I tried the code does not work.

PHP Code:
if(IsPanicMobsAlive() >= 5)        
        {
            
PrintHintText(client"Да Подожди Ты %N Запускать Генератор, Мобов много: %s."clientIsPanicMobsAlive());
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;


int IsPanicMobsAlive() 

    
int count 0
    for (
int i 1<= MaxClientsi++) 
        if (
IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && IsFakeClient(i) && GetClientTeam(i) == 3count++; 
    return 
count

Alexmy is offline