How about PENT makes you take half damge...or better yet, quarter damage...quad damage's inverse.

/* =============================================================================== ARMOR =============================================================================== */ void() armor_touch; void() armor_touch = { local float type, value, bit; if (other.health <= 0) return; if (other.classname != "player") return; if (self.classname == "item_armor1") { [COLOR="Yellow"]type = 0.3;[/COLOR] value = 100; bit = IT_ARMOR1; } if (self.classname == "item_armor2") { [COLOR="Yellow"]type = 0.6;[/COLOR] value = 150; bit = IT_ARMOR2; } if (self.classname == "item_armorInv") { [COLOR="Yellow"]type = 0.8;[/COLOR] value = 200; bit = IT_ARMOR3; } if (other.armortype*other.armorvalue >= type*value) return; other.armortype = type; other.armorvalue = value; other.items = other.items - (other.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3)) + bit; self.solid = SOLID_NOT; self.model = string_null; if (deathmatch == 1) self.nextthink = time + 20; self.think = SUB_regen; sprint(other, "You got armor\n"); // armor touch sound sound(other, CHAN_ITEM, "items/armor1.wav", 1, ATTN_NORM); stuffcmd (other, "bf\n"); activator = other; SUB_UseTargets(); // fire all targets / killtargets };
Comment