Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
LUA Errors
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Kristo" data-source="post: 382909" data-attributes="member: 56515"><p>Hi All, </p><p></p><p>I have been developing a GMOD Server recently however I keep getting errors from my jobs.lua script everytime I copy it into the server files to work. </p><p></p><p>An Example of this error is <strong> ')' expected (to close '(' at line 51) near '='</strong></p><p><strong></strong></p><p>My script is found below.</p><p>-<em>-[[---------------------------------------------------------------------------</em></p><p><em>DarkRP custom jobs</em></p><p><em>---------------------------------------------------------------------------</em></p><p><em></em></p><p><em>This file contains your custom jobs.</em></p><p><em>This file should also contain jobs from DarkRP that you edited.</em></p><p><em></em></p><p><em>Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua</em></p><p><em> Once you've done that, copy and paste the job to this file and edit it.</em></p><p><em></em></p><p><em>The default jobs can be found here:</em></p><p><em><a href="https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua" target="_blank">https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua</a></em></p><p><em></em></p><p><em>For examples and explanation please visit this wiki page:</em></p><p><em><a href="http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields" target="_blank">http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields</a></em></p><p><em></em></p><p><em></em></p><p><em>Add jobs under the following line:</em></p><p><em>---------------------------------------------------------------------------]]</em></p><p><em></em></p><p><em>TEAM_CITIZEN = DarkRP.createJob("Citizen", {</em></p><p><em> color = Color(20, 150, 20, 255),</em></p><p><em> model = {</em></p><p><em> "models/player/Group01/Female_01.mdl",</em></p><p><em> "models/player/Group01/Female_02.mdl",</em></p><p><em> "models/player/Group01/Female_03.mdl",</em></p><p><em> "models/player/Group01/Female_04.mdl",</em></p><p><em> "models/player/Group01/Female_06.mdl",</em></p><p><em> "models/player/group01/male_01.mdl",</em></p><p><em> "models/player/Group01/Male_02.mdl",</em></p><p><em> "models/player/Group01/male_03.mdl",</em></p><p><em> "models/player/Group01/Male_04.mdl",</em></p><p><em> "models/player/Group01/Male_05.mdl",</em></p><p><em> "models/player/Group01/Male_06.mdl",</em></p><p><em> "models/player/Group01/Male_07.mdl",</em></p><p><em> "models/player/Group01/Male_08.mdl",</em></p><p><em> "models/player/Group01/Male_09.mdl"</em></p><p><em> },</em></p><p><em> 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.]],</em></p><p><em> weapons = {},</em></p><p><em> command = "citizen",</em></p><p><em> max = 0,</em></p><p><em> salary = GAMEMODE.Config.normalsalary,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> candemote = false,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_SS = DarkRP.createJob("Secret Service", {</em></p><p><em> color = Color(100, 20, 20, 255),</em></p><p><em> model = "models/lt_c/sci_fi/humans/male_bill.mdl" },</em></p><p><em> description = [[You are responsible for protecting the mayor.]],</em></p><p><em> weapons = {"weapon_deagle2", "stunstick", "weaponchecker"},</em></p><p><em> command = "ss",</em></p><p><em> max = 2,</em></p><p><em> salary = 100,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = false,</em></p><p><em> ammo = {</em></p><p><em> ["pistol"] = 60,</em></p><p><em> }, </em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_SWAT = DarkRP.createJob("SWAT", {</em></p><p><em> color = Color(25, 25, 170, 255),</em></p><p><em> model = {"models/player/imc_grunt_anti_titan.mdl"},</em></p><p><em> description = [[The protector of every citizen that lives in the city.</em></p><p><em> You have the power to arrest criminals and protect innocents.</em></p><p><em> Hit a player with your arrest baton to put them in jail.</em></p><p><em> Bash a player with a stunstick and they may learn to obey the law.</em></p><p><em> The Battering Ram can break down the door of a criminal, with a warrant for their arrest.</em></p><p><em> The Battering Ram can also unfreeze frozen props (if enabled).</em></p><p><em> Type /wanted <name> to alert the public to the presence of a criminal.]],</em></p><p><em> weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},</em></p><p><em> command = "Swat",</em></p><p><em> max = 4,</em></p><p><em> salary = 150,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = true,</em></p><p><em> help = {</em></p><p><em> "Please don't abuse your job",</em></p><p><em> "When you arrest someone they are auto transported to jail.",</em></p><p><em> "They are auto let out of jail after some time",</em></p><p><em> "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",</em></p><p><em> "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",</em></p><p><em> "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",</em></p><p><em> "Type /jailpos to set the jail position"</em></p><p><em> },</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p> <em>TEAM_MOD = DarkRP.createJob("Moderator on Duty", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/player/masterchiefh2.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {},</em></p><p><em> command = "modd",</em></p><p><em> max = 0,</em></p><p><em> salary = 550,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Staff",</em></p><p><em> customCheck = function(ply) return </em></p><p><em> table.HasValue({"moderator","superadmin"}, ply:GetNWString("usergroup"))</em></p><p><em> end,</em></p><p><em> CustomCheckFailMsg = "This Job Is For Staff Only!",</em></p><p> <em>})</em></p><p><em></em></p><p><em>TEAM_MD = DarkRP.createJob("Mayors Daughter", {</em></p><p><em> color = Color(255,100,100,255),</em></p><p><em> model = "models/lt_c/sci_fi/humans/female_wraith.mdl",</em></p><p><em> description = [[You are the mayors daughter, walk around with your dad</em></p><p><em> just chill around. But be careful, you never know when somebody</em></p><p><em> is waiting to kidnap you!]],</em></p><p><em> weapons = {},</em></p><p><em> command = "mayorsdaughter",</em></p><p><em> max = 1,</em></p><p><em> salary = 50,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false</em></p><p><em> category = "Citizens"</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_GUARD = DarkRP.createJob("Guard", {</em></p><p><em> color = Color(0,200,50,255),</em></p><p><em> model = "models/player/guard_pack/guard_01.mdl",</em></p><p><em> "models/player/guard_pack/guard_02.mdl",</em></p><p><em> description = [[People will pay for protection, use your weapon or buy one from the local gundealer.]],</em></p><p><em> weapons = {"weapon_deagle2"},</em></p><p><em> command = "guard",</em></p><p><em> max = 1,</em></p><p><em> salary = 90,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = true,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_JUH = DarkRP.createJob("Juggernaut", {</em></p><p><em> color = Color(20, 20, 255, 255),</em></p><p><em> model = "models/player/lordvipes/me2_legion/legion_cvp.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {"m9k_minigun"}, -- You may wanna find a pickpocket swep and add it here.</em></p><p><em> command = "jug",</em></p><p><em> max = 1,</em></p><p><em> salary = 200,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Citizens",</em></p><p><em> PlayerSpawn = function(ply) ply:SetHealth(500) end,</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_SWATL = DarkRP.createJob("SWAT Leader", {</em></p><p><em> color = Color(20, 20, 255, 255),</em></p><p><em> model = {"models/player/imc_grunt_anti_titan.mdl"},</em></p><p><em> description = [[The protector of every citizen that lives in the city.</em></p><p><em> You have the power to arrest criminals and protect innocents.</em></p><p><em> Hit a player with your arrest baton to put them in jail.</em></p><p><em> Bash a player with a stunstick and they may learn to obey the law.</em></p><p><em> The Battering Ram can break down the door of a criminal, with a warrant for their arrest.</em></p><p><em> The Battering Ram can also unfreeze frozen props (if enabled).</em></p><p><em> Type /wanted <name> to alert the public to the presence of a criminal.]],</em></p><p><em> weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},</em></p><p><em> command = "SwatL",</em></p><p><em> max = 1,</em></p><p><em> salary = 240,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = true,</em></p><p><em> help = {</em></p><p><em> "Please don't abuse your job",</em></p><p><em> "When you arrest someone they are auto transported to jail.",</em></p><p><em> "They are auto let out of jail after some time",</em></p><p><em> "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",</em></p><p><em> "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",</em></p><p><em> "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",</em></p><p><em> "Type /jailpos to set the jail position"</em></p><p><em> },</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_POLICES = DarkRP.createJob("Police Officer", {</em></p><p><em> color = Color(34, 52, 211, 255),</em></p><p><em> model = {"models/ninja/beffect/quarfrog.mdl"},</em></p><p><em> description = [[The protector of every citizen that lives in the city.</em></p><p><em> You have the power to arrest criminals and protect innocents.</em></p><p><em> Hit a player with your arrest baton to put them in jail.</em></p><p><em> Bash a player with a stunstick and they may learn to obey the law]],</em></p><p><em> weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},</em></p><p><em> command = "polices",</em></p><p><em> max = 10,</em></p><p><em> salary = 100,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = true,</em></p><p><em> candemote = true,</em></p><p><em> -- CustomCheck</em></p><p><em> medic = false,</em></p><p><em> chief = false,</em></p><p><em> mayor = false,</em></p><p><em> hobo = false,</em></p><p><em> cook = false,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em> TEAM_SWATM = DarkRP.createJob("S.W.A.T Medic", {</em></p><p><em> color = Color(80, 45, 0, 255),</em></p><p><em> model = "models/ninja/beffect/titanfall_dm_quarian_f.mdl",</em></p><p><em> description = [[This is a donator special job,</em></p><p><em> your duty is to heal on of your</em></p><p><em> wounded operatives. You should stay in the PD</em></p><p><em> until backup is needed.</em></p><p><em> Do everything you can to keep the city safe.</em></p><p><em> You also keep your team healed.]],</em></p><p><em> weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker", "med_kit"},</em></p><p><em> command = "swatm",</em></p><p><em> max = 3,</em></p><p><em> salary = 450,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> category = "Citizens",</em></p><p><em> hasLicense = true,</em></p><p><em></em></p><p><em> })</em></p><p><em></em></p><p><em>TEAM_SWATS = DarkRP.createJob("Swat Sniper", {</em></p><p><em> color = Color(20, 20, 255, 255),</em></p><p><em> model = "models/player/imc_grunt_anti_titan.mdl",</em></p><p><em> description = [[The protector of every citizen that lives in the city.</em></p><p><em> You have the power to arrest criminals and protect innocents.</em></p><p><em> Hit a player with your arrest baton to put them in jail.</em></p><p><em> Bash a player with a stunstick and they may learn to obey the law.</em></p><p><em> The Battering Ram can break down the door of a criminal, with a warrant for their arrest.</em></p><p><em> The Battering Ram can also unfreeze frozen props (if enabled).</em></p><p><em> Type /wanted <name> to alert the public to the presence of a criminal.]],</em></p><p><em> weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"},</em></p><p><em> command = "SwatS",</em></p><p><em> max = 1,</em></p><p><em> salary = 350,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = true,</em></p><p><em> help = {</em></p><p><em> "Please don't abuse your job",</em></p><p><em> "When you arrest someone they are auto transported to jail.",</em></p><p><em> "They are auto let out of jail after some time",</em></p><p><em> "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",</em></p><p><em> "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",</em></p><p><em> "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",</em></p><p><em> "Type /jailpos to set the jail position"</em></p><p><em> },</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_MTHIEF = DarkRP.createJob("Master Thief", {</em></p><p><em> color = Color(0, 0, 0, 255),</em></p><p><em> model = "models/mark2580/mass_effect_3/me3_kasumi_goto_player.mdl",</em></p><p><em> description = [[You are a thief, rob people, lockpick their house and steal their plants and legal printers.]],</em></p><p><em> weapons = {"lockpick", "m9k_tec9", "pickpocket "}, -- You may wanna find a pickpocket swep and add it here.</em></p><p><em> command = "mthief",</em></p><p><em> max = 4,</em></p><p><em> salary = 110,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_ADMIN = DarkRP.createJob("Administrator on Duty", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/player/masterchiefh2_blue.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {},</em></p><p><em> command = "saod",</em></p><p><em> max = 0,</em></p><p><em> salary = 550,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Staff",</em></p><p><em> customCheck = function(ply) return </em></p><p><em> table.HasValue({"administrator","superadmin",}, ply:GetNWString("usergroup"))</em></p><p><em> end,</em></p><p><em> CustomCheckFailMsg = "This Job Is For Staff Only!",</em></p><p> <em>})</em></p><p><em></em></p><p> <em>TEAM_OWNER = DarkRP.createJob("Owner", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/player/jane_shepard.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {},</em></p><p><em> command = "ood",</em></p><p><em> max = 0,</em></p><p><em> salary = 5000,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Staff",</em></p><p><em> customCheck = function(ply) return </em></p><p><em> table.HasValue({"superadmin",}, ply:GetNWString("usergroup"))</em></p><p><em> end,</em></p><p><em> CustomCheckFailMsg = "This Job Is For Staff Only!",</em></p><p> <em>})</em></p><p><em></em></p><p><em> TEAM_HOS = DarkRP.createJob("Head of Staff", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/player/masterchiefh2_red.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {},</em></p><p><em> command = "hos",</em></p><p><em> max = 0,</em></p><p><em> salary = 550,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Staff",</em></p><p><em> customCheck = function(ply) return </em></p><p><em> table.HasValue({"hos", "superadmin",}, ply:GetNWString("usergroup"))</em></p><p><em> end,</em></p><p><em> CustomCheckFailMsg = "This Job Is For Staff Only!",</em></p><p> <em>})</em></p><p><em></em></p><p><em> TEAM_DPT = DarkRP.createJob("Bus Driver", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/player/combine_super_soldier.mdl",</em></p><p><em> description = [[]],</em></p><p><em> weapons = {},</em></p><p><em> command = "bd",</em></p><p><em> max = 6,</em></p><p><em> salary = 550,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Citizens",</em></p><p><em> customCheck = function(ply) return </em></p><p><em> table.HasValue({"transport",}, ply:GetNWString("usergroup"))</em></p><p><em> end,</em></p><p><em> CustomCheckFailMsg = "This Job Is For Staff Only!",</em></p><p> <em>})</em></p><p><em></em></p><p><em>TEAM_NGUN = DarkRP.createJob("Gun Dealer", {</em></p><p><em> color = Color(255, 140, 0, 255),</em></p><p><em> model = "models/player/scifi_male_06.mdl",</em></p><p><em> description = [[A Gun Dealer is the only person who can sell guns to other people.</em></p><p><em> Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],</em></p><p><em> weapons = {},</em></p><p><em> command = "gundealer",</em></p><p><em> max = 2,</em></p><p><em> salary = GAMEMODE.Config.normalsalary,</em></p><p><em> admin = 0,</em></p><p><em> category = "Citizens",</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_SGUN = DarkRP.createJob("Supreme Gun Dealer", {</em></p><p><em> color = Color(255, 140, 0, 255),</em></p><p><em> model = "models/wrex/wrex.mdl",</em></p><p><em> description = [[A Gun Dealer is the only person who can sell guns to other people.</em></p><p><em> Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],</em></p><p><em> weapons = {},</em></p><p><em> command = "sgundealer",</em></p><p><em> max = 2,</em></p><p><em> salary = 500,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> category = "Citizens",</em></p><p><em> hasLicense = false,</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_MAYOR = DarkRP.createJob("Mayor", {</em></p><p><em> color = Color(150, 20, 20, 255),</em></p><p><em> model = "models/rottweiler/freeman.mdl",</em></p><p><em> description = [[The Mayor of the city creates laws to govern the city.</em></p><p><em> If you are the mayor you may create and accept warrants.</em></p><p><em> Type /wanted <name> to warrant a player.</em></p><p><em> Type /jailpos to set the Jail Position.</em></p><p><em> Type /lockdown initiate a lockdown of the city.</em></p><p><em> Everyone must be inside during a lockdown.</em></p><p><em> The cops patrol the area.</em></p><p><em> /unlockdown to end a lockdown]],</em></p><p><em> weapons = {},</em></p><p><em> command = "mayor",</em></p><p><em> max = 1,</em></p><p><em> salary = GAMEMODE.Config.normalsalary * 1.89,</em></p><p><em> admin = 0,</em></p><p><em> vote = true,</em></p><p><em> hasLicense = false,</em></p><p><em> mayor = true,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_GANG = DarkRP.createJob("Gangster", {</em></p><p><em> color = Color(75, 75, 75, 255),</em></p><p><em> model = {</em></p><p><em> "models/fearless/don1.mdl",</em></p><p><em> description = [[The lowest person of crime.</em></p><p><em> A gangster generally works for the Mobboss who runs the crime family.</em></p><p><em> The Mob boss sets your agenda and you follow it or you might be punished.]],</em></p><p><em> weapons = {},</em></p><p><em> command = "gangster",</em></p><p><em> max = 3,</em></p><p><em> salary = GAMEMODE.Config.normalsalary,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_MOB = DarkRP.createJob("Mob boss", {</em></p><p><em> color = Color(25, 25, 25, 255),</em></p><p><em> model = "models/fearless/bsuit04.mdl",</em></p><p><em> description = [[The Mob boss is the boss of the criminals in the city.</em></p><p><em> With his power he coordinates the gangsters and forms an efficient crime organization.</em></p><p><em> He has the ability to break into houses by using a lockpick.</em></p><p><em> The Mob boss posesses the ability to unarrest you.]],</em></p><p><em> weapons = {"lockpick", "unarrest_stick"},</em></p><p><em> command = "mobboss",</em></p><p><em> max = 1,</em></p><p><em> salary = GAMEMODE.Config.normalsalary * 1.34,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em>TEAM_HOBO = DarkRP.createJob("Hobo", {</em></p><p><em> color = Color(80, 45, 0, 255),</em></p><p><em> model = "models/husk/slow.mdl",</em></p><p><em> description = [[The lowest member of society. Everybody laughs at you.</em></p><p><em> You have no home.</em></p><p><em> Beg for your food and money</em></p><p><em> Sing for everyone who passes to get money</em></p><p><em> Make your own wooden home somewhere in a corner or outside someone else's door]],</em></p><p><em> weapons = {"weapon_bugbait"},</em></p><p><em> command = "hobo",</em></p><p><em> max = 5,</em></p><p><em> salary = 0,</em></p><p><em> admin = 0,</em></p><p><em> vote = false,</em></p><p><em> hasLicense = false,</em></p><p><em> candemote = false,</em></p><p><em> hobo = true,</em></p><p><em> category = "Citizens",</em></p><p><em>})</em></p><p><em></em></p><p><em></em></p><p><em>--[[---------------------------------------------------------------------------</em></p><p><em>Define which team joining players spawn into and what team you change to if demoted</em></p><p><em>---------------------------------------------------------------------------]]</em></p><p><em>GAMEMODE.DefaultTeam = TEAM_CITIZEN</em></p><p><em></em></p><p><em></em></p><p><em>--[[---------------------------------------------------------------------------</em></p><p><em>Define which teams belong to civil protection</em></p><p><em>Civil protection can set warrants, make people wanted and do some other police related things</em></p><p><em>---------------------------------------------------------------------------]]</em></p><p><em>GAMEMODE.CivilProtection = {</em></p><p><em> [TEAM_POLICE] = true,</em></p><p><em> [TEAM_CHIEF] = true,</em></p><p><em> [TEAM_MAYOR] = true,</em></p><p><em>}</em></p><p><em></em></p><p><em>--[[---------------------------------------------------------------------------</em></p><p><em>Jobs that are hitmen (enables the hitman menu)</em></p><p><em>---------------------------------------------------------------------------]]</em></p><p><em>DarkRP.addHitmanTeam(TEAM_MOB)</em></p><p><em></em></p><p><em></em></p></blockquote><p></p>
[QUOTE="Kristo, post: 382909, member: 56515"] Hi All, I have been developing a GMOD Server recently however I keep getting errors from my jobs.lua script everytime I copy it into the server files to work. An Example of this error is [B] ')' expected (to close '(' at line 51) near '=' [/B] My script is found below. -[I]-[[--------------------------------------------------------------------------- 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_CITIZEN = DarkRP.createJob("Citizen", { color = Color(20, 150, 20, 255), model = { "models/player/Group01/Female_01.mdl", "models/player/Group01/Female_02.mdl", "models/player/Group01/Female_03.mdl", "models/player/Group01/Female_04.mdl", "models/player/Group01/Female_06.mdl", "models/player/group01/male_01.mdl", "models/player/Group01/Male_02.mdl", "models/player/Group01/male_03.mdl", "models/player/Group01/Male_04.mdl", "models/player/Group01/Male_05.mdl", "models/player/Group01/Male_06.mdl", "models/player/Group01/Male_07.mdl", "models/player/Group01/Male_08.mdl", "models/player/Group01/Male_09.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 = GAMEMODE.Config.normalsalary, admin = 0, vote = false, hasLicense = false, candemote = false, category = "Citizens", }) TEAM_SS = DarkRP.createJob("Secret Service", { color = Color(100, 20, 20, 255), model = "models/lt_c/sci_fi/humans/male_bill.mdl" }, description = [[You are responsible for protecting the mayor.]], weapons = {"weapon_deagle2", "stunstick", "weaponchecker"}, command = "ss", max = 2, salary = 100, admin = 0, vote = true, hasLicense = false, ammo = { ["pistol"] = 60, }, category = "Citizens", }) TEAM_SWAT = DarkRP.createJob("SWAT", { color = Color(25, 25, 170, 255), model = {"models/player/imc_grunt_anti_titan.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"}, command = "Swat", max = 4, salary = 150, 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 = "Citizens", }) TEAM_MOD = DarkRP.createJob("Moderator on Duty", { color = Color(150, 20, 20, 255), model = "models/player/masterchiefh2.mdl", description = [[]], weapons = {}, command = "modd", max = 0, salary = 550, admin = 0, vote = false, hasLicense = false, category = "Staff", customCheck = function(ply) return table.HasValue({"moderator","superadmin"}, ply:GetNWString("usergroup")) end, CustomCheckFailMsg = "This Job Is For Staff Only!", }) TEAM_MD = DarkRP.createJob("Mayors Daughter", { color = Color(255,100,100,255), model = "models/lt_c/sci_fi/humans/female_wraith.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 = {}, command = "mayorsdaughter", max = 1, salary = 50, admin = 0, vote = false, hasLicense = false category = "Citizens" }) TEAM_GUARD = DarkRP.createJob("Guard", { color = Color(0,200,50,255), model = "models/player/guard_pack/guard_01.mdl", "models/player/guard_pack/guard_02.mdl", description = [[People will pay for protection, use your weapon or buy one from the local gundealer.]], weapons = {"weapon_deagle2"}, command = "guard", max = 1, salary = 90, admin = 0, vote = false, hasLicense = true, category = "Citizens", }) TEAM_JUH = DarkRP.createJob("Juggernaut", { color = Color(20, 20, 255, 255), model = "models/player/lordvipes/me2_legion/legion_cvp.mdl", description = [[]], weapons = {"m9k_minigun"}, -- You may wanna find a pickpocket swep and add it here. command = "jug", max = 1, salary = 200, admin = 0, vote = true, hasLicense = false, category = "Citizens", PlayerSpawn = function(ply) ply:SetHealth(500) end, }) TEAM_SWATL = DarkRP.createJob("SWAT Leader", { color = Color(20, 20, 255, 255), model = {"models/player/imc_grunt_anti_titan.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"}, command = "SwatL", max = 1, salary = 240, 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 = "Citizens", }) TEAM_POLICES = DarkRP.createJob("Police Officer", { color = Color(34, 52, 211, 255), model = {"models/ninja/beffect/quarfrog.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]], weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "handcuffs"}, command = "polices", max = 10, salary = 100, admin = 0, vote = true, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Citizens", }) TEAM_SWATM = DarkRP.createJob("S.W.A.T Medic", { color = Color(80, 45, 0, 255), model = "models/ninja/beffect/titanfall_dm_quarian_f.mdl", description = [[This is a donator special job, your duty is to heal on of your wounded operatives. You should stay in the PD until backup is needed. Do everything you can to keep the city safe. You also keep your team healed.]], weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker", "med_kit"}, command = "swatm", max = 3, salary = 450, admin = 0, vote = true, category = "Citizens", hasLicense = true, }) TEAM_SWATS = DarkRP.createJob("Swat Sniper", { color = Color(20, 20, 255, 255), model = "models/player/imc_grunt_anti_titan.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"}, command = "SwatS", max = 1, salary = 350, 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 = "Citizens", }) TEAM_MTHIEF = DarkRP.createJob("Master Thief", { color = Color(0, 0, 0, 255), model = "models/mark2580/mass_effect_3/me3_kasumi_goto_player.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 = "mthief", max = 4, salary = 110, admin = 0, vote = false, hasLicense = false, category = "Citizens", }) TEAM_ADMIN = DarkRP.createJob("Administrator on Duty", { color = Color(150, 20, 20, 255), model = "models/player/masterchiefh2_blue.mdl", description = [[]], weapons = {}, command = "saod", max = 0, salary = 550, admin = 0, vote = false, hasLicense = false, category = "Staff", customCheck = function(ply) return table.HasValue({"administrator","superadmin",}, ply:GetNWString("usergroup")) end, CustomCheckFailMsg = "This Job Is For Staff Only!", }) TEAM_OWNER = DarkRP.createJob("Owner", { color = Color(150, 20, 20, 255), model = "models/player/jane_shepard.mdl", description = [[]], weapons = {}, command = "ood", max = 0, salary = 5000, admin = 0, vote = false, hasLicense = false, category = "Staff", customCheck = function(ply) return table.HasValue({"superadmin",}, ply:GetNWString("usergroup")) end, CustomCheckFailMsg = "This Job Is For Staff Only!", }) TEAM_HOS = DarkRP.createJob("Head of Staff", { color = Color(150, 20, 20, 255), model = "models/player/masterchiefh2_red.mdl", description = [[]], weapons = {}, command = "hos", max = 0, salary = 550, admin = 0, vote = false, hasLicense = false, category = "Staff", customCheck = function(ply) return table.HasValue({"hos", "superadmin",}, ply:GetNWString("usergroup")) end, CustomCheckFailMsg = "This Job Is For Staff Only!", }) TEAM_DPT = DarkRP.createJob("Bus Driver", { color = Color(150, 20, 20, 255), model = "models/player/combine_super_soldier.mdl", description = [[]], weapons = {}, command = "bd", max = 6, salary = 550, admin = 0, vote = false, hasLicense = false, category = "Citizens", customCheck = function(ply) return table.HasValue({"transport",}, ply:GetNWString("usergroup")) end, CustomCheckFailMsg = "This Job Is For Staff Only!", }) TEAM_NGUN = DarkRP.createJob("Gun Dealer", { color = Color(255, 140, 0, 255), model = "models/player/scifi_male_06.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, category = "Citizens", vote = false, hasLicense = false, }) TEAM_SGUN = DarkRP.createJob("Supreme Gun Dealer", { color = Color(255, 140, 0, 255), model = "models/wrex/wrex.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 = "sgundealer", max = 2, salary = 500, admin = 0, vote = true, category = "Citizens", hasLicense = false, }) TEAM_MAYOR = DarkRP.createJob("Mayor", { color = Color(150, 20, 20, 255), model = "models/rottweiler/freeman.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 = "Citizens", }) TEAM_GANG = DarkRP.createJob("Gangster", { color = Color(75, 75, 75, 255), model = { "models/fearless/don1.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 = "gangster", max = 3, salary = GAMEMODE.Config.normalsalary, admin = 0, vote = false, hasLicense = false, category = "Citizens", }) TEAM_MOB = DarkRP.createJob("Mob boss", { color = Color(25, 25, 25, 255), model = "models/fearless/bsuit04.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 = "Citizens", }) TEAM_HOBO = DarkRP.createJob("Hobo", { color = Color(80, 45, 0, 255), model = "models/husk/slow.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", }) --[[--------------------------------------------------------------------------- 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) [/I] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
LUA Errors
Top