• Job.lua assistance
    2 replies, posted
After a few hours of tinkering and continuing to get error outputs i decided to get a solution [CODE] TEAM_PC = DarkRP.createJob("PC Tech", { color = Color(129, 147, 252, 255) , model = "models/Characters/Hostage_01.mdl", description = [[Sell and install PCs to your customers.]], weapons = {}, command = "pc", max = 2, salary = 60, admin = 0, vote = false, hasLicense = false }) TEAM_FBI = DarkRP.createJob("FBI Agent", { color = Color(86, 22, 77, 255) , model = "models/Characters/Hostage_01.mdl", description = [[Your job as a member of the FBI is to help the SWAT raid and find illegal entities. NO CORRUPT RAIDS!]], weapons = {}, command = "FBI", max = 3, salary = 92, admin = 0, vote = false, hasLicense = true, NeedToChangeFrom = TEAM_POLICE, customcheck = function(ply) return ply :GetNWStrin("usergroup") == "VIP" end }) TEAM_AOD = DarkRP.createJob("Admin on Duty", { color = Color(255, 0, 0), model = "models/player/combine_super_soldier.mdl", description = [[Admin On Duty.]], weapons = {"arrest_stick","unarrest_stick","stunstick","weapon_keypadchecker"}, command = "aod", max = 0, salary = 69, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return CLIENT or table.HasValue({"superadmin", "admin", "owner", "moderator"}), ply:GetNWString("usergroup") end, CustomCheckFailMsg = "This job is for staff only!", PlayerLoadout = function(ply) ply:SetArmor(100) end, }) TEAM_SWAT = DarkRP.createJob("S.W.A.T", { color = Color(13, 0, 255), model = "", description = [[Your job is to be on the front line of raids and keep the general public safe, you are equipped with heavy arms.]], weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker"}, command = "swat", max = 5, salary = 130, admin = 0, vote = true, hasLicense = true, PlayerLoadout = function(ply) ply:SetArmor(75) ply:GiveAmmo(50, "smg1") end, }) 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 = {}, command = "hobo", max = 5, salary = 0, admin = 0, vote = false, hasLicense = false, candemote = false, hobo = true, PlayerLoadout = function(ply) ply:SetArmor(0) end, }) TEAM_CHIEF = DarkRP.createJob("Police Chief", { 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. Type /jailpos to set the Jail Position]], weapons = {"arrest_stick", "unarrest_stick", "m9k_deagle", "stunstick", "door_ram", "weaponchecker", "m9k_m29satan"}, command = "chief", max = 1, salary = 90, admin = 0, vote = true, hasLicense = true, chief = true, PlayerLoadout = function(ply) ply:SetArmor(50) ply:GiveAmmo(50, "357") end, }) 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 = 3, salary = 75, admin = 0, vote = false, hasLicense = false, medic = true, PlayerLoadout = function(ply) ply:SetArmor(0) end, }) TEAM_MOB = DarkRP.createJob("The Don", { color = Color(25, 25, 25, 255), model = "models/player/kleiner.mdl", description = [[The Don is the boss of the mafia in the city. With his power he coordinates the mafia and forms an efficient crime organization. He has the ability to break into houses by using a lockpick. The Don posesses the ability to unarrest you.]], weapons = {"lockpick", "unarrest_stick"}, command = "mobboss", max = 1, salary = 90, admin = 0, vote = false, hasLicense = false, PlayerLoadout = function(ply) ply:SetArmor(0) end, }) TEAM_GANG = DarkRP.createJob("Mafia", { color = Color(75, 75, 75, 255), model = { "models/fearless/bsuit04.mdl", "models/fearless/bsuit01.mdl", "models/fearless/dbsuit07.mdl", "models/fearless/dbsuit09.mdl", "models/fearless/dgsuit12.mdl", "models/fearless/dgsuit13.mdl", "models/fearless/gsuit15.mdl", "models/fearless/gsuit18.mdl", "models/fearless/suit04.mdl", "models/fearless/mafia02.mdl", "models/fearless/mafia04.mdl", "models/fearless/mafia06.mdl", "models/fearless/mafia07.mdl", "models/fearless/mafia09.mdl", }, description = [[The lowest person of crime. A mafia member generally works for the Don who runs the crime family. The Don sets your agenda and you follow it or you might be punished.]], weapons = {}, command = "mafia", max = 13, salary = 50, admin = 0, vote = false, hasLicense = false, PlayerLoadout = function(ply) ply:SetArmor(0) end, }) TEAM_SS = DarkRP.createJob("Secret Service", { color = Color(100, 20, 20, 255), model = "models/player/kleiner.mdl", description = [[You are responsible for protecting the mayor. Take care of the old fellow, he is in danger from terrorists all the time!]], weapons = {"weapon_deagle2", "stunstick", "weaponchecker"}, command = "SS", max = 2, salary = 65, admin = 0, vote = true, hasLicense = true, }) TEAM_Guard = DarkRP.createJob("Security Guard", { color = Color(0,200,50,255), model = "models/player/kleiner.mdl", description = [[People will pay for protection, use your weapon or buy one from the local gundealer.]], weapons = {}, command = "guard", max = 3, salary = 85, admin = 0, vote = false, hasLicense = true [/CODE] Obviously feel free to use these as you please, however a fix would be nice. I did not create any of these jobs, which is obviously why they do not function, just on a brief look through i managed to fix a lot of simple errors, i believe there are a few i am overlooking though, mind taking a look?
Is there a missing "})" at the end in the file too or did you just accidentally cut that out? [editline]7th November 2014[/editline] Also knowing what the errors say would be helpful
That was the error, cant believe i didnt see it, thanks.
Sorry, you need to Log In to post a reply to this thread.