Add VIP jobs Please help me :(


TEAM_REBEL = AddExtraTeam("Rebel Leader", Color(32, 96, 74, 189), "Models/COD players/opfor3.mdl", [[Rebel Leader can Mug,Raid and Kidnap. They can start rebellions once every 15 minutes. They control the rebels. The rebel leader must only kill government during rebellions.]], {"didy_cfak47", "lockpick", "keypad_cracker" }, "rebelleader", 1, 65, 0, false, false, false)

my f4 menu states to add vip = true to add a vip job how would I add that here ? Thanks :slight_smile:

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

Check the above out.



TEAM_REBEL = DarkRP.createJob("Rebel Leader", { -- Name
    color = Color(32, 96, 74, 189), -- Team color
    model = "Models/COD players/opfor3.mdl", -- Player model
    description = [[Rebel Leader can Mug,Raid and Kidnap. They can start rebellions once every 15 minutes.
They control the rebels. The rebel leader must only kill government during rebellions.]],  -- Job description
    weapons = {"didy_cfak47", "lockpick", "keypad_cracker"}, -- Additional weapons
    command = "rebelleader", -- Command to become the job
    max = 1, -- Maximum amount of said job
    salary = 65, -- Salary
    admin = 0, -- Requires Admin? 1 for yes, 0 for no.
    vote = false, -- Do they need to vote? true for yes, false for no.
    hasLicense = false, -- Has a license
    customCheck = function(ply) return ply:GetNWString("usergroup") == "*Whatever your VIP group's name is.*" end -- The extra check function. Enter nil or nothing to not have an extra check
})


^ Completely recoded your job. What you did was very ugly, and I’m pretty sure that some parts were messed up.

Change Whatever your VIP group’s name is. to whatever the VIP group’s name is.

If you want you can replace:



customCheck = function(ply) return ply:GetNWString("usergroup") == "*Whatever your VIP group's name is.*" end


with:



customCheck = function(ply) return table.HasValue({"*custom*", "*custom*", "*custom*", "*custom*", "*custom*"}, ply:GetNWString("usergroup")) end


^ That makes it so that multiple groups can have the job, if you put:



customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" end


^ then only “donator” will have the ability to be this job, not admins+. If you have:



customCheck = function(ply) return table.HasValue({"donator", "operator", "admin", "superadmin"}, ply:GetNWString("usergroup")) end


^ then donators, operators, admins, or superadmins can be this job. Understand?

Make sure the quotes are there still but the asterisks need to go.