DARKRP Moderator on Duty help
Last read Never
I need help with darkrp, I need it so admins and trial moderators can only use noclip when they have the job of Moderator on Duty "TEAM_MOD"
hook.Add("PlayerNoClip", "modchecknoclipthing", function(ply, desiredState)
if(ply:Team() == TEAM_MOD) then return true end -- only allow them if they're the moderator job
end)
Throw that in a lua file inside garrysmod/lua/autorun/server
(Edited to include BullyHunter's correction, good catch xx)
^ will cause conflicts with other hooks.
if (ply:Team() == TEAM_MOD) then return true end
is better than
return ply:Team() == TEAM_MOD
Users viewing this thread
Nobody