ULX

Author Topic: How to make it so players can only ulx noclip if they are a certain job?  (Read 3290 times)

0 Members and 1 Guest are viewing this topic.

Offline Taylorr<3/only.fans

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
First, ignore my name its a joke. So I have ulx usergroups for tmods, moderators, and modplus and I want to know how to only allow them to (ulx) noclip themselves when they are playing as the job I made called "Moderator on Duty". Basically I want my staff members to also be able to roleplay but I dont wanna have to risk them abusing their noclip powers during rp. I don't want them to be able to toggle noclip on others just themselves. Keep in mind I don't mean the Sandbox noclip, I mean the ulx noclip. I tried the sandbox one and I had too many problems with it. Here is the code I tried with the sbox noclip:

adminJobs = {["TEAM_MODERATOR"] = true}
hook.Add( "PlayerNoClip", "noclipThing", function( ply )return ply:Team() == TEAM_MODERATOR
end )
hook.Add("PlayerShouldTakeDamage", "godmodeAdmin", function(ply, ent)returnnot (ply:Team() == TEAM_MODERATOR)
end)

« Last Edit: July 04, 2020, 09:24:34 AM by Taylorr<3/only.fans »

Offline Taylorr<3/only.fans

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
That script I added also has godmode with it

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given