i want to know how to make jobs on darkrp that are only accessible with certain jobs
example: Admin On Duty(only admins can access it)
can someone tell me the code?
thanks,
Metro :zoid:
[code]
TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
color = Color(20, 250, 20, 255),
model = "models/player/combine_super_soldier.mdl",
description = [[This is the only class you are allowed to be to use admin powers. Being any other RP job means you are NOT allowed under any circumstances to use your admin powers. This includes kicking, no-clip. etc.]],
weapons = {"weapon_fists"},
command = "aod",
max = 0,
salary = 500,
admin = 1,
vote = false,
hasLicense = false,
candemote = false,
customCheck = function(ply) return ply:GetUserGroup() == "admin" or ply:IsAdmin() or ply:IsSuperAdmin() or ply:GetUserGroup() == "superadmin" end,
CustomCheckFailMsg = "You don't have the permissions to join this group."
})
[/code]
[URL="http://wiki.darkrp.com/index.php/Donator_Job_configuration"]"Donator Job Configuration"[/URL]
[QUOTE=Lolcats;45734500]inefficient[/QUOTE]
If a player is superadmin, then IsAdmin will also be true. Also, you shouldn't have to check separate ULX groups; people should setup inheritance correctly.
[code]function(ply) return ply:IsAdmin() end[/code]
[QUOTE=code_gs;45734556]If a player is superadmin, then IsAdmin will also be true. Also, you shouldn't have to check separate ULX groups; people should setup inheritance correctly.
[code]function(ply) return ply:IsAdmin() end[/code][/QUOTE]
And unless you want groups like mod to be able to access it, you can just set admin = 1 in the table. Instead of doing the customCheck
thank you very much! Very helpful!!!
Sorry, you need to Log In to post a reply to this thread.