05.07.2011, 03:14
Yes, that should work, except you have the Count1 and Count2 mixed up in your statements.
And if you want to decrease the value when the player disconnects, you need to create the Count1 and Count2 variables globally.
You will also need to remove the existing Count1 and Count2 variable syou have under OnPlayerRequestSpawn.
pawn Код:
if((Count2 > Count1) && GetPlayerTeam(playerid) == TEAM_TERRORIST)
{
// code
}
else if((Count2 < Count1) && GetPlayerTeam(playerid) == TEAM_KOPASSUS)
{
//code
}
pawn Код:
//Above main( )
new Count1, Count2;
//Under OnPlayerDisconnect
if( GetPlayerTeam( playerid ) == TEAM_KOPASSUS ) Count1--;
else if( GetPlayerTeam( playerid ) == TEAM_TERRORIST ) Count2--;