Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Fleamonji on March 26, 2011, 06:37:51 AM

Title: Hooking with "noclip"
Post by: Fleamonji on March 26, 2011, 06:37:51 AM
I was looking at the code for noclip, but I can't seem to figure out how I would allow admins to just use the "noclip" command, instead of "ulx noclip" or "!noclip"
Title: Re: Hooking with "noclip"
Post by: Aaron113 on March 26, 2011, 06:54:46 AM
Gamemode.PlayerNoClip (http://wiki.garrysmod.com/favicon.ico) (http://wiki.garrysmod.com/?title=Gamemode.PlayerNoClip)

Just do something simple like if ply:IsAdmin() then.

I'm assuming you have noclip disabled and your Admins use ulx noclip?
Title: Re: Hooking with "noclip"
Post by: Fleamonji on March 26, 2011, 07:31:44 AM
Gamemode.PlayerNoClip (http://wiki.garrysmod.com/favicon.ico) (http://wiki.garrysmod.com/?title=Gamemode.PlayerNoClip)

Just do something simple like if ply:IsAdmin() then.

I'm assuming you have noclip disabled and your Admins use ulx noclip?

I have that now, but some admins are too dumb to have noclip privileges.  I'm using Evolve now, but I'm ready to switch.
Title: Re: Hooking with "noclip"
Post by: JamminR on March 26, 2011, 08:30:23 AM
With ULX, you could create a AdminNoNoclip group, allow all the same ulx permissions as admin, except for the ulx noclip, and change the test to return true if they aren't an AdminNoNoclip
return !ply:IsUserGroup("AdminNoNoclip")

(Though, I could have sworn returning anything such as false breaks a hook for all others. Yet, the wiki says a boolean is returned...team, has this changed or is it different for this hook?)