[Ajuda] /roubar
#1

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(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);
           
GameTextForPlayer(playerid,"~r~Deu mole playboy...", 2500, 3);
           
Controle(playerid, 1);
           
ClearAnimations(playerid);
           
KillTimer(TempoContagem[playerid]);
        
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
        
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
        return 
true;
    }
    for(new 
i; i < MAX_PLAYERS; i++)
    {
        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(gstring, sizeof(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~ !", 2500, 3);
                
Controle(playerid, 1);
                
ClearAnimations(playerid);
                
KillTimer(TempoContagem[playerid]);
                
roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
                
SetPlayerCriminal(i,255, "Assalto ao Banco");
                
GivePlayerMoney(i, grana);
                
format(gstring, sizeof(gstring), "Vocк e os %s roubaram R$%d do cofre do Banco!",NomeORG(playerid), grana);
                
SendClientMessage(i, COLOR_YELLOW, gstring);
            }
        }
    }
    return 
true;
} 
Reply
#2

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


Forum Jump:


Users browsing this thread: