when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too
#1

i created script like this
Код:
CMD:plant(playerid, params[])
{
   if(PlayerInfo[playerid][pBombAccess] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "you need access if you want to use c4, go to electronic shop near pizza");
   {
	  if(!IsPlayerInAnyVehicle(playerid))
	  {
         new Float:X, Float:Y, Float:Z;
	     GetPlayerPos(playerid, X, Y, Z);
	     ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
         bom = CreateObject(1252, X, Y, Z-1, 0.0, 0.0, 90.0);
         bactv[bom] = 1;
         SetObjectRot(bom, 901, 270, 270);
         SetTimerEx("SOUND1", 1000, false, "i", playerid);
      }
      else
      {
		 SendClientMessage(playerid, 0xFFFFFFFF, "you need to be on foot to plant bomb!");
	  }
   }
   return 1;
}
and when i plant 2 bomb, and then defuse it, my bomb number 1 got defused too
defuse cmd
Код:
CMD:def(playerid, params[])
{
   new Float:X, Float:Y, Float:Z;
   GetObjectPos(bom,X,Y,Z);
   if (!IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z)) return SendClientMessage(playerid, 0xFFFFFFFF, "there is no bomb on range, you maybe need to get closer to the bomg or there is no bomb near you!");
   {
	  if(bactv[bom] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "The Bomb is not Active!");
	  {
		 if(!IsPlayerInAnyVehicle(playerid))
		 {
            ShowPlayerDialog(playerid, 7355, DIALOG_STYLE_INPUT, "Bomb Defuse!", "Enter Password To Defuse Bomb!!!!", "Defuse!", "RIP");
            TogglePlayerControllable(playerid,0);
         }
         else
         {
			SendClientMessage(playerid, 0xFFFFFFFF, "you need to be on foot to defuse bomb!");
		 }
	  }
   }
   return 1;
}
can anyone help me fix this?
Reply


Messages In This Thread
when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too - by MiyuUchiha - 10.07.2017, 06:43
Re: when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too - by jlalt - 10.07.2017, 06:55
Re: when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too - by coool - 10.07.2017, 06:55
Re: when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too - by MiyuUchiha - 10.07.2017, 06:59

Forum Jump:


Users browsing this thread: 1 Guest(s)