Hey! I have a server running DarkRP... Now, there's a command that allows players who have access to it to name the job to whatever they want. (Example: /job SuckOnMyD*ck) ... This is available to anyone, so someone could simply put "/job Admin on Duty" and impersonate an Admin! I really need this fixed(Or if it's supposed to be like this, I need it's access to everyone deleted, and only available to Administrators+) Please help!
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/jobs/sh_commands.lua[/url]
Modify the job condition to only allow those who have permission to use it.
Would I replace this:
[CODE]condition = fn.Compose{fn.Not, plyMeta.isArrested}[/CODE]
With this?:
[CODE]condition = fn.Compose{fn.Not, plyMeta.hasDarkRPPrivilege), 1)("rp_commands")[/CODE]
Assuming you're using DarkRP 2.5 and that you're using the dakrpmodification addon to customize DarkRP, acess the following file:
garrysmod/addons/darkrpmodification/lua/darkrp_config/settings.lua
inside it, look for
[CODE]-- allow people getting their own custom jobs
GM.Config.allowjobswitch = true[/CODE]
and set GM.Config.allowjobswitch to false, like that:
[CODE]GM.Config.allowjobswitch = false[/CODE]
That will block the player from using /job Super Admin Rocking Around.
Thanks mate! I really appreciate it!
Sorry, you need to Log In to post a reply to this thread.