• No Damage God Mode
    2 replies, posted
I was curious to know if there was any sort of addon out there that prevented people from damaging other players while they using God mode. I've been trying to look for some manner of script that is capable of doing this, but haven't found anything so far. Thanks.
Untested: [CODE]local PMETA = FindMetaTable("Player") function PMETA:IsGod() return self:GetNWBool("GodMode") end function PMETA:SetGod() if SERVER then if !self:IsGod() then self:GodEnable() self:SetNWBool("GodMode",true) else self:GodDisable() self:SetNWBool("GodMode",false) end end end hook.Add("PlayerShouldTakeDamage","DisableDamageFromGod",function(vic,atk) if atk:IsGod() then return false end end)[/CODE] Just use Player:SetGod() to enable and disable via lua.
Didn't seem to work for me, though I probably set it up wrong.
Sorry, you need to Log In to post a reply to this thread.