Does anyone know where I can get an addon so that whenever a person is godded, they cannot kill anyone else?
(extras)
this part is not needed, but would be nice.
I'd like it so that if they DO try to kill someone else, it punishes them and lets everyone else know what they tried to do.
You could do something like this, not sure if my code is entirely accurate
[code]
function GM:ScalePlayerDamage( ply, hitgroup, dmginfo )
local _attacker = dmginfo:GetAttacker()
if(_attacker:IsPlayer() && _attacker:HasGodMode()) then
dmginfo:SetDamage(0)
_attacker:ViewPunch( Angle( -10, 0, 0 ) )
--PrintMessage(HUD_PRINTTALK, _attacker:Name() .. " attacked somebody with God Mode enabled")
end
end
[/code]