Hello,
ik have darkrp server but i have a error with my jobs can someone fix this?
Jobs.lua:
[code]--[[---------------------------------------------------------------------------
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:
https://github.com/FPtje/DarkRP/blob...jobrelated.lua
For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields
Add jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(43, 186, 83, 255),
model = {"models/player/Group01/male_07.mdl"},
description = [[A Citizen]],
weapons = {},
command = "citizen",
max = 32,
salary = 150,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = rgb(0,0,0),
model = {"models/player/riot.mdl"},
description = [[A Police Officer]],
weapons = {m9k_m92beretta,pocket,keys,weapon_fists,weapon_ph ysgun,taser,gmod_tool,gmod_camera,arrest_stick,una rrest_stick},
command = "police",
max = 6,
salary = 250,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
-- CustomCheck
medic = false,
chief = true,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_POLICE_SERGEANT = DarkRP.createJob("Police Sergeant", {
color = Color(30, 27, 130, 255),
model = {"models/player/urban.mdl"},
description = [[A Police Sergeant]],
weapons = {m9k_m92beretta,m9k_spas12,pocket,keys,weapon_fist s,weapon_physgun,taser,gmod_tool,gmod_camera,arres t_stick,unarrest_stick},
command = "policesergeant",
max = 1,
salary = 300,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
-- CustomCheck
medic = false,
chief = true,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_PRESIDENT = DarkRP.createJob("President", {
color = Color(255, 0, 0, 255),
model = {"models/player/gman_high.mdl"},
description = [[A President]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera},
command = "president",
max = 1,
salary = 750,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = true,
hobo = false,
cook = false,
category = "",
})
TEAM_VICE_PRESIDENT = DarkRP.createJob("Vice President", {
color = Color(255, 0, 0, 255),
model = {"models/player/breen.mdl"},
description = [[A Vice President]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera},
command = "vicepresident",
max = 1,
salary = 650,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = true,
hobo = false,
cook = false,
category = "",
})
TEAM_SWAT = DarkRP.createJob("S.W.A.T", {
color = Color(16, 0, 114, 255),
model = {"models/player/swat.mdl"},
description = [[A S.W.A.T]],
weapons = {m9k_deagle,m9k_m4a1,pocket,keys,weapon_fists,weap on_physgun,taser,gmod_tool,gmod_camera,arrest_stic k,unarrest_stick,door_ram},
command = "swat",
max = 4,
salary = 350,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
-- CustomCheck
medic = false,
chief = true,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_REBEL = DarkRP.createJob("Rebel", {
color = Color(16, 0, 114, 255),
model = {"models/player/Group03/male_02.mdl"},
description = [[A Rebel]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera},
command = "rebel",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_REBEL_LEADER = DarkRP.createJob("Rebel Leader", {
color = Color(19, 145, 137, 255),
model = {"models/player/Group03/male_03.mdl"},
description = [[A Rebel Leader]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera,lockpick},
command = "rebelleader",
max = 1,
salary = 150,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_CHEF = DarkRP.createJob("Chef", {
color = Color(255, 198, 0, 255),
model = {"models/player/hostage/hostage_01.mdl"},
description = [[A Chef]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera},
command = "chef",
max = 3,
salary = 150,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = true,
category = "",
})
TEAM_PARAMEDIC = DarkRP.createJob("Paramedic", {
color = Color(255, 198, 0, 255),
model = {"models/player/kleiner.mdl"},
description = [[A Paramedic]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera,med_kit},
command = "paramedic",
max = 3,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = true,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "",
})
TEAM_HOBO = DarkRP.createJob("Hobo", {
color = Color(66, 57, 24, 255),
model = {"models/player/eli.mdl"},
description = [[A Hobo]],
weapons = {pocket,keys,weapon_fists,weapon_physgun,gmod_tool ,gmod_camera,lockpick},
command = "hobo",
max = 6,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = true,
cook = false,
category = "",
})
--[[---------------------------------------------------------------------------
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_POLICE_SERGEANT] = true,
[TEAM_SWAT] = true,
[TEAM_VICE_PRESIDENT] = true,
[TEAM_PRESIDENT] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_REBEL_LEADER)[/code]
What's the error?
U got: [lua]TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = rgb(0,0,0),
model = {"models/player/riot.mdl"},
description = [[A Police Officer]],
weapons = {m9k_m92beretta,pocket,keys,weapon_fists,weapon_ph ysgun,taser,gmod_tool,gmod_camera,arrest_stick,una rrest_stick}, -- <---Right here
command = "police",
max = 6,
salary = 250,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,[/lua]
spaces?
[lua]TEAM_POLICE_SERGEANT = DarkRP.createJob("Police Sergeant", {
color = Color(30, 27, 130, 255),
model = {"models/player/urban.mdl"},
description = [[A Police Sergeant]],
weapons = {m9k_m92beretta,m9k_spas12,pocket,keys,weapon_fist s,weapon_physgun,taser,gmod_tool,gmod_camera,arres t_stick,unarrest_stick}, -- Spaces?
command = "policesergeant",
max = 1,
salary = 300,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
-- CustomCheck[/lua]
check all the weapons, u miss tons of spaces
snip misunderstood
What weapons SHOULD look like:
[CODE]{"m9k_m92beretta","m9k_spas12","pocket","keys","weapon_fists","weapon_physgun","taser","gmod_tool","gmod_camera","arrest_stick","unarrest_stick"}[/CODE]
1. You have random spaces in the weapons.
2. Weapons are STRINGS. Not nil variables.
3. Posting the actual error (or even reading it) initially will help immensely.
Sorry, you need to Log In to post a reply to this thread.