how to count the ammount player of team
#2

Yes, that should work, except you have the Count1 and Count2 mixed up in your statements.
pawn Код:
if((Count2 > Count1) && GetPlayerTeam(playerid) == TEAM_TERRORIST)
{
// code
}
else if((Count2 < Count1) && GetPlayerTeam(playerid) == TEAM_KOPASSUS)
{
//code
}
And if you want to decrease the value when the player disconnects, you need to create the Count1 and Count2 variables globally.
pawn Код:
//Above main( )
new Count1, Count2;

//Under OnPlayerDisconnect
if( GetPlayerTeam( playerid ) == TEAM_KOPASSUS ) Count1--;
else if( GetPlayerTeam( playerid ) == TEAM_TERRORIST ) Count2--;
You will also need to remove the existing Count1 and Count2 variable syou have under OnPlayerRequestSpawn.
Reply


Messages In This Thread
how to count the ammount player of team - by handerson - 05.07.2011, 03:10
Re: how to count the ammount player of team - by Bakr - 05.07.2011, 03:14
Re: how to count the ammount player of team - by Snipa - 05.07.2011, 03:15
Re: how to count the ammount player of team - by handerson - 05.07.2011, 03:27
Re: how to count the ammount player of team - by Bakr - 05.07.2011, 03:30
Re: how to count the ammount player of team - by handerson - 05.07.2011, 03:35
Re: how to count the ammount player of team - by Bakr - 05.07.2011, 03:39
Re: how to count the ammount player of team - by handerson - 05.07.2011, 04:21

Forum Jump:


Users browsing this thread: 2 Guest(s)