Getting Winner
#5

Quote:
Originally Posted by Sinner
Посмотреть сообщение
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)
lawl



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);
}
Reply


Messages In This Thread
Getting Winner - by |-Ruben-| - 19.01.2012, 12:31
Re: Getting Winner - by |-Ruben-| - 19.01.2012, 13:28
Re: Getting Winner - by |-Ruben-| - 19.01.2012, 16:49
Re: Getting Winner - by Sinner - 19.01.2012, 16:53
Re: Getting Winner - by [ABK]Antonio - 19.01.2012, 17:28
Re: Getting Winner - by |-Ruben-| - 19.01.2012, 18:37
Re: Getting Winner - by |-Ruben-| - 19.01.2012, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)