damage based on body part doesnt lower hp!
#8

Code:
			{
         		switch(weaponid)
			 	{
				    case 22,23:
					{
					    switch(bodypart)
					 	{
							case 3,4: damage = 45.0;
							case 5..8: damage = 20.0;
							case 9: damage = 200.0;
						}
		    		}
                    case 24:
				 	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 70.0;
							case 5..8: damage = 35.0;
							case 9: damage = 200.0;
						}
                    }
       				case 25..27:
			   		{
		 	    		switch(bodypart)
					 	{
							case 3,4: damage = 90.0;
							case 5..8: damage = 50.0;
							case 9: damage = 200.0;
						}
				 	}
     				case 28,32:
				  	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 45.0;
							case 5..8: damage = 20.0;
							case 9: damage = 200.0;
						}
                    }
		          	case 29:
				  	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 55.0;
							case 5..8: damage = 30.0;
							case 9: damage = 200.0;
						}
                    }
	         		case 30:
				 	{
         				switch(bodypart)
					 	{
							case 3,4: damage = 65.0;
							case 5..8: damage = 40.0;
							case 9: damage = 200.0;
						}
                    }
		         	case 31:
				 	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 60.0;
							case 5..8: damage = 35.0;
							case 9: damage = 200.0;
						}
                    }
		         	case 33:
				 	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 80.0;
							case 5..8: damage = 40.0;
							case 9: damage= 200.0;
						}
                    }
		         	case 34:
				 	{
					    switch(bodypart)
					 	{
							case 3,4: damage = 100.0;
							case 5..8: damage = 60.0;
							case 9: damage = 200.0;
						}
                    }
                    default: danio = amount;
           		}
           		format(string, sizeof(string), "damage you received per shot: %f", damage);
				SendClientMessage(-1, playerid, string);
				format(string, sizeof(string), "Damage you've taken with the shot: %f", damage);
				SendClientMessage(-1, issuerid, string);
           		FadePlayerScreen(playerid, 0xE20000FF, 25);
			}
		}
It would be something like this, look, in each case there are the ID's of the weapons, you can find them also in the wiki-samp, look at damage to side would be the damage that would do and also in the part of the body that would give the same, bone I do not know if I explain myself because I do not know almost English, what I want to tell you, next to damage, is, bone, example

case 3,4: / * body part where it would give the damage * / damage = 100.0 // the damage it would do

it would be something like this, try to imagine something like fix it, if you have more doubts go to the priv and there we talk better

These are images of the parts of the body in which they are enabled.


sorry for the disorder of the code, what happens is that I made copy paste of a system that had kept here.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)