[Ajuda] /roubar
#1

Seguinte, to com um problema aqui, quando o player estб roubando , se vocк atirar nele, ele nгo perde a vida. Alguem poderia me ajudar?

Code:

Код HTML:
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
		&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
		&& GetPlayerOrg(playerid) != 13	&& GetPlayerOrg(playerid) != 15
		&& GetPlayerOrg(playerid) != 23)
	    {
			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);
            SetTimerEx("AnimRouboBanco", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
        	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;
		}
		else if(PlayerToPoint(2.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 true;
	    	}
	    	if(temporoubolot == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre da Lotйrica espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto а Lotйrica{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre da Lotйrica! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 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;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 820.9382,8.4020,1004.1957);
            SetPlayerFacingAngle(playerid,91.2409);
            SetTimer("Aroubo2", 220000, 0);
        	tempolot = SetTimerEx("RouboLot", 40000, 0, "i", playerid);
         	SetTimerEx("AnimRouboLot", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}
		else if(PlayerToPoint(2.0,playerid,303.9740,-168.8060,999.5938))
		{
	    	if(rouboloja1 == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa loja.");
	    		return true;
	    	}
	    	if(temporouboloja1 == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Loja de Armas 1 espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto а Loja de Armas{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar a Loja de Armas 1! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 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;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 303.9886,-169.0725,999.5938);
            SetPlayerFacingAngle(playerid,178.6149);
            SetTimer("Aroubo3", 220000, 0);
        	tempoloja1 = SetTimerEx("RouboLoja1", 40000, 0, "i", playerid);
         	SetTimerEx("AnimRouboLoja", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}
		else if(PlayerToPoint(2.0,playerid,294.8272,-57.8448,1001.5156))
		{
	    	if(rouboloja2 == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa loja.");
	    		return true;
	    	}
	    	if(temporouboloja2 == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Loja de Armas 1 espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto а Loja de Armas 2{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar a Loja de Armas 2! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 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;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 294.8029,-57.8727,1001.5156);
            SetPlayerFacingAngle(playerid,356.5900);
            SetTimer("Aroubo4", 220000, 0);
        	tempoloja2 = SetTimerEx("RouboLoja2", 40000, 0, "i", playerid);
         	SetTimerEx("AnimRouboAmmu", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}
		//========== BINCO ==================================================================================
		    else if(PlayerToPoint(2.0,playerid,211.3917,-96.1839,1005.2578))
		    {
	    	if(roubobinco == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa Loja de Roupas.");
	    		return true;
	    	}
	    	if(temporoubobinco == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Binco espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto а Binco{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar a Binco ! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 segundos para terminar de roubar a Binco.");
			SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Loja de Roupas");
            roubando[playerid] = 1;
            ProvocoBinco[playerid] = 1;
            roubobinco = 1;
            temporoubobinco = 1;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 211.3817,-96.1272,1005.2578);
            SetPlayerFacingAngle(playerid,2.5667);
            SetTimer("Aroubo6", 220000, 0);
        	tempobinco = SetTimerEx("RouboBinco", 40000, 0, "i", playerid);
         	SetTimerEx("AnimRouboBinco", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}
		//================= Puteiro =========================================================================
  			else if(PlayerToPoint(2.0,playerid,947.4235,-41.5715,1001.1166))
		    {
	    	if(rouboputeiro == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa Loja de Roupas.");
	    		return true;
	    	}
	    	if(temporouboputeiro == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o Puteiro espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto ao Puteiro{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar o Puteiro ! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 segundos para terminar de roubar o Puteiro.");
			SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Puteiro");
            roubando[playerid] = 1;
            ProvocoPuteiro[playerid] = 1;
            rouboputeiro = 1;
            temporouboputeiro = 1;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 947.4235,-41.5715,1001.1166);
            SetPlayerFacingAngle(playerid,269.5058);
            SetTimer("Aroubo7", 220000, 0);
        	tempoputeiro = SetTimerEx("RouboPuteiro", 40000, 0, "i", playerid);
         	SetTimerEx("AnimRouboPuteiro", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}

		//================= VICTIM =========================================================================
  			else if(PlayerToPoint(2.0,playerid,205.4029,-11.5629,1005.2109))
		    {
	    	if(roubovictim == 1)
	    	{
	   			SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nessa Loja de Roupas.");
	    		return true;
	    	}
	    	if(temporoubovictim == 1)
	    	{
	   			SendClientMessage(playerid,COLOR_GREY,"Jб roubaram a Victim espere 3 minutos para roubar de novo !");
	    		return true;
	    	}
			GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
			//SendClientMessageToAll(COLOR_WHITE, "                                   {FFD700}Assalto а Victim{BFC0C2}                                   ");
            format(string, sizeof(string), "%s e os %s estгo tentando roubar a Victim ! ID:[%d]", playername, NomeORG(playerid) , playerid);
			SendClientMessageToAll(GetPlayerColor(playerid), string);
			SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 segundos para terminar de roubar a Victim.");
			SetPlayerCriminal(playerid,255, "Tentativa de Roubo a Loja de Roupas");
            roubando[playerid] = 1;
            ProvocoVictim[playerid] = 1;
            roubovictim = 1;
            temporoubovictim = 1;
            Controle(playerid, 0);
            SetPlayerPos(playerid, 205.4959,-11.5585,1005.2109);
            SetPlayerFacingAngle(playerid,90.3009);
            SetTimer("Aroubo8", 220000, 0);
            SetTimerEx("AnimRouboVictim", 900, 0, "i", playerid);
            ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
           	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;
		}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Vocк nгo esta em um local de assalto !");
				return true;
			}
		//return true;
Reply


Messages In This Thread
/roubar - by Amt. - 25.09.2012, 17:59

Forum Jump:


Users browsing this thread: 1 Guest(s)