[Ajuda] Sistema de /Guerra
#1

Seguinte, gostaria que alguйm me ajudasse, a corrigir esse sistema de guerra, pois nele conta ao contrбrio, o numero de mortos, nгo de kill, exemplo, a org q morre menos ganha, entгo a organizaзгo que nгo participa da guerra ganha sem ao menos ir, gostaria de tipo, a cada morte contava o numero de Pontos para a organizaзгo que matou a inimiga, tipo alqaeda matou taliban e a alqaeda recebe 1 ponto, e assim vai, Meu Sistema de /guerra ai.

pawn Код:
forward GuerraTerrorista(playerid);
new GZGuerra;


    }
    if(strcmp(cmd, "/guerra", true) == 0)
    {
        if(PlayerInfo[playerid][pJailed] != 0)
        {
            SendClientMessage(playerid,CINZA," Vocк nгo pode criar guerra na cadeia!");
            return 1;
        }
        if(TendoGuerra >= 1)
        {
            SendClientMessage(playerid, CINZA, "   Jб estб tendo uma guerra!");
            return 1;
        }
        new Float:x,Float:y,Float:z;
        if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)// EXE
        {
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "%s e o Exйrcito iniciaram uma Guerra!",playername);
            SendClientMessageToAll(COR_EXE, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-120;
            Territorio[MinY] = y-120;
            Territorio[MaxX] = x+120;
            Territorio[MaxY] = y+120;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-120,y-120,x+120,y+120);
            GangZoneShowForAll(GZGuerra,COR_EXE);
            ProcuradoInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)// Taliban
        {
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "%s e o Taliban iniciaram uma Guerra!",playername);
            SendClientMessageToAll(COR_TAL, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-120;
            Territorio[MinY] = y-120;
            Territorio[MaxX] = x+120;
            Territorio[MaxY] = y+120;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-120,y-120,x+120,y+120);
            GangZoneShowForAll(GZGuerra,COLORGZ_HAMAS);
            ProcuradoInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)// Al'qaeda
        {
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "%s e a Al'qaeda iniciaram uma Guerra!",playername);
            SendClientMessageToAll(COR_AL, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-120;
            Territorio[MinY] = y-120;
            Territorio[MaxX] = x+120;
            Territorio[MaxY] = y+120;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-120,y-120,x+120,y+120);
            GangZoneShowForAll(GZGuerra,COLORGZ_ALCAIDA);
            ProcuradoInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return 1;
        }
        return 1;
    }

public GuerraTerrorista(playerid)
{
    new string[128];
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, MAX_PLAYER_NAME);
    TendoGuerra = 0;
    if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
    {
        KillTimer(TempoGuerra);
        ProcuradoInfo[playerid][InicioGuerra] = 0;
        TendoGuerra = 0;
        format(string, sizeof(string), "%s e o Exйrcito Finalizaram uma Guerra.",plname);
        SendClientMessageToAll(COR_EXE, string);
        GangZoneHideForAll(GZGuerra);
        GangZoneDestroy(GZGuerra);
    }
    if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
    {
        KillTimer(TempoGuerra);
        ProcuradoInfo[playerid][InicioGuerra] = 0;
        TendoGuerra = 0;
        format(string, sizeof(string), "%s e a Taliban Finalizaram uma Guerra.",plname);
        SendClientMessageToAll(COR_TAL, string);
        GangZoneHideForAll(GZGuerra);
        GangZoneDestroy(GZGuerra);
    }
    if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
    {
        KillTimer(TempoGuerra);
        ProcuradoInfo[playerid][InicioGuerra] = 0;
        TendoGuerra = 0;
        format(string, sizeof(string), "%s e a Al'qaeda Finalizaram uma Guerra.",plname);
        SendClientMessageToAll(COR_AL, string);
        GangZoneHideForAll(GZGuerra);
        GangZoneDestroy(GZGuerra);
    }
    if(Territorio[almortos] > Territorio[exemortos] && Territorio[talmortos] > Territorio[exemortos])//exercito ownou
    {
        format(string, sizeof(string), "O Exйrcito venceu a guerra, Mataram %d membros da Taliban e %d membros da Al'qaeda.",Territorio[talmortos], Territorio[almortos]);
        SendClientMessageToAll(COR_EXE, string);
    }
    else if(Territorio[exemortos] > Territorio[almortos] && Territorio[talmortos] > Territorio[almortos])//al'qaeda ownou
    {
        format(string, sizeof(string), "A Al'qaeda venceu a guerra, Mataram %d membros da Taliban e %d membros do Exйrcito.",Territorio[talmortos], Territorio[exemortos]);
        SendClientMessageToAll(COR_AL, string);
    }
    else if(Territorio[exemortos] > Territorio[talmortos] && Territorio[almortos] > Territorio[talmortos])//taliban ownou
    {
        format(string, sizeof(string), "A Taliban venceu a guerra, Mataram %d membros da Al'qaeda e %d membros do Exйrcito.",Territorio[almortos], Territorio[exemortos]);
        SendClientMessageToAll(COR_TAL, string);
    }
    else
    {
        format(string, sizeof(string), "Houve um empate na guerra. Morreram: %d membros da Al'qaeda, %d membros do Exйrcito e %d membros da Taliban.",Territorio[almortos], Territorio[exemortos],Territorio[talmortos]);
        SendClientMessageToAll(COR_TAL, string);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)