Facing some issues
#6

So I got this now:
pawn Код:
#define MAX_TEAMS 10 // top
new Killing[MAX_TEAMS], // top
    bool:IsWar;
   

forward WarEnded();
public WarEnded()
{
    new str[128];
    IsWar = false;
    for(new a;a<MAX_PLAYERS;a++)
    {
        format(str, 128,"WAR OVER.Triads Grove LSV: %d kills || Mafia Ballas VLA %d kills,",Killing[18] + Killing[6] + Killing[15], Killing[5] + Killing[17] + Killing[16]);
        SendClientMessageToAll(COLOR_WHITE,str);
    }
    return 1;
}
if(IsWar && killerid != INVALID_PLAYER_ID) Killing[gTeam[killerid]]++; // OnPlayerDeath

    if(strcmp(cmd, "/acceptwar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(acceptwar == 1)
            {
                if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 16)
                {
                    acceptwar = 0;
                    SendClientMessageToAll(COLOR_BLUE,"Mafia,Ballas,VLA has Accepted WARUL!");
                    SetTimer("WarEnded", 60000, 0);
                    for(new i;i < MAX_TEAMS;i++)
                    {
                        Killing[i] = 0;
                    }
                    IsWar = true;
                }
                else if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 18)
                {
                    acceptwar = 0;
                    SendClientMessageToAll(COLOR_BLUE,"Grove,Triads,LSV has Accepted WARUL!");
                    SetTimer("WarEnded", 60000, 0);
                    for(new i;i < MAX_TEAMS;i++)
                    {
                        Killing[i] = 0;
                    }
                    IsWar = true;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY,"    you are not authorized to use this command(LEADERS ONLY)");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   there wasn't any war proposed");
            }
        }
        return 1;
    }
The problem is, when the war is over ( after 1 minute ) it send me like 100 messages that the war is over, but the kills for Mafia Ballas and VLA doesn't show up, it shows 0 for them, but for anothers it shows the right ones.
Reply


Messages In This Thread
Facing some issues - by Jafet_Macario - 05.09.2011, 18:10
Re: Facing some issues - by =WoR=Varth - 05.09.2011, 18:54
Re: Facing some issues - by [MWR]Blood - 05.09.2011, 18:59
Re: Facing some issues - by Jafet_Macario - 05.09.2011, 21:29
Re: Facing some issues - by [MWR]Blood - 06.09.2011, 10:57
Re: Facing some issues - by Jafet_Macario - 06.09.2011, 11:40
Re: Facing some issues - by [MWR]Blood - 06.09.2011, 11:57
Re: Facing some issues - by Jafet_Macario - 06.09.2011, 16:05
Re: Facing some issues - by =WoR=Varth - 06.09.2011, 16:19
Re: Facing some issues - by Jafet_Macario - 06.09.2011, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)