25% Chance to Headshot
#1

That's something that I added on OnPlayerTakeDamage, I want a headshot to be succesful with a sniper but with any other weapon it must have a 25% to success or else it will miss the shot, but it seems that one shot with a weapon kills the player.

Код:
new rando;
	if(bodypart == BODY_PART_HEAD)
	{
	    if(weaponid == 34)
	    {
		   	SetPlayerHealth(playerid, 0);
	    }
	   	else
	   	{
			rando = random(3);
			switch(rando)
			{
			    case 0, 1, 2:
				{
					return 0;
				}
			    case 4:
				{
					SetPlayerHealth(playerid, 0);
			    }
			}
		}
	}
	if(bodypart == BODY_PART_RIGHT_ARM)
	{
	 	SetPlayerArmedWeapon(playerid, 0);
	}
Reply


Messages In This Thread
25% Chance to Headshot - by dionisak0s - 31.05.2015, 12:30
Re: 25% Chance to Headshot - by SoFahim - 31.05.2015, 12:58
Re: 25% Chance to Headshot - by Sellize - 31.05.2015, 13:05
Re: 25% Chance to Headshot - by dionisak0s - 31.05.2015, 23:00
Re: 25% Chance to Headshot - by SickAttack - 31.05.2015, 23:47
Re: 25% Chance to Headshot - by dionisak0s - 04.06.2015, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)