turret:SetDamageOwner(ply)
function ENT:GiveHealth(ply) local dmg = ply:GetMaxHealth() - ply:Health() local healed = self:TakeFromStorage(math.min(self.MaxHeal, dmg)) ply:TakeDamage(40, self.Owner(), self) self:EmitSound(healsound) if not table.HasValue(self.fingerprints, ply) then table.insert(self.fingerprints, ply) endend
function ENT:GiveHealth(ply) local dmg = ply:GetMaxHealth() - ply:Health() local healed = self:TakeFromStorage(math.min(self.MaxHeal, dmg)) ply:TakeDamage(40, self.Owner()) self:EmitSound(healsound) if not table.HasValue(self.fingerprints, ply) then table.insert(self.fingerprints, ply) endend
function ENT:GiveHealth(ply) local dmg = ply:GetMaxHealth() - ply:Health() local healed = self:TakeFromStorage(math.min(self.MaxHeal, dmg)) ply:TakeDamage(40, self.GetOwner(), self) self:EmitSound(healsound) if not table.HasValue(self.fingerprints, ply) then table.insert(self.fingerprints, ply) endend
local healsound = Sound("items/medshot4.wav")local failsound = Sound("items/medshotno1.wav")function ENT:GiveHealth(ply) if self:GetStoredHealth() > 0 then local dmg = ply:GetMaxHealth() - ply:Health() if ply:Health() < 31 then ply:TakeDamage(31,self:GetOwner(),self) else -- constant clamping, no risks local healed = self:TakeFromStorage(25) local new = math.min(ply:GetMaxHealth(), ply:Health() - healed) ply:TakeDamage(new,self:GetOwner(),self) self:EmitSound(healsound) end endend
hook.Add("PlayerDeath", "Kill and RDM Checker", function(vic, infl, att) if (vic.was_headshot == true) then print("Headpop Debug OK!") local rag = vic.server_ragdoll rag:SetNetworkedInt( "InflateSize"..rag:LookupBone("ValveBiped.Bip01_Head1"), -100 ) endend