[Ajuda] /guerra (Mнnimo 3 online)
#2

pawn Code:
if(strcmp(cmd, "/guerra", true) == 0)
    {
        if(PlayerInfo[playerid][pJailed] != 0)
        {
            SendClientMessage(playerid,CINZA," Vocк nгo pode criar guerra na cadeia!");
            return true;
        }
        if(TendoGuerra >= 1)
        {
            SendClientMessage(playerid, CINZA, "   Jб estб tendo uma guerra!");
            return true;
        }
        if(GetPlayerInterior(playerid) != 0)
        {
            SendClientMessage(playerid,CINZA," Vocк nгo pode criar guerra em um interior!");
            return true;
        }
        new p[3];
        for(new i = GetMaxPlayers(); i > -1; --i) {
            if(IsPlayerConnected(i)) {
                switch(PlayerInfo[i][pMembro]) {
                    case 3: p[0]++;
                    case 6: p[1]++;
                    case 15: p[2]++;
                }
            }
        }
        if(!(p[0] > 1 && p[1] > 1 && p[2] > 1)) return SendClientMessage(playerid,CINZA," Й necessбrio no mнnimo 2 players online do Ex, FARC e GI para iniciar a guerra!");
        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(COLOR_EXE, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-240;
            Territorio[MinY] = y-240;
            Territorio[MaxX] = x+240;
            Territorio[MaxY] = y+240;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
            GangZoneShowForAll(GZGuerra,COLORGZ_EXE);
            VisionInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            //TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return true;
        }
        if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)// Guerrilheiros Israelitas
        {
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "%s e o Guerrilheiros Israelitas iniciaram uma Guerra!",playername);
            SendClientMessageToAll(COR_GI, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-240;
            Territorio[MinY] = y-240;
            Territorio[MaxX] = x+240;
            Territorio[MaxY] = y+240;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
            GangZoneShowForAll(GZGuerra,COLORGZ_GI);
            VisionInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            //TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return true;
        }
        if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)// F.A.R.C
        {
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "%s e a F.A.R.C iniciaram uma Guerra!",playername);
            SendClientMessageToAll(COR_FARC, string);
            GetPlayerPos(playerid,x,y,z);
            Territorio[MinX] = x-240;
            Territorio[MinY] = y-240;
            Territorio[MaxX] = x+240;
            Territorio[MaxY] = y+240;
            Territorio[exemortos] = 0;
            Territorio[talmortos] = 0;
            Territorio[almortos] = 0;
            GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
            GangZoneShowForAll(GZGuerra,COLORGZ_FARC);
            VisionInfo[playerid][InicioGuerra] = 1;
            TendoGuerra = 1;
            //TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
            return true;
        }
        return true;
    }
Reply


Messages In This Thread
/guerra (Mнnimo 3 online) - by NuTShoT - 02.07.2013, 13:26
Re: /guerra (Mнnimo 3 online) - by paulor - 02.07.2013, 14:02
Re: /guerra (Mнnimo 3 online) - by Shadoww5 - 02.07.2013, 17:08
Re: /guerra (Mнnimo 3 online) - by NuTShoT - 02.07.2013, 20:25
Re: /guerra (Mнnimo 3 online) - by paulor - 03.07.2013, 00:29
Re: /guerra (Mнnimo 3 online) - by NuTShoT - 03.07.2013, 17:40
Respuesta: /guerra (Mнnimo 3 online) - by DartakousLien - 03.07.2013, 18:23
Re: /guerra (Mнnimo 3 online) - by NuTShoT - 03.07.2013, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)