09.10.2016, 18:58
Hi, I'm creating custom damages right now, but the problem is when I shoot any bodyparts that shouldn't take armor, but health straightly are killing the player instantly. Headshot is supposed to be instant kill though (100 damage) and legs and arms are supposed to take a little bit less damage. I printed the damages and the damages are like 100000000000. It works good if I shoot bodyparts that take armor though. This is what I got under OnPlayerGiveDamage:
What's up?
Код:
switch (weaponid) { case 22: amount = 30; case 23: amount = 40; case 24: amount = 50; case 25: amount += 25; case 26: amount += 20; case 27: amount += 30; case 28: amount = 25; case 29: amount = 30; case 30: amount = 45; case 31: amount = 40; case 32: amount = 25; case 33: amount = 60; case 34: amount = 80; case 38: amount = 65; } switch (bodypart) { case 9: amount = 100; case 5, 6: amount -= 10; case 7, 8: amount -= 15; }