This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Count Alive Players in a Team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
-Striker-
Member
Join Date: Jun 2010
Old 08-15-2010 , 09:20   Count Alive Players in a Team
Reply With Quote #1

Subject - Have anybody a idea?

------
My current way:

On Player die, diecount +1
if(playersinteam-diecount == 1)
{
--.-.-
}
-It works, but not when a player change the team.
-Striker- is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 08-15-2010 , 09:39   Re: Count Alive Players in a Team
Reply With Quote #2

PHP Code:
GetTeamAliveClientCount(team)
{
    if(
team GetTeamCount())
    {
        return 
0;
    }
    new 
counter;
    for(new 
index 1index <= MaxClientsindex++)
    {
        if(
GetClientTeam(index) == team && IsPlayerAlive(index)) counter++;
    }
    return 
counter;

__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode