• This hook doesn't seem to work for me
    2 replies, posted
I have a sandbox server and I am coding stuff on there to learn coding but players can still join, and some of them asked me to make an buildmode addon. If the player says !buildmode he gets godmode and it tells him that he has godmode now. But this hook doesn't seem to work. [url]http://wiki.garrysmod.com/page/GM/PlayerShouldTakeDamage[/url] Here is the code [LUA] hook.Add("GM:PlayerShouldTakeDamage","ReturnDamageTaker",function(ply,attacker) if(attacker:HasGodMode()) then return false else return true end end) [/LUA]
Well thats sad, I thought about that but them I thought it should work. Thanks it works now :)
Sorry, you need to Log In to post a reply to this thread.