Superadmin/Admin/Moderator Job

How can i make a superadmin/admin/moderator job?

By putting “DarkRP” and “Jobs” into google: http://wiki.darkrp.com/index.php/DarkRP:Jobs

Yes uhm ive tried that but i still get errors…

Then maybe you should post your code and the errors you get. If you are getting errors, then you are doing it wrong, and the easiest way to find out how is to post them here.

I mean that i need these three jobs can be accesed only from superadmin admins and moderators.

Seeing as you aren’t going to post your code or errors, I’m going to have you use my seer powers and guess that you aren’t using this field when you create your job:

[lua]
customCheck = function(ply) return ply:GetNWString(“usergroup”) == “usergroup name here” end
[/lua]

Thanks for help it worked and sorry for not posting here.

No wories. http://wiki.darkrp.com/index.php/Donator_Job_configuration is where I found the example I posted (and guess which page links to this one?)

Here is a few examples from my server basically all you need it so have a customcheck on the end of the job to prevent other ranks from accessing the job.


TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
    color = Color(170, 0, 0, 255),
    model = "models/player/chuckymore/n7carver.mdl",
    description = [[Admin on duty is when you as an admin, is ready to make sure the server stays at its best.
It's up to you to patrol and respond to admin calls.]],
    weapons = {},
    command = "aod",
    max = 0,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
   customCheck = function(ply) return CLIENT or ply:GetNWString("usergroup") == "admin" or ply:GetNWString("usergroup") == "superadmin" or ply:GetNWString("usergroup") == "founder" end,
   CustomCheckFailMsg = "This job is Admin only.",
   category = "Staff"
})

TEAM_MOD = DarkRP.createJob("Moderator On Duty", {
    color = Color(170, 0, 0, 255),
    model = "models/player/chuckymore/n7isaac.mdl",
    description = [[Mod on duty is when you as an Moderator, is ready to make sure the server stays at its best.
It's up to you to patrol and respond to moderator calls.]],
    weapons = {},
    command = "mod",
    max = 0,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
   customCheck = function(ply) return CLIENT or ply:GetNWString("usergroup") == "admin" or ply:GetNWString("usergroup") == "moderator" or ply:GetNWString("usergroup") == "founder" or ply :GetNWString("usergroup") == "superadmin" end,
   CustomCheckFailMsg = "This job is Moderator only.",
	category = "Staff"
})

However as mentioned above all you need is the customCheck

customCheck = function(ply) return CLIENT or ply:GetNWString(“usergroup”) == “admin” or ply:GetNWString(“usergroup”) == “moderator” or ply:GetNWString(“usergroup”) == “founder” or ply:GetNWString(“usergroup”) == “superadmin” end,
CustomCheckFailMsg = “This job is Moderator only.”,

This specific check will usually work for all rank groups such as ulx and serverguard as long as you provide the unique rank name such as moderator or superadmin. The Custom check fail message is what will be show to the user if they don’t have the required rank to join e.g. if someone with normal rank attempted to join that job he would get a message saying “You’re Custom Message”.

You can find more about groups and custom checks here:

http://wiki.darkrp.com/index.php/Donator_Job_configuration