Restricting groups



if CLIENT then
     if !client:IsUserGroup( "moderator" ) && !client:IsUserGroup( "sadmin" ) && !client:IsUserGroup( "superadmin" )  && !client:IsUserGroup( "admin") then return end


///code
end


Why not work?

Do you want help or something?

I am wondering why is not working

What is it supposed to do?

What would the code that used for the following specific groups

it checks if a user is ALL of these groups, not ONE replace && with or

Honestly got no idea what you want from this code, but try this:
[lua]
if CLIENT then
local ply = LocalPlayer()
if not (ply:IsUserGroup(‘moderator’) or ply:IsUserGroup(‘sadmin’) or ply:IsUserGroup(‘superadmin’) or ply:IsUserGroup(‘admin’)) then return end
//code
end
[/lua]
Please keep in mind that a hacker using clientside lua could bypass this

Just go to the ULX page and ask for help from the administrators. Ulx is kinda buggy these days with the hole who can pickup who and do what to who. It’s kinda broken so you have to add it in the main frame of the files and not just do it in game.


(User was permabanned for this post ("alt of banned user" - NiandraLades))

You clearly dont understand Lua, ULX is not broken, and it has nothing to do with ulx – usergroups exist without ulx, he only made the script wrong, as stated on my last post.

ULX is buggy not broken. That is if you try to do it in game. The hole !%admin stuff.

You’ve been banned from facepunch twice already you now make a third alt and continue to spew out garbage. Please stop half the time you have no idea what you are are talking about. ULX is not buggy plenty of people use it fine.

[editline]1st February 2016 at 11:37AM[/editline]

Haha, and once again he has been banned. Can’t wait to see what he chooses for his next alt account.

Ulx aint buggy at all, the !%admin works fine for me, its just you using it wrong, most people - specially skids - dont understand the ULX hirachy.