[AJUDA] Assalto no banco
#1

Bom, fiz um cуdigo que dб pra assaltar o banco e a loja de armas. O problema й: A loja de armas 1 assalta de boa, mas o Banco nгo assalta!

cуdigo:

pawn Код:
if(strcmp(cmd,"/ass",true) == 0)
    {
       if(PlayerToPoint(25.0,playerid,316.8638,-165.1895,999.6010))
       {//loja de armas 1
           if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5)
           {
               format(string, sizeof(string), "%s e os AZTECAS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1", 5000, 0, "i", playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
           {
               format(string, sizeof(string), "%s e os CORLEONE estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
           {
               format(string, sizeof(string), "%s e os YAKUZA estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)
           {
               format(string, sizeof(string), "%s e os BALLAS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18)
           {
               format(string, sizeof(string), "%s e os VAGOS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
           {
               format(string, sizeof(string), "%s e os COMANDO VERMELHO estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)
           {
               format(string, sizeof(string), "%s e os PCC estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
           {
               format(string, sizeof(string), "%s e os GROOVES estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
               lj1rolando = 1;
               return 1;
           }
           else if(PlayerToPoint(25.0,playerid,2312.9563,-8.0283,26.7422))
            {//banco
           if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5)
           {
               format(string, sizeof(string), "%s e os AZTECAS estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco", 5000, 0, "i", playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
           {
               format(string, sizeof(string), "%s e os CORLEONE estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
           {
               format(string, sizeof(string), "%s e os YAKUZA estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)
           {
               format(string, sizeof(string), "%s e os BALLAS estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18)
           {
               format(string, sizeof(string), "%s e os VAGOS estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
           {
               format(string, sizeof(string), "%s e os COMANDO VERMELHO estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)
           {
               format(string, sizeof(string), "%s e os PCC estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
           if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
           {
               format(string, sizeof(string), "%s e os GROOVES estгo assaltando o BANCO!", PlayerName(playerid));
               SendClientMessageToAll(0xEE9611C8,string);
               tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
               bancorolando = 1;
               return 1;
           }
        }
        return 1;
  }
  return 1;
}
Reply
#2

tava faltando uma chave antes do else if

pawn Код:
if(strcmp(cmd,"/ass",true) == 0)
{
    if(PlayerToPoint(25.0,playerid,316.8638,-165.1895,999.6010))
    {//loja de armas 1
        if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5)
        {
            format(string, sizeof(string), "%s e os AZTECAS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1", 5000, 0, "i", playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
        {
            format(string, sizeof(string), "%s e os CORLEONE estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
        {
            format(string, sizeof(string), "%s e os YAKUZA estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)
        {
            format(string, sizeof(string), "%s e os BALLAS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18)
        {
            format(string, sizeof(string), "%s e os VAGOS estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
        {
            format(string, sizeof(string), "%s e os COMANDO VERMELHO estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)
        {
            format(string, sizeof(string), "%s e os PCC estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
        {
            format(string, sizeof(string), "%s e os GROOVES estгo assaltando a Loja de Armas 1!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempoloja1 = SetTimerEx("MaisGranaLJ1",5000,0,"i",playerid);
            lj1rolando = 1;
            return 1;
        }
    }
    else if(PlayerToPoint(25.0,playerid,2312.9563,-8.0283,26.7422))
    {//banco
        if(PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5)
        {
            format(string, sizeof(string), "%s e os AZTECAS estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco", 5000, 0, "i", playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
        {
            format(string, sizeof(string), "%s e os CORLEONE estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
        {
            format(string, sizeof(string), "%s e os YAKUZA estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)
        {
            format(string, sizeof(string), "%s e os BALLAS estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 18)
        {
            format(string, sizeof(string), "%s e os VAGOS estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
        {
            format(string, sizeof(string), "%s e os COMANDO VERMELHO estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)
        {
            format(string, sizeof(string), "%s e os PCC estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
        if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
        {
            format(string, sizeof(string), "%s e os GROOVES estгo assaltando o BANCO!", PlayerName(playerid));
            SendClientMessageToAll(0xEE9611C8,string);
            tempobanco = SetTimerEx("MaisGranaBanco",5000,0,"i",playerid);
            bancorolando = 1;
            return 1;
        }
     }
  return 1;
}
tenta isso, se nao der certo me avise
Reply
#3

Vocк salvou minha vida! Obrigado! Obrigado mesmo! Muito,muito obrigado! Cara, obrigado mesmo, de verdade! Muito obrigado!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)