• My jobs spawn with no weapons, and I don't know why.
    3 replies, posted
Alright, so I use TheCodingBeast to set up my jobs first of all. I can't code that well myself, and I'm just trying to get the basics done right now before I work on it more. I get no Lua errors, or messages of any kind. I just load in, and the custom jobs all say "This job has no extra weapons", and have no weapons when I get on them. I don't think it's my weapons pack (FA:S 2), because even the lockpick, medkit, and keypad cracker, don't show up. I want to know if there's something wrong with the code, or maybe a file that I could have accidentally disabled job weapons spawning or something... I have no idea what's going on, and aside from disabling some of the default jobs... This is the only code I've touched. This is my jobs file: _______________________________________________________________________ --[[--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- This file contains your custom jobs. This file should also contain jobs from DarkRP that you edited. Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua Once you've done that, copy and paste the job to this file and edit it. The default jobs can be found here: [url]https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua[/url] For examples and explanation please visit this wiki page: [url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url] Add jobs under the following line: ---------------------------------------------------------------------------]] TEAM_DICTATOR = DarkRP.createJob("Dictator", { color = Color(150, 20, 20, 255), model = "models/player/combine_super_soldier.mdl", description = [[The Dictator rules the peacekeepers in his fragile throne. Demotes on death, requires no vote. Type /wanted <name> to want a player Type/warrant <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 = {fas2_famas,fas2_toz34,fas2_deagle,weapon_cuff_rope}, command = "dictator", max = 1, salary = 2500, admin = 0, vote = false, hasLicense = false, category = "Peacekeepers", mayor = true, PlayerDeath = function(ply, weapon, killer) ply:teamBan() ply:changeTeam(GAMEMODE.DefaultTeam, true) if killer:IsPlayer() then DarkRP.notifyAll(0, 4, "The mayor has been killed and is therefor demoted.") else DarkRP.notifyAll(0, 4, "The mayor has died and is therefor demoted.") end end }) -- Code generated at: TheCodingBeast.com | DarkRP 2.5 Tools TEAM_ENFORCER = DarkRP.createJob("Enforcer", { color = Color (0, 0, 0, 255), model = {"models/player/police.mdl"}, description = [[One of the lowest Peacekeeper ranks, Enforcers are tasked with enforcing and upholding the Dictator's law. Can betray.]], weapons = {weapon_cuff_rope,fas2_glock20}, command = "enforcer", max = 6, salary = 500, admin = 0, vote = false, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Peacekeepers", PlayerDeath = function(ply, weapon, killer) ply:teamBan() ply:changeTeam(GAMEMODE.DefaultTeam, true) if killer:IsPlayer() then DarkRP.notifyAll(0, 4, "The mayor has been killed and is therefor demoted.") else DarkRP.notifyAll(0, 4, "The mayor has died and is therefor demoted.") end end }) -- Code generated at: TheCodingBeast.com | DarkRP 2.5 Tools TEAM_PALADIN = DarkRP.createJob("Paladin", { color = Color(12, 0, 255, 255), model = {"models/player/combine_soldier.mdl"}, description = [[A higher ranking Peacekeeper tasked with assisting the Enforcers. Can not betray.]], weapons = {fas2_m4a1,fas2_glock20,weapon_cuff_rope}, command = "paladin", max = 2, salary = 750, admin = 0, vote = false, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Peacekeepers", PlayerDeath = function(ply, weapon, killer) ply:teamBan() ply:changeTeam(GAMEMODE.DefaultTeam, true) if killer:IsPlayer() then DarkRP.notifyAll(0, 4, "The mayor has been killed and is therefor demoted.") else DarkRP.notifyAll(0, 4, "The mayor has died and is therefor demoted.") end end }) -- Code generated at: TheCodingBeast.com | DarkRP 2.5 Tools TEAM_GAURDIAN = DarkRP.createJob("Gaurdian", { color = Color(29, 0, 128, 255), model = {"models/player/combine_soldier_prisonguard.mdl"}, description = [[A higher ranking Peacekeeper tasked with defending Peacekeeper owned buildings. Can not betray.]], weapons = {fas2_toz34,fas2_glock20,weapon_cuff_rope}, command = "Gaurdian", max = 2, salary = 1000, admin = 0, vote = false, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Peacekeepers", PlayerDeath = function(ply, weapon, killer) ply:teamBan() ply:changeTeam(GAMEMODE.DefaultTeam, true) if killer:IsPlayer() then DarkRP.notifyAll(0, 4, "The mayor has been killed and is therefor demoted.") else DarkRP.notifyAll(0, 4, "The mayor has died and is therefor demoted.") end end }) -- Code generated at: TheCodingBeast.com | DarkRP 2.5 Tools TEAM_LOCKSMITH = DarkRP.createJob("Locksmith", { color = Color(75, 75, 75, 255), model = {"models/player/Group03/male_02.mdl"}, description = [[Knows how to open a lock, and does it well.]], weapons = {lockpick}, command = "locksmith", max = 10, salary = 250, admin = 0, vote = true, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Citizens", }) -- Code generated at: TheCodingBeast.com | DarkRP 2.5 Tools TEAM_HACKER = DarkRP.createJob("Hacker", { color = Color(75, 75, 75, 255), model = {"models/player/Group03/male_02.mdl"}, description = [[Skilled with code, and could open a keypad without the owner's permission if he so chose.]], weapons = {keypad_cracker}, command = "hacker", max = 10, salary = 250, admin = 0, vote = true, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Citizens", }) --[[--------------------------------------------------------------------------- Define which team joining players spawn into and what team you change to if demoted ---------------------------------------------------------------------------]] GAMEMODE.DefaultTeam = TEAM_CITIZEN --[[--------------------------------------------------------------------------- Define which teams belong to civil protection Civil protection can set warrants, make people wanted and do some other police related things ---------------------------------------------------------------------------]] GAMEMODE.CivilProtection = { [TEAM_POLICE] = true, [TEAM_CHIEF] = true, [TEAM_MAYOR] = true, } --[[--------------------------------------------------------------------------- Jobs that are hitmen (enables the hitman menu) ---------------------------------------------------------------------------]] DarkRP.addHitmanTeam(TEAM_MOB)
[CODE] {fas2_toz34,fas2_glock20,weapon_cuff_rope}, [/CODE] My guess is that these need to be strings: [CODE] {'fas2_toz34','fas2_glock20','weapon_cuff_rope'}, [/CODE]
Never mind, I figured it out... I forgot the quotes around the weapons... [editline]12th July 2016[/editline] [QUOTE=MPan1;50699264][CODE] {fas2_toz34,fas2_glock20,weapon_cuff_rope}, [/CODE] My guess is that these need to be strings: [CODE] {'fas2_toz34','fas2_glock20','weapon_cuff_rope'}, [/CODE][/QUOTE] Sorry, I didn't refresh so I didn't see you'd replied. Thanksfor the help though!
:snip: Not much point making a thread without refreshing
Sorry, you need to Log In to post a reply to this thread.