17.12.2010, 10:57
you make 2 counter for each team... lets say : new TeamA,TeamB; each time player joins a team you add 1..
... also you add new PlayersA[MAX_PLAYER],PlayersB[MAX_PLAYER];
each player gets by his team 1 or 0 if he on this team 1 if not 0...
every time player dies you check...
... also you add new PlayersA[MAX_PLAYER],PlayersB[MAX_PLAYER];
each player gets by his team 1 or 0 if he on this team 1 if not 0...
every time player dies you check...
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(TeamB==0)
return // SendClientMessage or W/E , you want to change map in this case
else if(TeamA==0)
return // SendClientMessage or W/E , you want to change map in this case
if(PlayersA[playerid]==1)
TeamA--;
else TeamB--;
}