[AJUDA]Error em GangZone
#1

eae Galerinha , beleza ? estou implementando a GM de um colega meu , entao fui e criei a Gangzone da Mata , posi й criei tudo certinho , tambem organizei o /dominar , pra dominar la nй .. ai quando chego no territorio, dar "else" aparece a mensagem "voce nao estar em nenhum territorio " alguem poderia me ajudar ? e me falar qual parte posto , se й o /dominar ou outra parte .
Reply
#2

poste o comando "/dominar",
Reply
#3

aqui estar , sу a parte das Orgs que adcionei , pois soa muitos dominar , aero favela Parque green pista , etc ..


ai t aqui a da Mata , e as orgs q podem .

fui praticamente copiando os outros e mudando o id da org etc ..

pawn Код:
if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0)
    {
        new carid = GetPlayerVehicleID(playerid);
        if(IsAPlane(carid))
        {
            SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo pode usar esse comando dentro de um heli ou aviгo.");
            return true;
        }
        if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)//EXERCITO
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e o Exercito estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_PRE, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_EXE);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
                }
        }
          if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)//TALIBAN
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e o Taliban estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_PRE, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas eo exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_PRE);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
          if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)//ALQAEDA
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e a Al'qaeda estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_AL, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas e o Exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_AL);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
          if(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23)//FARC
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e a FARC estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_FARC, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas e o Exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_FARC);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
Reply
#4

vocК definiu o IsPlayerInMata pois ele pode estar com as coordenadas definidas erradas.
Reply
#5

Quote:
Originally Posted by Rodrigo_Avenged
Посмотреть сообщение
aqui estar , sу a parte das Orgs que adcionei , pois soa muitos dominar , aero favela Parque green pista , etc ..


ai t aqui a da Mata , e as orgs q podem .

fui praticamente copiando os outros e mudando o id da org etc ..

pawn Код:
if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0)
    {
        new carid = GetPlayerVehicleID(playerid);
        if(IsAPlane(carid))
        {
            SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo pode usar esse comando dentro de um heli ou aviгo.");
            return true;
        }
        if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)//EXERCITO
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e o Exercito estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_PRE, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_EXE);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
                }
        }
          if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)//TALIBAN
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e o Taliban estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_PRE, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas eo exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_PRE);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
          if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)//ALQAEDA
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e a Al'qaeda estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_AL, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas e o Exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_AL);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
          if(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23)//FARC
        {
            if(IsPlayerInMata(playerid))
            {
                if(Dominando[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
                    return true;
                }
                if(GuerranaMata == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
                    return true;
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s e a FARC estгo dominando a Mata!",playername);
                SendClientMessageToAll(COR_FARC, string);
                SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas os Terroristas e o Exercito foram avisados!");
                SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                GangZoneFlashForAll(GZMata,COR_FARC);
                Dominando[playerid] = 1;
                ProvocoMata[playerid] = 1;
                GuerranaMata = 1;
                TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
                return true;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
            }
            return true;
        }
NOSSA,
Este sistema й muito antigo, do tutorial do Andmeida10,
olhe em minha gamemode "Brasil Team Death Match" que tem um sistema mais avanзado,
aconselho vocк usar ele
Reply
#6

Quote:
Originally Posted by Matheus_Ecko
Посмотреть сообщение
vocК definiu o IsPlayerInMata pois ele pode estar com as coordenadas definidas erradas.
, defini tudo certinho , conforme coloquei no GangZoneCreat
Reply
#7

Quote:
Originally Posted by Matheus_Ecko
Посмотреть сообщение
vocК definiu o IsPlayerInMata pois ele pode estar com as coordenadas definidas erradas.
Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
NOSSA,
Este sistema й muito antigo, do tutorial do Andmeida10,
olhe em minha gamemode "Brasil Team Death Match" que tem um sistema mais avanзado,
aconselho vocк usar ele
Verdad e, vi no tutorial dele mesmo , Ok vou Dar uma olhada no sistema dessa GM , valeu ae em !




Garfield , mas o sistema de sua GM й de Dominar por checkpoint , eu queria que ja quando tivesse na GZ , colocava /dominar em qualquer lugar (dentro da GZ) e dominasse
Reply
#8

Quote:
Originally Posted by Rodrigo_Avenged
Посмотреть сообщение
Verdad e, vi no tutorial dele mesmo , Ok vou Dar uma olhada no sistema dessa GM , valeu ae em !




Garfield , mas o sistema de sua GM й de Dominar por checkpoint , eu queria que ja quando tivesse na GZ , colocava /dominar em qualquer lugar (dentro da GZ) e dominasse
Entгo utilize minha funзгo para verificar se o player estб em uma GangZone.
http://pastebin.com/XhtgEPc3
Reply
#9

sim , mas uma duvida

pawn Код:
isPlayerGangZone(pid, Float: gz_x, Float: gz_y,  Float: gz_x2, Float: gz_y2)
{
    static Float:X, Float:Y, Float:Z;
    GetPlayerPos(pid, X, Y, Z);
    if (X > gz_x && X < gz_x2 && Y > gz_y && Y < gz_y2)
        return true;
       
    return 0;
}
aqui " isPlayerGangZone(pid, Float: gz_x, Float: gz_y, Float: gz_x2, Float: gz_y2)" em "gz_x" eu tenho q por as cordenadas da gangzone ? ou й um code q vai automaticamente ?
Reply
#10

Vocк tem que pegar as coordenadas da gangzones.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)