SA-MP Forums Archive
[Ajuda] /Roubar nao para - 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] /Roubar nao para (/showthread.php?tid=522362)



[Ajuda] /Roubar nao para - 12utra - 27.06.2014

e assim galera eu ja tinha arrumado esse bug mas sem querer deletei meu gm e meu backup e bem antes desse local de roubo e agora ja fiz de tudo e nao consiguo arrumar nem lascando o cara da /roubar e mesmo depois que o tempo acaba ele continua la e mesmo relogando ele volta pra hq com a animacao
PHP код:
//======================[NOVO ROUBAR]=================
//GLOBAIS
new roubando[MAX_PLAYERS];
new 
temporoubobanco = 0;
new 
temporoubolotsf = 0;
new 
temporoubolot = 0;
new 
temporouboloja1 = 0;
new 
temporouboloja2 = 0;
new 
temporouboprefe = 0;
new 
temporoubonavio = 0;
new 
temporouboazk = 0;
forward ArouboCasa();
forward Aroubo();
forward Aroubo2();
forward Aroubo3();
forward Aroubo4();
forward Aroubo5();
forward Aroubo6();
forward Aroubo7();
forward Aroubo8();
forward FuckYou(playerid,give);
new 
roubobanco;
new 
ProvocoBanco[MAX_PLAYERS];
new 
tempobanco;
forward RouboBanco(playerid);
// ROUBO NAVIO
new roubonavio;
new 
Provoconavio[MAX_PLAYERS];
new 
temponavio;
forward Roubonavio(playerid);
//ROUBO AZKABAM
new rouboazk;
new 
Provocoazk[MAX_PLAYERS];
new 
tempoazk;
forward Rouboazk(playerid);
//LOTERICA SAN FIERRO
new roubolotsf;
new 
Provocolotsf[MAX_PLAYERS];
new 
tempolotsf;
forward Roubolotsf(playerid);
//LOTERICA
new roubolot;
new 
ProvocoLot[MAX_PLAYERS];
new 
tempolot;
forward RouboLot(playerid);
//LOJA DE ARMAS 1
new rouboloja1;
new 
ProvocoLoja1[MAX_PLAYERS];
new 
tempoloja1;
forward RouboLoja1(playerid);
//LOJA DE ARMAS 2
new rouboloja2;
new 
ProvocoLoja2[MAX_PLAYERS];
new 
tempoloja2;
forward RouboLoja2(playerid);
forward RouboLoja22(playerid);
//PREFEITURA
new rouboprefe;
new 
ProvocoPrefe[MAX_PLAYERS];
new 
tempoprefe;
forward RouboPrefe(playerid);
//======================[FIM ROUBAR]================= 
1 parte
PHP код:
if(IsACop(killerid))
    {
        if(
ProvocoLot[playerid] == 1)
        {
               
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo na Loterica e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loterica! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
ProvocoLot[playerid] = 0; roubando[playerid] = 0; roubolot = 0; KillTimer(tempolot); temporoubolot = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 500);
        }
        if(
Provocolotsf[playerid] == 1)
        {
               
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo na Loterica De San Fierro e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loterica de San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
Provocolotsf[playerid] = 0; roubando[playerid] = 0; roubolotsf = 0; KillTimer(tempolotsf); temporoubolotsf = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 5000);
        }
        if(
Provoconavio[playerid] == 1)
        {
               
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo no Navio De San Fierro e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Navio de San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
Provoconavio[playerid] = 0; roubando[playerid] = 0; roubonavio = 0; KillTimer(temponavio); temporoubonavio = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 5000);
        }
        if(
Provocoazk[playerid] == 1)
        {
               
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo no Cofre de Azkabam!!! R$ 10000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre de Azkabam!!! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
Provocoazk[playerid] = 0; roubando[playerid] = 0; rouboazk = 0; KillTimer(tempoazk); temporouboazk = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 10000);
        }
        if(
ProvocoBanco[playerid] == 1)
        {
               
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo no Banco e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 500);
        }
        if(
ProvocoLoja1[playerid] == 1)
        {
            
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo a Loja de Armas 1 e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 500);
        
        }
        if(
ProvocoLoja2[playerid] == 1)
        {
            
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo a Loja de Armas 2 e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 2! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
ProvocoLoja2[playerid] = 0; roubando[playerid] = 0; rouboloja2 = 0; KillTimer(tempoloja2); temporouboloja2 = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 500);
        }
        if(
ProvocoPrefe[playerid] == 1)
        {
             
format(gstring, sizeof(gstring), "Oficial %s[%d] Evitou um Roubo ao Puteiro e Ganhou  R$ 5000 Como Prкmio!", NomePlayerMatou,killerid);
               
SendClientMessageToAll(GetPlayerColor(killerid), gstring);
               
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar do Puteiro! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
               
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
            
ProvocoPrefe[playerid] = 0; roubando[playerid] = 0; rouboprefe = 0; KillTimer(tempoprefe); temporouboprefe = 0;
            
RemovePlayerAttachedObject(playerid,4);
            
ClearAnimations(playerid);
            
KillTimer(TempoContagem[playerid]);
            
GivePlayerMoneyEx(killerid, 500);
        }
    } 
