[Ajuda] Grana de Roubo
#1

Olб pessoal

Quando meu personagem rouba, ninguem que estб ao redor ganha dinheiro.
Eu queria que todos que estivesse do lado ganhasse dinheiro e 3 estrelas de procura tambem.

Obs: Eu estou procurando isso a um bom tempo, jб tentei de tudo mas nada me ajudou.

Код:
if(strcmp(cmd,"/roubar",true)==0)
	{
	    if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
		&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
		&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
		&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
		&& 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][pLider] != 24
		&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
		&& GetPlayerOrg(playerid) != 13	&& GetPlayerOrg(playerid) != 15)
	    {
			SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar !");
            return true;
		}
		if(roubando[playerid] == 1)
	    {
	   		SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
	    	return true;
    	}
		if(PlayerToPoint(2.0,playerid, 2144.4177,1641.5360,993.5761))
		{
	    	if(roubobanco == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
	    		return true;
	    	}
	    	if(temporoubobanco == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre banco! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 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;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 2144.3711,1641.4792,993.5761);
            SetPlayerFacingAngle(playerid,1.2666);
            SetTimer("Aroubo", 220000, 0);
            RoubarThiagoAnim = SetTimerEx("AnimRouboBanco", 900, 0, "i", playerid);
        	tempobanco = SetTimerEx("RouboBanco", 40000, 0, "i", playerid);
        	SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.313611, 0.021003, 0.445490, 86.754409, 355.370239, 0.926815, 1.000000, 1.000000);
        	SetTimerEx("AcabarMochila", 120000, 0, "i", playerid);
        	return true;
		}
Reply
#2

@DesculpeODouble

Mas ninguem vai me ajudar ? й uma ajuda importante, porque eu sou um de vбrios que estгo perguntando isso.
Mas atй agora ninguem conseguiu.


Obrigado.
Reply
#3

Passa quando ele recebe a grana
Reply
#4

Код:
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);
       	KillTimer(RoubarThiagoAnim);
       	ClearAnimations(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;
    }
	ForPlayers(i)
	{
		new grana = 800 + random(3000);
		if(PlayerToPoint(10.0,i,2144.4177,1641.5360,993.5761))
		{
		    new var032=0;
			if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
			else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
			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(playerid,"~g~Vai~w~ !~n~~g~Vai~w~ !~n~~g~Vai~w~ !", 2500, 3);
            	Controle(playerid, 1);
            	KillTimer(RoubarThiagoAnim);
            	ClearAnimations(playerid);
            	roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
			}
			if (PlayerInfo[i][pLider] == var032 || PlayerInfo[i][pMembro] == var032)
			{
				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
#5

me ajudem... por favor
Reply
#6

pawn Код:
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);
        KillTimer(RoubarThiagoAnim);
        ClearAnimations(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 = 0; i < MAX_PLAYERS; i++)
    {
        new grana = 800 + random(3000);
        if(PlayerToPoint(10.0,i,2144.4177,1641.5360,993.5761))
        {
            new var032=0;
            if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
            else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
            if(ProvocoBanco[i] == 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);
                KillTimer(RoubarThiagoAnim);
                ClearAnimations(playerid);
                roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
            }
            if (PlayerInfo[i][pLider] == var032 || PlayerInfo[i][pMembro] == var032)
            {
                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;
}
Tenta assim...
Reply
#7

Estou esperando um amigo para testar, em seguida virei dizer se funcionou !
Reply
#8

aki deu certo,
mas tipo como coloco ele no roubo inteiro tipo:
Tempo: 60
59
58
57
atй zerar
Reply
#9

olha o meu outro tуpico, o cara respondeu la jб.
Reply
#10

Obrigado Felipe_Freeze por responder este tуpico e o outro do TEMPO ROUBO. os 2 funcionaram !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)