• I need a suggestion to a god mode add-on.
    6 replies, posted
Hi and thank you for reading this, I was currently frustrated with trying to find a add-on that I've seen back in my day on many servers on the old GMod where when you spawn, you have god mode and any weapon you take out stops the god mode, anyone know what I am talking about? I need the add-on name or link. Whatever information I can get to it.
[url]http://wiki.garrysmod.com/page/Player/GodEnable[/url] [url]http://wiki.garrysmod.com/page/GM/PlayerSwitchWeapon[/url]
GodEnable is a buggy system. I'd recommend just hooking into ScalePlayerDamage and GetFallDamage hooks; if GodMode is enabled, then scale damage to 0, and return 0 in the fall-damage hook. With GodEnable/GodDisable, if you die with god-mode enabled, god-mode won't work until you disable, and re-enable, it in the new life.
The problem is that I'm looking for a simple solution add-on, I have a full time job besides managing the server and I don't have the time to code from scratch. If you know of an add-on that enables god until weapon drawn or a simple !god issue command for players that'd be great.
Heres a code I found for it in ULX form if thats what youre looking for: [lua] function ulx.god( calling_ply, target_plys, should_revoke ) if not target_plys[ 1 ]:IsValid() then if not should_revoke then Msg( "You're not a person..\n" ) else Msg( "Your position of god is irrevocable; if you don't like it, leave the matrix.\n" ) end return end local affected_plys = {} for i=1, #target_plys do local v = target_plys[ i ] if ulx.getExclusive( v, calling_ply ) then ULib.tsayError( calling_ply, ulx.getExclusive( v, calling_ply ), true ) else if not should_revoke then v:GodEnable() v.ULXHasGod = true else v:GodDisable() v.ULXHasGod = nil end table.insert( affected_plys, v ) end end end [/lua]
Nice code but you'll need ULX engine to run it, no? I'm using Evolve
[QUOTE=trex53;46296493]Nice code but you'll need ULX engine to run it, no?[/QUOTE] I just kinda assumed new server owners use it... With a few quick edits you could probably use it with evolve and work the same way
Sorry, you need to Log In to post a reply to this thread.