Weapons Issue!

recently i have made a police job but whenever i triy to add weapons to it in game the weapons arent there!

This happens with all jobs as well

jobs.lua file:


TEAM_CITIZEN = DarkRP.createJob("Citizen", {
    color = Color(34, 17, 68, 255),
    model = {
        "models/player/zelpa/female_01.mdl",
        "models/player/zelpa/female_02.mdl",
        "models/player/zelpa/female_03.mdl",
        "models/player/zelpa/female_04.mdl",
        "models/player/zelpa/female_05.mdl",
        "models/player/zelpa/female_06.mdl",
        "models/player/zelpa/female_07.mdl",
        "models/player/zelpa/male_01.mdl",
        "models/player/zelpa/male_02.mdl",
"models/player/zelpa/male_03.mdl",
"models/player/zelpa/male_04.mdl",
"models/player/zelpa/male_05.mdl",
"models/player/zelpa/male_06.mdl",
"models/player/zelpa/male_07.mdl",
    },
    description = [[You're a Civilian. Being a Civilian is a tough job, watching murders, seeing hobos on the street, getting robbed etc.]],
    weapons = {},
    command = "citizen",
    max = 0,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = false,
	category = "Citizens",
})
TEAM_GUN = DarkRP.createJob("Gun Dealer", {
    color = Color(255, 122, 0, 255),
    model = {"models/player/monk.mdl"},
    description = [[You're a Gun Dealer. You sell guns, it's that simple!]],
    weapons = {},
    command = "gundealer",
    max = 3,
    salary = 65,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = true,
	category = "Citizens",
})
TEAM_MAYOR = DarkRP.createJob("Mayor", {
color = Color(20, 255, 0, 255),
    model = {"models/player/breen.mdl"},
    description = [[You're The Mayor. You're the Mayor of this town, you better keep this place as clean and wealthy as it can be!]],
    weapons = {},
    command = "mayor",
    max = 1,
    salary = 150,
    admin = 0,
    vote = true,
    hasLicense = true,
    candemote = true,
    category = "Law Enforcement",
    mayor = true,
    medic = true,
    hobo = true,
    PlayerSpawn = function(ply)
  		ply:SetMaxHealth(150)
    	ply:SetHealth(150)
    	ply:SetArmor(25)
    end
})
TEAM_HOBO = DarkRP.createJob("Hobo", {
    color = Color(87, 59, 12, 255),
    model = {"models/player/scavenger/scavenger.mdl"},
    description = [[You're a Hobo. A person who does drugs and beg for money. Hobo's were High School Dropouts.]],
    weapons = {weapon_angryhobo},
    command = "hobo",
    max = 0,
    salary = 0,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
    category = "Citizens",
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
    color = Color(0, 114, 225, 255),
    model = {
        "models/player/santosrp/male_02_santosrp.mdl",
        "models/player/santosrp/male_04_santosrp.mdl",
        "models/player/santosrp/male_05_santosrp.mdl",
        "models/player/santosrp/male_06_santosrp.mdl",
        "models/player/santosrp/male_07_santosrp.mdl",
        "models/player/santosrp/male_08_santosrp.mdl",
        "models/player/santosrp/male_09_santosrp.mdl",
    },
    description = [[You're a Police Officer. You take care of the community and stop criminals.]],
    weapons = {stunstick, door_ram, weaponchecker, fas2_glock20, weapon_sh_doorcharge, policebadgewallet, la_taser, la_grabber},
    command = "police",
    max = 10,
    salary = 75,
    admin = 0,
    vote = true,
    hasLicense = true,
    candemote = true,
    category = "Law Enforcement",
})
TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(255, 0, 0, 255),
    model = {"models/player/agent_47.mdl"},
    description = [[You're a Hitman. You kill people for a living.]],
    weapons = {},
    command = "hitman",
    max = 3,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = true,
    category = "Criminals",
})
TEAM_QUACK = DarkRP.createJob("Quackinator", {
    color = Color(0, 255, 224, 255),
    model = {"models/player/valley/deadpool.mdl"},
    description = [[This is a custom job for Quack Quack.]],
    weapons = {"fas2_ak12", "fas2_ks23", "weapon_sh_doorcharge", "weapon_sh_keypadcracker_deploy", "fas2_m24", "weapon_camo"},
    command = "quack",
    max = 1,
    salary = 50000,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Custom Jobs",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(200)
        ply:SetHealth(200)
        ply:SetArmor(255)
    end,
    customCheck = function(ply) return CLIENT or
        table.HasValue({"STEAM_0:1:230092590"}, ply:SteamID())
    end,
    CustomCheckFailMsg = "This job is for Quack Quack only!!",
})
TEAM_ADMIN = DarkRP.createJob("Staff On Duty", {
    color = Color(250, 255, 0, 255),
    model = {
        "models/player/dementor.mdl",
        "models/player/demon_violinist/demon_violinist.mdl",
        "models/avengers/ironman/mark7_npc.mdl",
        "models/avengers/ironman/patriot_npc.mdl",
"models/player/zack/zackhalloween"
    },
    description = [[You're Staff on Duty! You stop mingers and RDM's from destroying the server]],
    weapons = {},
    command = "staff",
    max = 0,
    salary = 5000,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
	category = "Special",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(10000000)
        ply:SetHealth(10000000)
        ply:SetArmor(255)
    end,
    customCheck = function(ply) return CLIENT or
        table.HasValue({"superadmin", "admin", "moderator", "trialmoderator", "owner", "co-owner"})
    end,
    CustomCheckFailMsg = "This job is for Admin only!!",
})
TEAM_JOJO = DarkRP.createJob("Jo-Jo", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/demon_violinist/demon_violinist.mdl"},
    description = [[What a Sick Cunt!!!!!!!!]],
    weapons = {"fas2_ak12", "fas2_ks23", "weapon_sh_doorcharge", "weapon_sh_keypadcracker_deploy", "fas2_m24", "weapon_camo"},
    command = "jojo",
    max = 1,
    salary = 50000,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
	category = "Custom Jobs",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(200)
        ply:SetHealth(200)
        ply:SetArmor(255)
    end,
    customCheck = function(ply) return CLIENT or
        table.HasValue({"STEAM_0:0:158502272"}, ply:SteamID())
    end,
    CustomCheckFailMsg = "This job is for Admin only!!",
})
TEAM_THIEF = DarkRP.createJob("Thief", {
    color = Color(255, 0, 0, 255),
    model = {"models/h-d/2sg/simonplayer.mdl"},
    description = [[You're a Thief. Your job is to kill, raid and steal as much as you can.]],
    weapons = {"weapon_sh_keypadcracker_deploy", "lockpick"},
    command = "thief",
    max = 2,
    salary = 65,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
	category = "Criminals",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(100)
        ply:SetHealth(100)
        ply:SetArmor(0)
    end
})
TEAM_PTHIEF = DarkRP.createJob("Pro Thief", {
    color = Color(255, 0, 0, 255),
    model = {"models/code_gs/robber/robberplayer.mdl"},
    description = [[You're a Pro Thief. Your job is to kill, raid and steal as much as you can.]],
    weapons = {"weapon_sh_keypadcracker_deploy", "pro_lockpick", "fas2_g3"},
    command = "pthief",
    max = 2,
    salary = 65,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
	category = "Criminals",
    PlayerSpawn = function(ply)
        ply:SetMaxHealth(100)
        ply:SetHealth(100)
        ply:SetArmor(0)
    end,
    customCheck = function(ply) return CLIENT or
        table.HasValue({"VIP", "VIP+"})
    end,
    CustomCheckFailMsg = "This job is for VIP only!!",
})

I see your error here. The weapons is a table which has strings about all of the weapons that class has. Now, this are STRINGS, so you’ve got to put them between quotes, as so: “weapon_something”, and you’re doing it like


weapons = {stunstick, door_ram, weaponchecker, fas2_glock20, weapon_sh_doorcharge, policebadgewallet, la_taser, la_grabber}

having the game consider it as if you were using NIL variables, as they don’t exist.
So you would have to change that to


weapons = {"stunstick", "door_ram", "weaponchecker", "fas2_glock20", "weapon_sh_doorcharge", "policebadgewallet", "la_taser", "la_grabber"}

ok ill try it

[editline]5th October 2017[/editline]

Thank you so much it worked <3