Posts: 114
Threads: 37
Joined: May 2010
Reputation:
0
I am making a tdm server. But how do i detect if the teams score both is = 0 ?
Posts: 6,129
Threads: 36
Joined: Jan 2009
Teams don't have an individual score, players have individual scores which are stored. You can add them together to calculate a team score if you really wish though.
pawn Код:
// With PVars.
new TeamCounts[ 5 ]; // You have 5 teams, for example.
foreach(Player, i)
{
if( GetPlayerScore( i ) >= 1 && GetPVarInt( i, "Team" ) >= 1 )
{
TeamCounts[ GetPVarInt( i, "Team" ) ] ++;
}
}
Posts: 114
Threads: 37
Joined: May 2010
Reputation:
0
Ehh, i have 2 teams. when i detect for a team winning i use this: if...teamkills[0] > teammkils[1] etc.