[Ajuda] Gang Zone(GZ)
#1

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.
Reply
#2

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

Й 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?
Reply
#4

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

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

Ok, no aguardo...
Reply
#7

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..

Reply
#8

Ainda nгo consegui entender o bug.
Reply
#9

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?
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)