SA-MP Forums Archive
[ajuda] Sistema de Roubo - 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] Sistema de Roubo (/showthread.php?tid=336018)



[ajuda] Sistema de Roubo - victor_thug - 20.04.2012

boa tarde pessoal, queria saber se vocкs podem me ajudar nesse cmd de /roubar, no inicio estб tudo bom, mas ele nao esta recebendo a grana apуs o 1 minuto que manda esperar. eu percebi que pode ser porque nao tem nada relacionado com o tempodoroubo. alguem pode me ajuda com isso? plx.

PHP код:
//-------------------------[Rob command]---------------------
    
if(strcmp(cmd"/roubar"true) == 0)
    {
        if(
ChegaPorra[playerid] == 1) return SendClientMessage(playerid, -1"Jб estб acontecendo um roubo. espere o proximo Payday");
        if(
PlayerInfo[playerid][pLider] == || PlayerInfo[playerid][pMembro] == ||PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15 || PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 19 || PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23
        
|| PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13 || PlayerInfo[playerid][pMembro] == 21 || PlayerInfo[playerid][pLider] == 21 || PlayerInfo[playerid][pMembro] == 24 || PlayerInfo[playerid][pLider] == 24 || PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20 || PlayerInfo[playerid][pMembro] == 22 || PlayerInfo[playerid][pLider] == 22)
        {
                   if(
PlayerToPoint(1.0playerid2310.2939,-5.3806,26.7422))
                {
                     if(
PlayerInfo[playerid][pRoubarB] == 1)
                    {
                        
SendClientMessage(playeridCOLOR_YELLOW"Vocк nгo pode roubar banco em sequкncia, tente apуs o PayDay.");
                    }
                    if(
PlayerInfo[playerid][pRoubarB] == 0)
                      {
                        
SendClientMessage(playeridCOLOR_YELLOW"Aguarde, Espere 1 Minuto Para Roubar o Banco.");
                        
TempoDeExplodirN SetTimerEx("TempoDeExplodir"50000"i"playerid);
                        
ApplyAnimation(playerid"BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
                        for(new 
0MAXPLAYERSi++)
                        {
                           
ChegaPorra[i] = 1;
                        }
                    }
                }
                else if(
PlayerToPoint(2.0playerid,-34.6726,-57.1421,1003.5469))
                   {
                    if(
PlayerInfo[playerid][pRoubarB] == 1)
                    {
                        
SendClientMessage(playeridCOLOR_YELLOW"Vocк nгo pode roubar a 24/7 em sequкncia, tente apуs o PayDay.");
                    }
                    if(
PlayerInfo[playerid][pRoubarB] == 0)
                      {
                          for(new 
0MAXPLAYERSi++)
                        {
                               
ChegaPorra[i] = 1;
                         }
                        
SendClientMessage(playeridCOLOR_YELLOW"O cofre irб explodir em 5 segundos!");
                        
TempoDeExplodirN2 SetTimerEx("TempoDeExplodir"50000"i"playerid);
                    }
                }
                else if(
PlayerToPoint(2.0playerid,2144.2505,1641.7352,993.5761))
                {
                     if(
PlayerInfo[playerid][pRoubarB] == 1)
                    {
                        
SendClientMessage(playeridCOLOR_YELLOW"Vocк nгo pode roubar o cassino em sequкncia, tente apуs o PayDay.");
                    }
                    if(
PlayerInfo[playerid][pRoubarB] == 0)
                      {
                          for(new 
0MAXPLAYERSi++)
                        {
                            
ChegaPorra[i] = 1;
                         }
                        
//ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
                         
SendClientMessage(playeridCOLOR_YELLOW"O cofre irб explodir em 5 segundos!");
                        
TempoDeExplodirN3 SetTimerEx("TempoDeExplodir"50000"i"playerid);
                    }
                }
                else if(
PlayerToPoint(2.0playerid,820.9343,9.3362,1004.1957))
                {
                     if(
PlayerInfo[playerid][pRoubarB] == 1)
                    {
                        
SendClientMessage(playeridCOLOR_YELLOW"Vocк nгo pode roubar a loterica em sequкncia, tente apуs o PayDay.");
                    }
                    if(
PlayerInfo[playerid][pRoubarB] == 0)
                      {
                          for(new 
0MAXPLAYERSi++)
                        {
                            
ChegaPorra[i] = 1;
                         }
                        
//ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
                         
SendClientMessage(playeridCOLOR_YELLOW"O cofre irб explodir em 5 segundos!");
                        
TempoDeExplodirN4 SetTimerEx("TempoDeExplodir"50000"i"playerid);
                    }
                }
        }
        return 
1;
    } 
PHP код:
public TempoDoRoubar(playerid)
{
    new 
string [128];
    new 
dinheiro random(sizeof(DinheiroRoubo));
    
GetPlayerName(playeridsendernamesizeof(sendername));
    if(
PlayerToPoint(2.0playerid,820.9343,9.3362,1004.1957) || PlayerToPoint(2.0playerid,2310.2939,-5.3806,26.7422) || PlayerToPoint(2.0playerid,-34.6726,-57.1421,1003.5469) || PlayerToPoint(2.0playerid,2144.2505,1641.7352,993.5761))
    {
        
ClearAnimations(playerid);
        
SendClientMessage(playeridCOLOR_YELLOW"Vocк foi visto pelas cвmeras! Seja esperto, FUJA!");
        
format(string,sizeof(string), "* %s consegue pegar o dinheiro do cofre com sucesso."sendername);
        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        
format(stringsizeof(string), "** Vocк teve sucesso, roubados R$%d!",DinheiroRoubo[dinheiro]);
        
SendClientMessage(playerid,COLOR_YELLOW,string);
        
GivePlayerMoneyEx(playeridDinheiroRoubo[dinheiro]);
        
KillTimer(TempoRoubarN);
        
KillTimer(TempoDeExplodirN);
        
PlayerInfo[playerid][pRoubarB] = 1;
        for(new 
0MAXPLAYERSi++)
        {
            
ChegaPorra[i] = 0;
        }
        
//KillTimer(VoltarcofrefN);
        //KillTimer(VoltarcofreaN);
        //OnPlayerCommandText(playerid,"/criarcofrebanco");
    
}
    return 
1;




Re: [ajuda] Sistema de Roubo - KinX - 20.04.2012

Posta a public "TempoDeExplodir"