SA-MP Forums Archive
[Ajuda] Gang Zone(GZ) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Gang Zone(GZ) (/showthread.php?tid=537493)



Gang Zone(GZ) - SukMathcuck - 15.09.2014

Tipo pessoal estou para abrir meu servidor e falta sу uma coisa "GZ" entгo vou pedir ajuda de vocкs urgente, tenho uma GZ aqui prolongбvel, mais tб difнcil usar ela tб meio bugada "eu acho", e vou postar o sistema para vocкs me ajudarem pois nгo consegui mesmo, quero explicar o mбximo para vocкs mais tenho que arrumar esse bug, que quiser pegar uma parte do sistema pode pegar, sу quero desbugar esses cуdigos. Por favor pensem com migo com humildade..

Cуdigos:

Essa й uma parte da public que chama quando o Timer acaba.

Код:
public ElQuebrados(playerid)
{
    new string[128];
    if(ProvocoGZ2[playerid] == 1)
    {
        for(new player = 0; player < MAX_PLAYERS; player++)
        {
           if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 && PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 6 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
           {
              SendClientMessage(player, 0xFFFFFFFA, "[TERRITУRIO]: O combate em El Quebrados foi prolongado.");
              tempoelquebrados = SetTimerEx("ElQuebrados", 120000, 0, "i", player);
           }
        }
        if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
        {//Se nгo tiver o loop ali em cima ele vem pra cб e ve se a org 6 esta no quadrado
            format(string, sizeof(string), "[TERRITУRIO]: FARC conseguiram tomar o controle da cidade El Quebrados. ");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,COLOR_FARC);
            Dominando[playerid] = 0;
            gzuldono = 1;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            KillTimer(tempoelquebrados);
            return 1;
        }
        else if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
        {//Se nгo tiver o loop ali em cima ele vem pra cб e ve se a org 3 esta no quadrado
            format(string, sizeof(string), "[TERRITУRIO]: Forзas Armadas consegue manter o controle de El Quebrados.");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,COR_EXERCITO);
            Dominando[playerid] = 0;
            gzuldono = 0;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            KillTimer(tempoelquebrados);
            return 1;
        }
        else
        {
            format(string, sizeof(string), "[TERRITУRIO]: Cidade El Quebrados estб livre de guerras.");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,0xC0C0C0AA);
            Dominando[playerid] = 0;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            gzuldono = 2;
            KillTimer(tempoelquebrados);
            return 1;
        }
    }
    return 1;
}
esse ae, й o que verifica se as duas orgs esta na GZ, ae prolonga.
Код:
        for(new player = 0; player < MAX_PLAYERS; player++)
        {
           if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 && PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 6 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
           {
              SendClientMessage(player, 0xFFFFFFFA, "[TERRITУRIO]: O combate em El Quebrados foi prolongado.");
              tempoelquebrados = SetTimerEx("ElQuebrados", 120000, 0, "i", player);
           }
        }
Caso neguma pessoa estiver na GZ, ae ve se tem alguem da FARC na GZ, caso tiver jб dб comando. (eu acho)
Код:
        if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
        {//Se nгo tiver o loop ali em cima ele vem pra cб e ve se a org 6 esta no quadrado
            format(string, sizeof(string), "[TERRITУRIO]: FARC conseguiram tomar o controle da cidade El Quebrados. ");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,COLOR_FARC);
            Dominando[playerid] = 0;
            gzuldono = 1;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            KillTimer(tempoelquebrados);
            return 1;
        }
esse ae й a mesma coisa sу muda a org, ve se tem alguem da FA tб na GZ, caso tiver jб dб comando. (eu acho)
Код:
        else if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 && IsPlayerInPlace(playerid,-1412.9468,2536.2871,-1577.1643,2727.0327))
        {//Se nгo tiver o loop ali em cima ele vem pra cб e ve se a org 3 esta no quadrado
            format(string, sizeof(string), "[TERRITУRIO]: Forзas Armadas consegue manter o controle de El Quebrados.");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,COR_EXERCITO);
            Dominando[playerid] = 0;
            gzuldono = 0;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            KillTimer(tempoelquebrados);
            return 1;
        }
Esse ultimo й o seguinte, caso ninguem estiver na GZ, a GZ fica livre de guerras.(Mais quero tirar isso)
Код:
        {
            format(string, sizeof(string), "[TERRITУRIO]: Cidade El Quebrados estб livre de guerras.");
            SendClientMessageToAll(COLOR_YELLOW, string);
            GangZoneStopFlashForAll(gzul);
            GangZoneShowForAll(gzul,0xC0C0C0AA);
            Dominando[playerid] = 0;
            ProvocoGZ2[playerid] = 0;
            GuerranoGZ1 = 0;
            gzuldono = 2;
            KillTimer(tempoelquebrados);
            return 1;
        }
Tipo, eu queria arrumar isso, nгo consegui deve ser algo pequeno que nгo consegui ver, caso alguйm encontrar me fale e me ajude pf, tenho que arrumar isso.


Re: Gang Zone(GZ) - ipsLuan - 15.09.2014

Nгo entendi a parte que vocк fez o loop player e colocou playerid.


Re: Gang Zone(GZ) - SukMathcuck - 15.09.2014

Й eu modifiquei achando que ia dar em alguma coisa eu acho que o bug tб ae, mais nгo sei oque faзo, sou iniciante em Pawn oque faзo ae? nesse caso, xCR7?


Re: Gang Zone(GZ) - ipsLuan - 15.09.2014

Tenta mudar o playerid para player.
Afinal, qual й o bug?


Re: Gang Zone(GZ) - SukMathcuck - 15.09.2014

Tipo quando vou dar comando, pareзe que nгo corre tudo corretamente. vou upar uma ss pera ae


Re: Gang Zone(GZ) - ipsLuan - 15.09.2014

Ok, no aguardo...


Re: Gang Zone(GZ) - SukMathcuck - 15.09.2014

Tipo quando vou dar comando, parece que nгo corre tudo corretamente, tipo na hora que o cara vai prologar, aparece que jб dominou, mais nem prolongo na verdade estava sу eu na GZ e falou que prolongou, e nem na gz eu tava ninguйm tava na gz, ae ja deu comando logo depois olha ae a imagem a baixo CR7 pf me ajude amigo..




Re: Gang Zone(GZ) - ipsLuan - 15.09.2014

Ainda nгo consegui entender o bug.


Re: Gang Zone(GZ) - SukMathcuck - 15.09.2014

Tipo, olha ae em cima na imagem, primeiro, eu nгo estava na GZ e jб deu comando e em cima do comando que dominei a gz jб prolongo, tipo eu na verdade peguei esse sistema e quero desbugar olha ae, nгo tinha ninguem na gz lб, nem eu e ja deu comando isso tб maior bugado, na verdade nem eu sei oque aconteceu ae por isso quero sua ajuda para praticamente recriar esse sistema, por isso postei para vc me ajudar a desbugar, 2 cabeзas pensa melhor que 1, entendeu?


Re: Gang Zone(GZ) - ipsLuan - 15.09.2014

Seu GameMode й Mega Life?
Se sim, tente copiar da pista de skate...