14.07.2012, 07:38
Okay,I'm working on a counterstrike gamemode with MULTIPLE maps.
Now, what I'm doing is trying to create a UNIT limit for each team
Unit = Players.
Once a player of that team dies = 1 unit goes down for that team.
If the units of a team reach 0, the other team wins by default.
Now I'm really confused, I have no idea how I can give the score to the other team with my code:
I'd appreciate a 20-30 minutes lesson on this and some doubt clearing OR simply if someone could tell me how to do it.
Now, what I'm doing is trying to create a UNIT limit for each team
Unit = Players.
Once a player of that team dies = 1 unit goes down for that team.
If the units of a team reach 0, the other team wins by default.
Now I'm really confused, I have no idea how I can give the score to the other team with my code:
pawn Код:
enum TeamInfo
{
Units,
Zones,
Bonus,
};
#define MAX_TEAMS 2
new tInfo[MAX_TEAMS][TeamInfo];
public OnPlayerDeath(playerid, killerid, reason)
{
SaveStats(playerid);
new team = GetPlayerTeam(playerid);
tInfo[team][Units]--;
if(tInfo[team][Units] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
{
SendClientMessage(i, GREEN, "%s has run out of soldiers! The other team wins by default! ");
}
}
}
return 1;
}