Hi, I have the latest Ulib and ULX SVNs, and I want to make it so admins can physgun each other and below, but not physgun superadmins.
I added "!%superadmin" after the "ulx physgunplayer" access for their group, in data/ULib/groups.txt. Yet admins can still physgun anyone including superadmins.
I checked the hook for this, at the end of "lua\ulx\modules\sh\util.lua", and I think it might still be checking for the old immunity.
--------------------
-- Hooks --
--------------------
local function playerPickup( ply, ent )
if ent:GetClass() == "player" and ULib.isSandbox() and ULib.ucl.query( ply, "ulx physgunplayer" ) and not ent.NoNoclip and (not ULib.ucl.query( ent, ULib.ACCESS_IMMUNITY ) or ULib.ucl.query( ply, "overcomeimmunity" )) then
ent:SetMoveType( MOVETYPE_NONE ) -- So they don't bounce
return true
end
end
hook.Add( "PhysgunPickup", "ulxPlayerPickup", playerPickup, -5 ) -- Allow admins to move players. Call before the prop protection hook.
if SERVER then ULib.ucl.registerAccess( "ulx physgunplayer", ULib.ACCESS_ADMIN ) end
local function playerDrop( ply, ent )
if ent:GetClass() == "player" then
ent:SetMoveType( MOVETYPE_WALK )
end
end
hook.Add( "PhysgunDrop", "ulxPlayerDrop", playerDrop )
I've attached my groups.txt.