2 parte
PHP код:
if(strcmp(cmd,"/roubar",true)==0)
    {
        if(
PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
        
&& PlayerInfo[playerid][pMembro] != 6 && PlayerInfo[playerid][pLider] != 6
        
&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
        
&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
        
&& PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
        
&& PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
        
&& PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
        
&& PlayerInfo[playerid][pMembro] != 22 && PlayerInfo[playerid][pLider] != 22
        
&& PlayerInfo[playerid][pMembro] != 15 && PlayerInfo[playerid][pLider] != 15
        
&& PlayerInfo[playerid][pMembro] != 8 && PlayerInfo[playerid][pLider] != 8
        
&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
        
&& PlayerInfo[playerid][pMembro] != 12 && PlayerInfo[playerid][pLider] != 12
        
&& PlayerInfo[playerid][pMembro] != 13 && PlayerInfo[playerid][pLider] != 13
        
&& PlayerInfo[playerid][pMembro] != 0 && PlayerInfo[playerid][pLider] != 0)
        {
            
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode Roubar um Banco/Loterica LS,SF/Loja de Armas 1, 2,Navio e Outros Locais");
            return 
1;
        }
        if(
roubando[playerid] == 1)
        {
               
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
            return 
1;
        }
        if(
PlayerInfo[playerid][pDina] == 0)
        {
               
SendClientMessage(playerid, COLOR_GRAD5, "Vocк Nгo Tem Uma Dinamite Compre de um Mafioso!");
            return 
1;
        }
        if(
PlayerToPoint(1.0,playerid, 2141.4456,1641.9794,993.5761))
        {
            if(
roubobanco == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
                return 
1;
            }
            if(
temporoubobanco == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre do Banco e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar o banco.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
            
roubando[playerid] = 1;
            
ProvocoBanco[playerid] = 1;
            
roubobanco = 1;
            
temporoubobanco = 1;
            
SetTimer("Aroubo", 220000, 0);
            
tempobanco = SetTimerEx("RouboBanco", 60000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 59;
            return 
1;
          }
        else if(
PlayerToPoint(2.0,playerid,-2475.0513,1554.3281,33.2344))
        {
            if(
roubonavio == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse local.");
                return 
true;
            }
            if(
temporoubonavio == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o Navio de San Fierro espere 3 minutos para roubar de novo !");
                return 
true;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre do Navio de San Fierro e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar ao Navio de San Fierro.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Navio de San Fierro");
            
roubando[playerid] = 1;
            
Provoconavio[playerid] = 1;
            
roubonavio = 1;
            
temporoubonavio = 1;
            
SetTimer("Aroubo8", 220000, 0);
            
tempolot = SetTimerEx("Roubonavio", 100000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 100;
            return 
1;
        }
         else if(
PlayerToPoint(2.0,playerid,916.97,-2688.69,11.92))
        {
            if(
rouboazk == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse local.");
                return 
true;
            }
            if(
temporouboazk == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o Cofre de Azkabam espere 3 minutos para roubar de novo !");
                return 
true;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre de Azkabam!!! e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 100 segundos para terminar de roubar o Cofre de Azkabam!!!.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Cofre de Azkabam!!!");
            
roubando[playerid] = 1;
            
Provocoazk[playerid] = 1;
            
rouboazk = 1;
            
temporouboazk = 1;
            
SetTimer("Aroubo6", 220000, 0);
            
tempoazk = SetTimerEx("Rouboazk", 100000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 100;
            return 
1;
        }
        else if(
PlayerToPoint(1.0,playerid,-2165.8979,644.3884,1052.3750))
        {
            if(
roubolotsf == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
                return 
1;
            }
            if(
temporoubolotsf == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre da Lotйrica de San Fierro espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre da Loterica De San Fierro e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar a Lotйrica De San Fierro.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Lotйrica De San Fierro");
            
roubando[playerid] = 1;
            
Provocolotsf[playerid] = 1;
            
roubolotsf = 1;
            
temporoubolotsf = 1;
            
SetTimer("Aroubo7", 220000, 0);
            
tempolot = SetTimerEx("Roubolotsf", 100000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 100;
            return 
1;
        }
        else if(
PlayerToPoint(1.0,playerid,820.6042,8.3990,1004.1962))
        {
            if(
roubolot == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
                return 
1;
            }
            if(
temporoubolot == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre da Lotйrica espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre da Loterica e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar a Lotйrica.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Lotйrica");
            
roubando[playerid] = 1;
            
ProvocoLot[playerid] = 1;
            
roubolot = 1;
            
temporoubolot = 1;
            
SetTimer("Aroubo2", 220000, 0);
            
tempolot = SetTimerEx("RouboLot", 60000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 59;
            return 
1;
        }
        else if(
PlayerToPoint(1.0,playerid,305.2067,-169.4358,999.5938))
        {
            if(
rouboloja1 == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa loja.");
                return 
1;
            }
            if(
temporouboloja1 == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Loja de Armas 1 espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre da Loja de Armas 1 e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar a Loja de Armas 1.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Loja de Armas 1");
            
roubando[playerid] = 1;
            
ProvocoLoja1[playerid] = 1;
            
rouboloja1 = 1;
            
temporouboloja1 = 1;
            
SetTimer("Aroubo3", 220000, 0);
            
tempoloja1 = SetTimerEx("RouboLoja1", 60000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 59;
            return 
1;
        }
        else if(
PlayerToPoint(1.0,playerid,293.0988,-57.3573,1001.5156))
        {
            if(
rouboloja2 == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa loja.");
                return 
1;
            }
            if(
temporouboloja2 == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Loja de Armas 2 espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre da Loja de Armas 2 e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar a Loja de Armas 2.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Loja de Armas 2");
            
roubando[playerid] = 1;
            
ProvocoLoja2[playerid] = 1;
            
rouboloja2 = 1;
            
temporouboloja2 = 1;
            
SetTimer("Aroubo4", 220000, 0);
            
tempoloja2 = SetTimerEx("RouboLoja2", 60000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 59;
            return 
1;
        }
        else if(
PlayerToPoint(1.0,playerid,947.1464,-41.6903,1001.1166))
        {
            if(
rouboprefe == 1)
            {
                   
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo no Puteiro.");
                return 
1;
            }
            if(
temporouboprefe == 1)
            {
                   
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o Puteiro espere 15 minutos para roubar de novo !");
                return 
1;
            }
            
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            
format(string, sizeof(string), "%s e os %s Estouraram o Cofre do Puteiro e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
            
SendClientMessageToAll(GetPlayerColor(playerid), string);
            
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar o Puteiro.");
            
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Puteiro");
            
roubando[playerid] = 1;
            
ProvocoPrefe[playerid] = 1;
            
rouboprefe = 1;
            
temporouboprefe = 1;
            
SetTimer("Aroubo5", 220000, 0);
            
tempoprefe = SetTimerEx("RouboPrefe", 60000, 0, "i", playerid);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerPlaySound(playerid, 1159, x, y, z);
            
PlayerInfo[playerid][pDina] -= 1;
            
TempoContagem[playerid] = SetTimerEx("ContagemRoubo", 1000, 1, "i", playerid);
            
Contagem[playerid] = 59;
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo esta em um Banco/Loterica/Loja de Armas 1, 2 !");
            return 
1;
        }
        
//return 1;
    
} 
3parte
PHP код:
public Roubolotsf(playerid)
{
    
KillTimer(tempolot);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,-2162.5313,641.0464,1052.3750))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Lotйrica De San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre da Lotйrica De San Fierro.");
        
Provocolotsf[playerid] = 0; roubando[playerid] = 0; roubolotsf = 0; KillTimer(tempolotsf); temporoubolotsf = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(5.0,i,-2165.8979,644.3884,1052.3750))
        if(!
IsACop(playerid))
        {
            if(
Provocolotsf[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre da Lotйrica De San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; roubolotsf = 0; Provocolotsf[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
ClearAnimations(i);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo a Lotйrica");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:30000] do cofre da Lotйrica De San Fierro!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 30000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
Roubonavio(playerid)
{
    
KillTimer(temponavio);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,-2475.5510,1549.8301,33.2273))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Navio De San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do Navio De San Fierro.");
        
Provoconavio[playerid] = 0; roubando[playerid] = 0; roubonavio = 0; KillTimer(temponavio); temporoubonavio = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(5.0,i,-2475.0513,1554.3281,33.2344))
        if(!
IsACop(playerid))
        {
            if(
Provoconavio[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Navio De San Fierro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; roubonavio= 0; Provoconavio[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
ClearAnimations(i);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo ao Navio De San Fierro");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:60000] do cofre do Navio De San Fierro!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 60000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
Rouboazk(playerid)
{
    
KillTimer(tempoazk);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,916.97,-2688.69,11.92))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre de Azkabam!!! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre de Azkabam.");
        
Provocoazk[playerid] = 0; roubando[playerid] = 0; rouboazk = 0; KillTimer(tempoazk); temporouboazk = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(5.0,i,921.45,-2682.67,11.92))
        if(!
IsACop(playerid))
        {
            if(
Provocoazk[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre de Azkabam!!! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; rouboazk = 0; Provocoazk[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
ClearAnimations(i);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo ao Cofre de Azkabam!!!");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:80000] do cofre de Azkabam!!!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 80000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
RouboBanco(playerid)
{
    
KillTimer(tempobanco);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,2141.4456,1641.9794,993.5761))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
        
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(10.0,i,2141.4456,1641.9794,993.5761))
        if(!
IsACop(playerid))
        {
            if(
ProvocoBanco[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s Conseguiram Roubar o Cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
ClearAnimations(playerid);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo ao Banco");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:45000] do cofre do Banco!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 45000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
RouboLot(playerid)
{
    
KillTimer(tempolot);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,820.6042,8.3990,1004.1962))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Lotйrica! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre da Lotйrica.");
        
ProvocoLot[playerid] = 0; roubando[playerid] = 0; roubolot = 0; KillTimer(tempolot); temporoubolot = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(5.0,i,820.6042,8.3990,1004.1962))
        if(!
IsACop(playerid))
        {
            if(
ProvocoLot[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre da Lotйrica! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; roubolot = 0; ProvocoLot[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo a Lotйrica");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:30000] do cofre da Lotйrica!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 30000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
RouboLoja1(playerid)
{
    
KillTimer(tempoloja1);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,305.2067,-169.4358,999.5938))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar a Loja de Armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб na Loja de Armas 1.");
        
RemovePlayerAttachedObject(playerid,4);
        
ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(8.0,i,305.2067,-169.4358,999.5938))
        if(!
IsACop(playerid))
        {
            if(
ProvocoLoja1[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar a Loja de Armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                    
roubando[playerid] = 0; rouboloja1 = 0; ProvocoLoja1[playerid] = 0;
                    
RemovePlayerAttachedObject(playerid,4);
                    
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo a Loja de Armas 1");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:15000] da Loja de Armas 1!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 15000);
                
GivePlayerWeapon(i, 24, 200);
                
GivePlayerWeapon(i, 29, 150);
                
GivePlayerWeapon(i, 25, 150);
                
GivePlayerWeapon(i, 31, 150);
                
RemovePlayerAttachedObject(playerid,4);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
RouboLoja2(playerid)
{
    
KillTimer(tempoloja2);
    if(!
PlayerToPoint(8.0,playerid,293.0988,-57.3573,1001.5156))
    if(!
IsACop(playerid))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar a Loja de Armas 2! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб na Loja de Armas 2.");
        
ProvocoLoja2[playerid] = 0; roubando[playerid] = 0; rouboloja2 = 0; KillTimer(tempoloja2); temporouboloja2 = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(8.0,i,293.0988,-57.3573,1001.5156))
        if(!
IsACop(playerid))
        {
            if(
ProvocoLoja2[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar a Loja de Armas 2! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; rouboloja2 = 0; ProvocoLoja2[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo a Loja de Armas 2");
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:15000] da Loja de Armas 2!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 15000);
                
GivePlayerWeapon(i, 24, 200);
                
GivePlayerWeapon(i, 29, 150);
                
GivePlayerWeapon(i, 25, 150);
                
GivePlayerWeapon(i, 31, 150);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
}
public 
RouboPrefe(playerid)
{
    
KillTimer(tempoprefe);
    if(!
IsACop(playerid))
    if(!
PlayerToPoint(8.0,playerid,947.1464,-41.6903,1001.1166))
    {
        
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o Puteiro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
RemovePlayerAttachedObject(playerid,4);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no Puteiro.");
        
ProvocoPrefe[playerid] = 0; roubando[playerid] = 0; rouboprefe = 0; KillTimer(tempoprefe); temporouboprefe = 0;
        
ClearAnimations(playerid);
        
KillTimer(TempoContagem[playerid]);
        return 
1;
    }
    
ForPlayers(i)
    {
        if(
PlayerToPoint(8.0,i,947.1464,-41.6903,1001.1166))
        if(!
IsACop(playerid))
        {
            if(
ProvocoPrefe[playerid] == 1)
            {
                
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre do Puteiro! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
roubando[playerid] = 0; rouboprefe = 0; ProvocoPrefe[playerid] = 0;
                
RemovePlayerAttachedObject(playerid,4);
                
KillTimer(TempoContagem[playerid]);
            }
            if(!
IsACop(i))
            {
                
SetPlayerCriminal(i,255, "Roubo ao Puteiro");
                
GivePlayerWeapon(i, 10, 1);
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram [R$:28000] do cofre do Puteiro!",NomeORG(playerid));
                
SendClientMessage(i, COLOR_YELLOW, gstring);
                
GivePlayerMoney(i, 28000);
                
ClearAnimations(i);
                
RemovePlayerAttachedObject(i,4);
            }
        }
    }
    return 
1;
} 
4parte
PHP код:
public Aroubo()
{
    
temporoubobanco = 0;
}
public 
Aroubo2()
{
    
temporoubolot = 0;
}
public 
Aroubo3()
{
    
temporouboloja1 = 0;
}
public 
Aroubo4()
{
    
temporouboloja2 = 0;
}
public 
Aroubo5()
{
    
temporouboprefe = 0;
}
public 
Aroubo6()
{
    
temporouboazk = 0;
}
public 
Aroubo7()
{
    
temporoubolotsf = 0;
}
public 
Aroubo8()
{
    
temporoubolotsf = 0;
} 
5 parte
PHP код:
//contagem de roubos
new Contagem[MAX_PLAYERS];
new 
TempoContagem[MAX_PLAYERS];
new 
EngineCarro[MAX_VEHICLES] = 0;
forward ContagemRoubo(playerid); 
contagens
PHP код:
public ContagemRoubo(playerid)
{
    new 
string[70];
    
format(string, sizeof(string), "~w~Tempo Para Roubar:~n~~r~%d Segundos.", Contagem[playerid]);
    
GameTextForPlayer(playerid, string, 1500, 3);
    if(
Contagem[playerid] == 0)
    {
        
KillTimer(TempoContagem[playerid]);
    }
    
Contagem[playerid]--;
} 
Detalhe so acontece isso com azkabam:azk
o resto funciona normal se algum souber resolver pf me ajuda ja perdi 2 madrugas tentando arrumar e nao consegui :/ +resp pra que ajudar


Re: [Ajuda] /Roubar nao para - 12utra - 27.06.2014

ninguem ae sabe arrumar?