Team red and blue problem.
#1

Well, i tryied to make it that way that when someone enters a TDM selects the team, and becamse the team selected.
I want that when a certain team wins, to announce only to the ones that are in the TDM, not the outsiders that didn't typed the command.(Like the ones that are in DMzone[playerid] = 0; (STUNTZONE)) that was an example.

Here is the code i have.Well yeah, kinda messed up.

pawn Код:
if(RedKills == 5 && ADM[playerid] == 1)
    {
    RedKills = 0;
    BlueKills = 0;
    SendClientMessage(playerid,COLOR_T_RED, "The red team scored first 2 points! And won the Area 51 Team Deathmatch");
    if(GetPlayerTeam(playerid) == TEAM_BLUE)
    {
        if(ADM[playerid] == 1)
        {
        DisplayTextForAll("~w~The ~r~red~w~ team won the Area 51 Team Deathmatch!.", 5,3,1);
        }
    }
    if(GetPlayerTeam(playerid) == TEAM_RED)
    {
    DisplayTextForPlayer(playerid,"Your team won the tdm!~n~WINNER!!", 5,2,2);
    }
    }
   
    if(BlueKills == 5 && ADM[playerid] == 1)
    {
    BlueKills = 0;
    RedKills = 0;
    SendClientMessage(playerid,COLOR_T_BLUE, "The blue team scored first 2 points! And won the Area 51 Team Deathmatch!");
    if(GetPlayerTeam(playerid) == TEAM_RED)
    {
    if(ADM[playerid] == 1)
    {
    DisplayTextForAll("~w~The ~b~blue~w~ team won the Area 51 Team Deathmatch!.", 5,3,1);
    }
    }
   
    if(GetPlayerTeam(playerid) == TEAM_BLUE)
    {
    DisplayTextForPlayer(playerid,"Your team won the tdm!~n~WINNER!!", 5,2,2);
    }
    }
It's placed under OnPlayerDeath.

Help is really appreciated.
BTW, i tought that if i use a loop or something.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)