19.01.2012, 17:28
Quote:
What you do is yo..
Oops sorry I wanted to tell you the solution but I got bored writing. (Try again in proper english, and put some effort in it, we generally don't feel like helping extremely ignorant and lazy people like yourself) |
pawn Код:
new Team1Kills=0;
new Team2Kills=0;
new bool:MYEVENT = false;
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(MYEVENT == true)
{
if(gTeam[playerid] == TEAM_2 && gTeam[killerid] == TEAM_1) Team1Kills++;
if(gTeam[playerid] == TEAM_1 && gTeam[killerid] == TEAM_2) Team2Kills++;
}
return 1;
}
pawn Код:
new EventTime;
CMD:startevent(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
MYEVENT = true;
EventTime = SetTimer("EventEnd", 600000, false);
}
return 1;
}
pawn Код:
forward EventEnd();
public EventEnd()
{
new WINNING_TEAM;
if(Team1Kills > Team2Kills) WINNING_TEAM = TEAM_1;
else if(Team2Kills > Team1Kills) WINNING_TEAM = TEAM_2;
for(new i=0; i<=MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == WINNING_TEAM)
{
//we can give them stuff
}
}
}
KillTimer(EventTime);
}