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.

jobs.lua help needed

Discussion in 'Modder General Chat' started by Chauncey, Aug 15, 2017.

Tags:
  1. Chauncey

    Chauncey New Member

    i have managed to get my jobs.lua under custom things to work with a job but i cannot figure out how to add another job underneath it.... every time i try to do so it will not work and i get a lua issue in game here is what i have i know it is messed up...

    TEAM_MERCENARY = DarkRP.createJob("Mercenary", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/barney.mdl"},
    description = [[The Mercenary uses a more heavy load out of weapons to take down his or her prey along side being able to have 150 health!]],
    weapons = {"m9k_deagle", "m9k_fg42"},
    command = "/mercenary",
    max = 1,
    salary = 300,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "For Hire",
    ammo = {
    ["item_box_lrounds"] = 60,
    ["item_box_item_ammo_357"] = 24
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(150)
    ply:SetHealth(150)
    ply:SetArmor(100)
    end,
    PlayerDeath = function(ply, weapon, killer)
    ply:teamBan()
    ply:changeTeam(GAMEMODE.DefaultTeam, true)
    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    } <-------THIS IS WHERE THE ISSUE HAPPENS

    TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/mossman.mdl"},
    description = [[The Mercenary uses a more heavy load out of weapons to take down his or her prey along side being able to have 150 health!]],
    weapons = {"m9k_mp7", "m9k_glock"},
    command = "/hitman",
    max = 1,
    salary = 300,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "For Hire",
    ammo = {
    ["item_box_srounds"] = 96,
    ["item_box_mrounds"] = 35
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(150)
    ply:SetHealth(150)
    ply:SetArmor(100)
    end,
    PlayerDeath = function(ply, weapon, killer)
    ply:teamBan()
    ply:changeTeam(GAMEMODE.DefaultTeam, true)
    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    end
    })
     
  2. Nobody 2

    Nobody 2 New Member

    TEAM_MERCENARY = DarkRP.createJob("Mercenary", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/barney.mdl"},
    description = [[The Mercenary uses a more heavy load out of weapons to take down his or her prey along side being able to have 150 health!]],
    weapons = {"m9k_deagle", "m9k_fg42"},
    command = "/mercenary",
    max = 1,
    salary = 300,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "For Hire",
    ammo = {
    ["item_box_lrounds"] = 60,
    ["item_box_item_ammo_357"] = 24
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(150)
    ply:SetHealth(150)
    ply:SetArmor(100)
    end,
    PlayerDeath = function(ply, weapon, killer)
    ply:teamBan()
    ply:changeTeam(GAMEMODE.DefaultTeam, true)
    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    end
    })

    TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/mossman.mdl"},
    description = [[The Mercenary uses a more heavy load out of weapons to take down his or her prey along side being able to have 150 health!]],
    weapons = {"m9k_mp7", "m9k_glock"},
    command = "/hitman",
    max = 1,
    salary = 300,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "For Hire",
    ammo = {
    ["item_box_srounds"] = 96,
    ["item_box_mrounds"] = 35
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(150)
    ply:SetHealth(150)
    ply:SetArmor(100)
    end,
    PlayerDeath = function(ply, weapon, killer)
    ply:teamBan()
    ply:changeTeam(GAMEMODE.DefaultTeam, true)
    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    end
    })

    you had
    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    }

    instead of

    DarkRP.notifyAll(0, 4, "The mercenary met his end therefore his job is now open!")
    end
    } )
     
  3. Chauncey

    Chauncey New Member

    alright thanks!
    also i know i put this in the wrong area sorry about that...
     

Share This Page