I’ve been wanting to give access to the murder panel for different ULX groups and have been running into a lot of problems with it lately.
The murder panel code is in the original cl_adminpanel.lua file in the murder game mode, which can be found here: murder/cl_adminpanel.lua at master · MechanicalMind/murder · GitHub
Here’s the code I currently have:
First groupcheck (line 34-39):
if showAdmins && (ply:IsUserGroup( "owner" ) || ply:IsUserGroup( "moderator" ) || ply:IsAdmin ()) then surface.SetMaterial(admin) surface.SetDrawColor(color_white) surface.DrawTexturedRect(s + 4, h / 2 - 16, 32, 32) s = s + 32 end
Second groupcheck (line 203-204):
concommand.Add("mu_adminpanel", function (client) if !client:IsUserGroup( "owner" ) || !client:IsUserGroup( "moderator" ) || !client:IsAdmin() then return end
I believe something’s wrong with the second line check, because when I first changed line 34 and nothing else, the command was still working for admins, but not for moderators. After I added the second check, it stopped working for every ULX group.
I’ve heard something about adding the command as a ULX command, or somesort, and granting privledges to them, but I’m kind of confused with that.
I’d appreciate any help given. This is really giving me a headache. Thanks!