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



/roubar - Wendell - 09.10.2013

Quero fazer com que todos que esteja prуximo a quem deu o /roubar no final do roubo ganhe /su e o dinheiro .

PHP код:
public RouboBanco(playerid)
{
    
KillTimer(tempobanco);
    if(!
PlayerToPoint(8.0,playerid,2144.4177,1641.5360,993.5761))
    {
        
SendClientMessageToAll(COLOR_WHITE"(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
        
format(gstringsizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]"PlayerName(playerid), NomeORG(playerid), playerid);
           
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
           
GameTextForPlayer(playerid,"~r~Deu mole playboy..."25003);
           
Controle(playerid1);
           
ClearAnimations(playerid);
           
KillTimer(TempoContagem[playerid]);
        
SendClientMessage(playeridCOLOR_GREY"Vocк nгo estб no cofre do banco.");
        
ProvocoBanco[playerid] = 0roubando[playerid] = 0roubobanco 0KillTimer(tempobanco); temporoubobanco 0;
        return 
true;
    }
    for(new 
iMAX_PLAYERSi++)
    {
        new 
grana 10000 random(5000);
        if(
PlayerToPoint(10.0,i,2144.4177,1641.5360,993.5761))
        {
            if(
ProvocoBanco[playerid] == 1)
            {
                
SendClientMessageToAll(COLOR_WHITE"(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
                
format(gstringsizeof(gstring), "%s e os %s Conseguiram roubar o cofre do Banco ! ID:[%d]"PlayerName(playerid), NomeORG(playerid), playerid);
                
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
                
GameTextForPlayer(i,"~g~Vai~w~ !~n~~g~Vai~w~ !~n~~g~Vai~w~ !"25003);
                
Controle(playerid1);
                
ClearAnimations(playerid);
                
KillTimer(TempoContagem[playerid]);
                
roubando[playerid] = 0roubobanco 0ProvocoBanco[playerid] = 0;
                
SetPlayerCriminal(i,255"Assalto ao Banco");
                
GivePlayerMoney(igrana);
                
format(gstringsizeof(gstring), "Vocк e os %s roubaram R$%d do cofre do Banco!",NomeORG(playerid), grana);
                
SendClientMessage(iCOLOR_YELLOWgstring);
            }
        }
    }
    return 
true;




Respuesta: /roubar - DanDRT - 09.10.2013

use uma looping e a funзгo para ver se estгo na area.