1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

I need help with jobs(not appearing) and walk&run speed

Discussion in 'DarkRP Modding Questions & Help' started by Xaniac, Aug 11, 2017.

  1. Xaniac

    Xaniac New Member

    So first of all my jobs isn't appearing at the F4 menu, I honestly don't know what's wrong, please help:


    TEAM_CITIZEN = DarkRP.createJob("Citizen", {
    color = Color(34, 85, 85, 255),
    model = {"models/player/group01/male_01.mdl"},
    description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
    weapons = {},
    command = "citizen",
    max = 0,
    salary = 20,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Citizens",
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(100)
    ply:SetHealth(100)
    ply:SetArmor(0)
    ply:SetBodygroup(0, 0)
    end
    })

    TEAM_POLICE = DarkRP.createJob("Police", {
    color = Color(25, 25, 170, 255),
    model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
    description = [[The protector of every citizen that lives in the city.
    You have the power to arrest criminals and protect innocents.
    Hit a player with your arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
    The Battering Ram can also unfreeze frozen props (if enabled).
    Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
    command = "police",
    max = 6,
    salary = GAMEMODE.Config.normalsalary * 1.45,
    admin = 0,
    vote = true,
    hasLicense = true,
    ammo = {
    ["pistol"] = 60,
    },
    category = "Police Force",
    })

    TEAM_GANG = DarkRP.createJob("Gangster", {
    color = Color(75, 75, 75, 255),
    model = {
    "models/player/Group03/Female_01.mdl",
    "models/player/Group03/Female_02.mdl",
    "models/player/Group03/Female_03.mdl",
    "models/player/Group03/Female_04.mdl",
    "models/player/Group03/Female_06.mdl",
    "models/player/group03/male_01.mdl",
    "models/player/Group03/Male_02.mdl",
    "models/player/Group03/male_03.mdl",
    "models/player/Group03/Male_04.mdl",
    "models/player/Group03/Male_05.mdl",
    "models/player/Group03/Male_06.mdl",
    "models/player/Group03/Male_07.mdl",
    "models/player/Group03/Male_08.mdl",
    "models/player/Group03/Male_09.mdl"},
    description = [[The lowest person of crime.
    A gangster generally works for the Mobboss who runs the crime family.
    The Mob boss sets your agenda and you follow it or you might be punished.]],
    weapons = {},
    command = "gang",
    max = 4,
    salary = GAMEMODE.Config.normalsalary,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Gangsters",
    })

    TEAM_MOB = DarkRP.createJob("Mob boss", {
    color = Color(25, 25, 25, 255),
    model = "models/player/gman_high.mdl",
    description = [[The Mob boss is the boss of the criminals in the city.
    With his power he coordinates the gangsters and forms an efficient crime organization.
    He has the ability to break into houses by using a lockpick.
    The Mob boss posesses the ability to unarrest you.]],
    weapons = {"lockpick", "unarrest_stick"},
    command = "mobboss",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.34,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Gangsters",
    })

    TEAM_GUN = DarkRP.createJob("Gun Dealer", {
    color = Color(255, 140, 0, 255),
    model = "models/player/monk.mdl",
    description = [[A Gun Dealer is the only person who can sell guns to other people.
    Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
    weapons = {},
    command = "gundealer",
    max = 2,
    salary = GAMEMODE.Config.normalsalary,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Citizens",
    })

    TEAM_MEDIC = DarkRP.createJob("Medic", {
    color = Color(47, 79, 79, 255),
    model = "models/player/kleiner.mdl",
    description = [[With your medical knowledge you work to restore players to full health.
    Without a medic, people cannot be healed.
    Left click with the Medical Kit to heal other players.
    Right click with the Medical Kit to heal yourself.]],
    weapons = {"med_kit"},
    command = "medic",
    max = 2,
    salary = GAMEMODE.Config.normalsalary,
    admin = 0,
    vote = false,
    hasLicense = false,
    medic = true,
    category = "Citizens",
    })

    TEAM_CHIEF = DarkRP.createJob("Police Sergeant", {
    color = Color(20, 20, 255, 255),
    model = "models/player/combine_soldier_prisonguard.mdl",
    description = [[The Chief is the leader of the Civil Protection unit.
    Coordinate the police force to enforce law in the city.
    Hit a player with arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for his/her arrest.
    Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
    command = "sergeant",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.67,
    admin = 0,
    vote = false,
    hasLicense = true,
    chief = true,
    NeedToChangeFrom = TEAM_POLICE,
    ammo = {
    ["pistol"] = 60,
    },
    category = "Police Force",
    })

    TEAM_MAYOR = DarkRP.createJob("Mayor", {
    color = Color(150, 20, 20, 255),
    model = "models/player/breen.mdl",
    description = [[The Mayor of the city creates laws to govern the city.
    If you are the mayor you may create and accept warrants.
    Type /wanted <name> to warrant a player.
    Type /jailpos to set the Jail Position.
    Type /lockdown initiate a lockdown of the city.
    Everyone must be inside during a lockdown.
    The cops patrol the area.
    /unlockdown to end a lockdown]],
    weapons = {},
    command = "mayor",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.89,
    admin = 0,
    vote = true,
    hasLicense = false,
    mayor = true,
    category = "Civil Protection",
    })

    TEAM_HOBO = DarkRP.createJob("Hobo", {
    color = Color(80, 45, 0, 255),
    model = "models/player/corpse1.mdl",
    description = [[The lowest member of society. Everybody laughs at you.
    You have no home.
    Beg for your food and money
    Sing for everyone who passes to get money
    Make your own wooden home somewhere in a corner or outside someone else's door]],
    weapons = {"weapon_bugbait"},
    command = "hobo",
    max = 5,
    salary = 0,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = false,
    hobo = true,
    category = "Citizens",
    })

    if not DarkRP.disabledDefaults["modules"]["hungermod"] then
    TEAM_COOK = DarkRP.createJob("Cook", {
    color = Color(238, 99, 99, 255),
    model = "models/player/mossman.mdl",
    description = [[As a cook, it is your responsibility to feed the other members of your city.
    You can spawn a microwave and sell the food you make:
    /buymicrowave]],
    weapons = {},
    command = "cook",
    max = 2,
    salary = 45,
    admin = 0,
    vote = false,
    hasLicense = false,
    cook = true
    })
    end

    -- Compatibility for when default teams are disabled
    TEAM_CITIZEN = TEAM_CITIZEN or -1
    TEAM_POLICE = TEAM_POLICE or -1
    TEAM_GANG = TEAM_GANG or -1
    TEAM_MOB = TEAM_MOB or -1
    TEAM_GUN = TEAM_GUN or -1
    TEAM_MEDIC = TEAM_MEDIC or -1
    TEAM_CHIEF = TEAM_CHIEF or -1
    TEAM_MAYOR = TEAM_MAYOR or -1
    TEAM_HOBO = TEAM_HOBO or -1
    TEAM_COOK = TEAM_COOK or -1

    -- Door groups
    AddDoorGroup("Cops and Mayor only", TEAM_SERGEANT, TEAM_POLICE, TEAM_MAYOR, TEAM_SWAT)
    AddDoorGroup("Gundealer only", TEAM_GUN)


    -- Agendas
    DarkRP.createAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
    DarkRP.createAgenda("Police agenda", {TEAM_MAYOR, TEAM_CHIEF}, {TEAM_POLICE})

    -- Group chats
    DarkRP.createGroupChat(function(ply) return ply:iscp() end)
    DarkRP.createGroupChat(TEAM_MOB, TEAM_GANG)
    DarkRP.createGroupChat(function(listener, ply) return not ply or ply:Team() == listener:Team() end)

    -- Initial team when first spawning
    GAMEMODE.DefaultTeam = TEAM_CITIZEN

    -- Teams that belong to Police Force
    GAMEMODE.CivilProtection = {
    [TEAM_POLICE] = true,
    [TEAM_SERGEANT] = true,
    [TEAM_MAYOR] = true,
    } [TEAM_SWAT] = true,

    -- Hitman team
    DarkRP.addHitmanTeam(TEAM_MOB)

    -- Demote groups
    DarkRP.createDemoteGroup("Cops", {TEAM_POLICE, TEAM_CHIEF})
    DarkRP.createDemoteGroup("Gangsters", {TEAM_GANG, TEAM_MOB})

    -- Default categories
    DarkRP.createCategory{
    name = "Citizens",
    categorises = "jobs",
    startExpanded = true,
    color = Color(0, 107, 0, 255),
    canSee = fp{fn.Id, true},
    sortOrder = 100,
    }
     
  2. Xaniac

    Xaniac New Member

    Here's the other half:
    DarkRP.createCategory{
    name = "Civil Protection",
    categorises = "jobs",
    startExpanded = true,
    color = Color(25, 25, 170, 255),
    canSee = fp{fn.Id, true},
    sortOrder = 101,
    }

    DarkRP.createCategory{
    name = "Gangsters",
    categorises = "jobs",
    startExpanded = true,
    color = Color(75, 75, 75, 255),
    canSee = fp{fn.Id, true},
    sortOrder = 101,
    }

    TEAM_SWAT = DarkRP.createJob("SWAT", {
    color = Color(25, 25, 170, 255),
    model = {"models/player/swat.mdl"},
    description = [[The protector of every citizen that lives in the city.
    You have the power to arrest criminals and protect innocents.
    Hit a player with your arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
    The Battering Ram can also unfreeze frozen props (if enabled).
    Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs", <"m9k_hk416"}},
    command = "Swat",
    max = 4,
    salary = 85,
    admin = 0,
    vote = true,
    hasLicense = true,
    help = {
    "Please don't abuse your job",
    "When you arrest someone they are auto transported to jail.",
    "They are auto let out of jail after some time",
    "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
    "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
    "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
    "Type /jailpos to set the jail position"
    },
    category = "Police Force",
    })


    TEAM_MODERATOR = DarkRP.createJob("Moderator On Duty", { -- Name
    color = Color(238, 99, 99, 255), -- Team color
    model = "models/freeman/player/left_shark.mdl", -- Player model
    description = [[Moderator on duty is a new staff member almost like a trial-admin, but with less power]], -- Job description
    weapons = { "weapon_fists", "arrest_stick", "unarrest_stick", "stunstick"},
    command = "mod", -- Command to become the job
    max = 0, -- Maximum amount of said job
    salary = 200, -- 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:GetUserGroup() == "moderator" end -- The extra check function. Enter nil or nothing to not have an extra check
    })

    TEAM_ADMIN = DarkRP.createJob("Admin On Duty", { -- Name
    color = Color(238, 99, 99, 255), -- Team color
    model = "models/kuma96/2b/2b_pm.mdl", -- Player model
    description = [[Admin on duty is a promoted moderator and have more powers.]], -- Job description
    weapons = { "weapon_fists", "arrest_stick", "unarrest_stick", "stunstick"},
    command = "aod", -- Command to become the job
    max = 0, -- Maximum amount of said job
    salary = 450, -- 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:GetUserGroup() == "admin" end -- The extra check function. Enter nil or nothing to not have an extra check
    })

    TEAM_OWNER = DarkRP.createJob("Owner On Duty", { -- Name
    color = Color(238, 99, 99, 255), -- Team color
    model = "models/player/bobert/akak.mdl", -- Player model
    description = [[The Owner who created the server and everything, controls everything.], -- Job description
    weapons = { "weapon_fists", "arrest_stick", "unarrest_stick", "stunstick"},
    command = "ood", -- Command to become the job
    max = 1, -- Maximum amount of said job
    salary = 700, -- 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:GetUserGroup() == "superadmin" end -- The extra check function. Enter nil or nothing to not have an extra check
    })

    TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(0, 0, 0, 255),
    model = "models/player/sunabouzu.mdl",
    description = [[People hire you to take out other people,
    this job require you to be completely focussed.
    A single breath can make you loose a shot.]],
    weapons = {"m9k_m24"},
    command = "hitman",
    max = 1,
    salary = 75,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Citizens",
    })

    TEAM_MD = DarkRP.createJob("Mayors Daughter", {
    color = Color(255,100,100,255),
    model = "models/player/alyx.mdl",
    description = [[You are the mayors daughter, walk around with your dad
    just chill around. But be careful, you never know when somebody
    is waiting to kidnap you!]],
    weapons = {"weapon_fists"},
    command = "daughter",
    max = 1,
    salary = 80,
    admin = 0,
    vote = true,
    hasLicense = false
    })

    TEAM_GUARD = DarkRP.createJob("Guard", {
    color = Color(0,200,50,255),
    model = "models/player/barney.mdl",
    description = [[People will pay for protection, use your weapon or buy one from the local gundealer.]],
    weapons = {"stunstick"},
    command = "guard",
    max = 1,
    salary = 85,
    admin = 0,
    vote = false,
    hasLicense = true,
    category = "Citizens",
    })

    TEAM_MTHIEF = DarkRP.createJob("Master Thief", {
    color = Color(0, 0, 0, 255),
    model = "models/player/robber.mdl",
    description = [[You are a thief, rob people, lockpick their house and steal their plants and legal printers.]],
    weapons = {"lockpick", "m9k_tec9", "pickpocket "}, -- You may wanna find a pickpocket swep and add it here.
    command = "master",
    max = 2,
    salary = 150,
    admin = 0,
    vote = false,
    hasLicense = false,
    customCheck = function(ply) return ply:GetUserGroup() == "vip" end -- The extra check function. Enter nil or nothing to not have an extra check
    })

    TEAM_SWATS = DarkRP.createJob("SWAT Sniper", {
    color = Color(20, 20, 255, 255),
    model = "models/mw2guy/diver/diver_03.mdl",
    description = [[The protector of every citizen that lives in the city.
    You have the power to arrest criminals and protect innocents.
    Hit a player with your arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
    The Battering Ram can also unfreeze frozen props (if enabled).
    Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "m9k_m24", "stunstick", "door_ram", "weaponchecker", "handcuffs"},
    command = "Swat",
    max = 1,
    salary = 120,
    admin = 0,
    vote = true,
    hasLicense = true,
    help = {
    "Please don't abuse your job",
    "When you arrest someone they are auto transported to jail.",
    "They are auto let out of jail after some time",
    "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
    "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
    "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
    "Type /jailpos to set the jail position"
    },
    category = "Police Force",
    })

    And the walk & run speed:

    - runspeed - Sets the max running speed.
    GM.Config.runspeed = 320
    -- runspeed - Sets the max running speed for CP teams.
    GM.Config.runspeedcp = 340

    walkspeed - Sets the max walking speed.
    GM.Config.walkspeed = 250
     
  3. System

    System Active Member

Share This Page