Hey people of facepunch this is my last resort but I am getting lua errors on my server and i just cant see what is wrong can someone help me plz? here is the error:
[ERROR] gamemodes/darkrp/gamemode/config/jobrelated.lua:61: '}' expected (to clo
se '{' at line 54) near 'command'
1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:0
And here is my jobrelated.lua
/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {"models/player/Group01/Female_02.mdl","models/player/Group01/Male_07.mdl",
"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 = [[Civilian - The starting job when a player joins. Has no role. May start a business. RAID = YES]],
weapons = {"keys", "pocket"},
command = "citizen",
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = {
"models/player/gman_high.mdl"
},
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"}
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = {
"models/player/gman_high.mdl"},
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"}
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
medic = true
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = deputy
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
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"
}
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "\addons\Combine Adminstrators\models\Taggart\gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
command = "",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
PlayerDeath = function(ply, weapon, killer)
if( ply:Team() == TEAM_MAYOR ) then
ply:changeTeam( GAMEMODE.DefaultTeam, true )
for k,v in pairs( player.GetAll() ) do
v:PrintMessage( HUD_PRINTCENTER, "The mayor has been killed!" )
end
end
end
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"\addons\MafiaPlayerModels\models\humans\mafia\male_02.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\male_04.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\male_06.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\male_07.mdl",},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of a cartel. The drugs are made by him. Makes the most money! Setup a front compa
For future reference, put your code in [code] tags. Try this
[code]
/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {"models/player/Group01/Female_02.mdl","models/player/Group01/Male_07.mdl",
"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 = [[Civilian - The starting job when a player joins. Has no role. May start a business. RAID = YES]],
weapons = {"keys", "pocket"},
command = "citizen",
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"},
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
medic = true
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = deputy
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
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"
}
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "\addons\Combine Adminstrators\models\Taggart\gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
command = "",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
PlayerDeath = function(ply, weapon, killer)
if( ply:Team() == TEAM_MAYOR ) then
ply:changeTeam( GAMEMODE.DefaultTeam, true )
for k,v in pairs( player.GetAll() ) do
v:PrintMessage( HUD_PRINTCENTER, "The mayor has been killed!" )
end
end
end
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_02.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_04.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_06.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_07.mdl",},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of a cartel. The drugs are made by him. Makes the most money! Setup a front company! RAID = YES]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "columbianboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_COLUMBIAN_MEMBER
help = {
"As the Columbian boss, you decide what you want the other Columbians to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Columbians' agenda. Use // to go to the next line."
}
})
TEAM_POLICE = DarkRP.createJob("Tresurer", {
color = Color(255, 255, 255, 255),
model = {
"\addons\Combine Adminstrators\models\humans\suitfem\female_02.mdl"
},
description = [[Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.]],
weapons = {"keys", "pocket"},
command = "Treasurer",
max = 1,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
help = {"Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct th
You're missing a comma on the end of line 60.
[QUOTE=dingusnin;43265563]You're missing a comma on the end of line 60.[/QUOTE]
And at the end of 73.
You're missing a few commas.
And also, you shouldn't be editing DarkRP core files like that.
[URL="http://wiki.darkrp.com/index.php/DarkRP:ModifyingDarkRP"]http://wiki.darkrp.com/index.php/DarkRP:ModifyingDarkRP[/URL]
Thank you code_gs but now it is giving me these errors
[ERROR] gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:525: ba
d argument #1 to 'SetTeam' (number expected, got nil)
1. SetTeam - [C]:-1
2. initPlayer - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.
lua:525
3. unknown - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lu
a:544
[ERROR] gamemodes/darkrp/gamemode/config/jobrelated.lua:106: '}' expected (to cl
ose '{' at line 95) near 'medic'
1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:0
Post your code in [code] tags of your sv_gamemode_functions.lua. Here's the code to fix the second error.
[code]/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {"models/player/Group01/Female_02.mdl","models/player/Group01/Male_07.mdl",
"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 = [[Civilian - The starting job when a player joins. Has no role. May start a business. RAID = YES]],
weapons = {"keys", "pocket"},
command = "citizen",
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"},
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = deputy
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
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"
}
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "\addons\Combine Adminstrators\models\Taggart\gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
command = "",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
PlayerDeath = function(ply, weapon, killer)
if( ply:Team() == TEAM_MAYOR ) then
ply:changeTeam( GAMEMODE.DefaultTeam, true )
for k,v in pairs( player.GetAll() ) do
v:PrintMessage( HUD_PRINTCENTER, "The mayor has been killed!" )
end
end
end
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_02.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_04.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_06.mdl",
"\addons\MafiaPlayerModels\models\humans\mafia\mal e_07.mdl",},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of a cartel. The drugs are made by him. Makes the most money! Setup a front company! RAID = YES]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "columbianboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_COLUMBIAN_MEMBER
help = {
"As the Columbian boss, you decide what you want the other Columbians to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Columbians' agenda. Use // to go to the next line."
}
})
TEAM_POLICE = DarkRP.createJob("Tresurer", {
color = Color(255, 255, 255, 255),
model = {
"\addons\Combine Adminstrators\models\humans\suitfem\female_02.mdl"
},
description = [[Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.]],
weapons = {"keys", "pocket"},
command = "Treasurer",
max = 1,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
help = {"Controls the town's treasury and budget. Treasury is top priorty f
Here is the sv_gamemode_functions.lua [CODE]/*---------------------------------------------------------------------------
DarkRP hooks
---------------------------------------------------------------------------*/
function GM:Initialize()
self.BaseClass:Initialize()
end
function GM:playerBuyDoor( objPl, objEnt )
return true;
end
function GM:getDoorCost( objPl, objEnt )
return GAMEMODE.Config.doorcost ~= 0 and GAMEMODE.Config.doorcost or 30;
end
function GM:getVehicleCost( objPl, objEnt )
return GAMEMODE.Config.vehiclecost ~= 0 and GAMEMODE.Config.vehiclecost or 40;
end
function GM:CanChangeRPName(ply, RPname)
if string.find(RPname, "\160") or string.find(RPname, " ") == 1 then -- disallow system spaces
return false
end
if table.HasValue({"ooc", "shared", "world", "n/a", "world prop"}, RPname) then
return false
end
end
function GM:canDemote(ply, target, reason)
end
function GM:canVote(ply, vote)
end
function GM:playerWalletChanged(ply, amount)
end
function GM:playerGetSalary(ply, amount)
end
function GM:DarkRPVarChanged(ply, var, oldvar, newvalue)
end
function GM:playerBoughtVehicle(ply, ent, cost)
end
function GM:playerBoughtDoor(ply, ent, cost)
end
function GM:canDropWeapon(ply, weapon)
if not IsValid(weapon) then return false end
local class = string.lower(weapon:GetClass())
local team = ply:Team()
if not GAMEMODE.Config.dropspawnedweapons then
if RPExtraTeams[team] and table.HasValue(RPExtraTeams[team].weapons, class) then return false end
end
if self.Config.DisallowDrop[class] then return false end
if not GAMEMODE.Config.restrictdrop then return true end
for k,v in pairs(CustomShipments) do
if v.entity ~= class then continue end
return true
end
return false
end
function GM:DatabaseInitialized()
DarkRP.initDatabase()
end
function GM:canSeeLogMessage(ply, message, colour)
return ply:IsAdmin()
end
function GM:UpdatePlayerSpeed(ply)
if ply:isArrested() then
GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.arrestspeed, GAMEMODE.Config.arrestspeed)
elseif ply:isCP() then
GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.walkspeed, GAMEMODE.Config.runspeedcp)
else
GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.walkspeed, GAMEMODE.Config.runspeed)
end
end
/*---------------------------------------------------------
Gamemode functions
---------------------------------------------------------*/
function GM:PlayerSpawnProp(ply, model)
-- If prop spawning is enabled or the user has admin or prop privileges
local allowed = ((GAMEMODE.Config.propspawning or (FAdmin and FAdmin.Access.PlayerHasPrivilege(ply, "rp_prop")) or ply:IsAdmin()) and true) or false
if ply:isArrested() then return false end
model = string.gsub(tostring(model), "\\", "/")
model = string.gsub(tostring(model), "//", "/")
if RPExtraTeams[ply:Team()] and RPExtraTeams[ply:Team()].PlayerSpawnProp then
RPExtraTeams[ply:Team()].PlayerSpawnProp(ply, model)
end
if not allowed then return false end
return self.BaseClass:PlayerSpawnProp(ply, model)
end
function GM:PlayerSpawnedProp(ply, model, ent)
self.BaseClass:PlayerSpawnedProp(ply, model, ent)
ent.SID = ply.SID
ent:CPPISetOwner(ply)
local phys = ent:GetPhysicsObject()
if phys and phys:IsValid() then
ent.RPOriginalMass = phys:GetMass()
end
if GAMEMODE.Config.proppaying then
if ply:canAfford(GAMEMODE.Config.propcost) then
DarkRP.notify(ply, 0, 4, DarkRP.getPhrase("deducted", GAMEMODE.Config.currency, GAMEMODE.Config.propcost))
ply:addMoney(-GAMEMODE.Config.propcost)
else
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("need", GAMEMODE.Config.currency, GAMEMODE.Config.propcost))
return false
end
end
end
function GM:PlayerSpawnSENT(ply, class)
if GAMEMODE.Config.adminsents and ply:EntIndex() ~= 0 and not ply:IsAdmin() then
DarkRP.notify(ply, 1, 2, DarkRP.getPhrase("need_admin", "gm_spawnsent"))
return false
end
return self.BaseClass:PlayerSpawnSENT(ply, class) and not ply:isArrested()
end
function GM:PlayerSpawnedSENT(ply, ent)
self.BaseClass:PlayerSpawnedSENT(ply, ent)
DarkRP.log(ply:Nick().." ("..ply:SteamID()..") spawned SENT "..ent:GetClass(), Color(255, 255, 0))
end
local function canSpawnWeapon(ply)
if (GAMEMODE.Config.adminweapons == 0 and ply:IsAdmin()) or
(GAMEMODE.Config.adminweapons == 1 and ply:IsSuperAdmin()) then
return true
end
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("cant_spawn_weapons"))
return false
end
function GM:PlayerSpawnSWEP(ply, class, info)
return canSpawnWeapon(ply) and self.BaseClass:PlayerSpawnSWEP(ply, class, info) and not ply:isArrested()
end
function GM:PlayerGiveSWEP(ply, class, info)
return canSpawnWeapon(ply) and self.BaseClass:PlayerGiveSWEP(ply, class, info) and not ply:isArrested()
end
function GM:PlayerSpawnEffect(ply, model)
return self.BaseClass:PlayerSpawnEffect(ply, model) and not ply:isArrested()
end
function GM:PlayerSpawnVehicle(ply, model, class, info)
if GAMEMODE.Config.adminvehicles and ply:EntIndex() ~= 0 and not ply:IsAdmin() then
DarkRP.notify(ply, 1, 2, DarkRP.getPhrase("need_admin", "gm_spawnvehicle"))
return false
end
return self.BaseClass:PlayerSpawnVehicle(ply, model, class, info) and not ply:isArrested()
end
function GM:PlayerSpawnedVehicle(ply, ent)
self.BaseClass:PlayerSpawnedVehicle(ply, ent)
DarkRP.log(ply:Nick().." ("..ply:SteamID()..") spawned Vehicle "..ent:GetClass(), Color(255, 255, 0))
end
function GM:PlayerSpawnNPC(ply, type, weapon)
if GAMEMODE.Config.adminnpcs and ply:EntIndex() ~= 0 and not ply:IsAdmin() then
DarkRP.notify(ply, 1, 2, DarkRP.getPhrase("need_admin", "gm_spawnnpc"))
return false
end
return self.BaseClass:PlayerSpawnNPC(ply, type, weapon) and not ply:isArrested()
end
function GM:PlayerSpawnedNPC(ply, ent)
self.BaseClass:PlayerSpawnedNPC(ply, ent)
DarkRP.log(ply:Nick().." ("..ply:SteamID()..") spawned NPC "..ent:GetClass(), Color(255, 255, 0))
end
function GM:PlayerSpawnRagdoll(ply, model)
return self.BaseClass:PlayerSpawnRagdoll(ply, model) and not ply:isArrested()
end
function GM:PlayerSpawnedRagdoll(ply, model, ent)
self.BaseClass:PlayerSpawnedRagdoll(ply, model, ent)
ent.SID = ply.SID
end
function GM:EntityRemoved(ent)
self.BaseClass:EntityRemoved(ent)
if ent:IsVehicle() then
local found = ent:CPPIGetOwner()
if IsValid(found) then
found.Vehicles = found.Vehicles or 1
found.Vehicles = found.Vehicles - 1
end
end
local owner = ent.Getowning_ent and ent:Getowning_ent() or Player(ent.SID or 0)
if ent.DarkRPItem and IsValid(owner) then owner:removeCustomEntity(ent.DarkRPItem) end
if ent.isKeysOwnable and ent:isKeysOwnable() then ent:removeDoorData() end
end
function GM:ShowSpare1(ply)
if RPExtraTeams[ply:Team()] and RPExtraTeams[ply:Team()].ShowSpare1 then
return RPExtraTeams[ply:Team()].ShowSpare1(ply)
end
end
function GM:ShowSpare2(ply)
if RPExtraTeams[ply:Team()] and RPExtraTeams[ply:Team()].ShowSpare2 then
return RPExtraTeams[ply:Team()].ShowSpare2(ply)
end
end
function GM:ShowTeam(ply)
end
function GM:ShowHelp(ply)
end
function GM:OnNPCKilled(victim, ent, weapon)
-- If something killed the npc
if not ent then return end
if ent:IsVehicle() and ent:GetDriver():IsPlayer() then ent = ent:GetDriver() end
-- If it wasn't a player directly, find out who owns the prop that did the killing
if not ent:IsPlayer() then
ent = Player(tonumber(ent.SID) or 0)
end
-- If we know by now who killed the NPC, pay them.
if IsValid(ent) and GAMEMODE.Config.npckillpay > 0 then
ent:addMoney(GAMEMODE.Config.npckillpay)
DarkRP.notify(ent, 0, 4, DarkRP.getPhrase("npc_killpay", GAMEMODE.Config.currency .. GAMEMODE.Config.npckillpay))
end
end
function GM:KeyPress(ply, code)
self.BaseClass:KeyPress(ply, code)
end
local function IsInRoom(listener, talker) -- IsInRoom function to see if the player is in the same room.
local tracedata = {}
tracedata.start = talker:GetShootPos()
tracedata.endpos = listener:GetShootPos
jobsrelated.lua
[code]/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {"models/player/Group01/Female_02.mdl","models/player/Group01/Male_07.mdl",
"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 = [[Civilian - The starting job when a player joins. Has no role. May start a business. RAID = YES]],
weapons = {"keys", "pocket"},
command = "citizen",
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"},
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "deputy",
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
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"
}
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "models/Taggart/gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
PlayerDeath = function(ply, weapon, killer)
if( ply:Team() == TEAM_MAYOR ) then
ply:changeTeam( GAMEMODE.DefaultTeam, true )
for k,v in pairs( player.GetAll() ) do
v:PrintMessage( HUD_PRINTCENTER, "The mayor has been killed!" )
end
end
end
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"models/humans/mafia/mal e_02.mdl",
"models/humans/mafia/mal e_04.mdl",
"models/humans/mafia/mal e_06.mdl",
"models/humans/mafia/mal e_07.mdl"
},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of a cartel. The drugs are made by him. Makes the most money! Setup a front company! RAID = YES]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "columbianboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_COLUMBIAN_MEMBER
help = {
"As the Columbian boss, you decide what you want the other Columbians to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Columbians' agenda. Use // to go to the next line."
}
})
TEAM_POLICE = DarkRP.createJob("Tresurer", {
color = Color(255, 255, 255, 255),
model = "models/humans/suitfem/female_02.mdl"
description = [[Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.]],
weapons = {"keys", "pocket"},
command = "Treasurer",
max = 1,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
help = {"Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.",}
})
{TEAM_POLICE = DarkRP.createJob("GIGN", {
color = Color(255, 255, 255, 255),
model = "models/player/ct_gign.mdl",
description = [[: The backup team for the government. If a situati
so I have been trying to fix these errors on my own it seems to be working so far except for this error
[CODE]
[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:48: ')
' expected (to close '(' at line 20) near '}'
1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua
:0
[/CODE]
That's quite strange as line 20 is [CODE]---------------------------------------------------------------------------*/[/CODE]
but here is all the my code
[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:
<TODO: INSERT URL HERE>
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(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 = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
}
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"},
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
}
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
}
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
}
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true
}
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "deputy",
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
}
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
}
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "models/Taggart/gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
}
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"models/humans/mafia/male_02.mdl",
"models/humans/mafia/male_04.mdl",
"models/humans/mafia/male_06.mdl",
"models/humans/mafia/male_07.mdl"},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
}
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "columbianboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
help = {
"As the Mob boss, you decide what you want the other Gangsters to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line."
}
NeedToChangeFrom = TEAM_COLUMBIAN_MEMBER
})
TEAM_POLICE = DarkRP.createJob("Tresurer", {
color = Color(255, 255, 255, 255),
model = "models/humans/suitfem/female_02.mdl"
description = [[Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.]],
weapons = {"keys", "pocket"},
command = "Treasurer",
max = 1,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
help = {"Controls
[QUOTE=fat;43407713]so I have been trying to fix these errors on my own it seems to be working so far except for this error
[CODE]
--Snip--
[/CODE]
this shit is making my brain want to just shutdown as it makes no sense to me[/QUOTE]
[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:
<TODO: INSERT URL HERE>
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(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 = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
}
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[Enforces laws. The basic role of the government! Listen the chief deputy / chief! RAID = YES]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "cp",
max = 0,
salary = 50,
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 /unwanteda [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
}
})
TEAM_GANG = DarkRP.createJob("Mexican Cartel", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Member of the mexican cartel, follow the kings orders! Beware of enemny cartel. RAID = YES.]],
weapons = {"keys", "pocket"},
command = "Mexican",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
}
})
TEAM_MOB = DarkRP.createJob("Mexican Boss", {
color = Color(255, 255, 255, 255),
model = "models/player/gman_high.mdl",
description = [[Druglord of the mexican cartel. Setup a base for the cartel, and make the drugs! RAID = YES.]],
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "Mexicanboss",
max = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_MEXICAN_MEMBER,
}
})
TEAM_GUN = DarkRP.createJob("Firearms Dealer", {
color = Color(255, 140, 0, 255),
model = "models/player/odessa.mdl",
description = [[Sells guns to people. Can work with a gang or cartel. RAID = YES]],
weapons = {"keys", "pocket"},
command = "gundealer",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
}
})
TEAM_MEDIC = DarkRP.createJob("Doctor", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[Heals other people. May setup bases / business, like a hostipal! RAID = NO]],
weapons = {"med_kit", "keys", "pocket"},
command = "doctor",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_POLICE = DarkRP.createJob("Chief Deputy", {
color = Color(255, 255, 255, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
},
description = [[The rank below the chief. Instructs all officers. Follow the chiefs and treasurers orders! RAID = YES.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "deputy",
max = 1,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[Controls all the cops in littletown. Made orders! You only listen to the governor. RAID = YES ]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker", "keys", "pocket"},
command = "chief",
max = 1,
salary = 70,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE
})
TEAM_MAYOR = DarkRP.createJob("Governor", {
color = Color(150, 20, 20, 255),
model = "models/Taggart/gallahan.mdl",
description = [[ The head of all government in the town. Controls laws, taxes and economy. Top priorty! You must be guarded at ALL costs! RAID = NO]],
weapons = {"unarrest_stick", "keys", "pocket"},
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"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 /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the laws."
}
})
TEAM_GANG = DarkRP.createJob("Columbian", {
color = Color(75, 75, 75, 255),
model = {
"models/humans/mafia/male_02.mdl",
"models/humans/mafia/male_04.mdl",
"models/humans/mafia/male_06.mdl",
"models/humans/mafia/male_07.mdl"},
description = [[Runs drugs for the boss. Does the dirty work. Gets paid. Hunts Bountys.RAID = YES]],
weapons = {"keys", "pocket"},
command = "columbian",
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Columbian Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
weapons = {"lockpick", "unarrest_stick", "keys", "pocket"},
command = "columbianboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
help = {
"As the Mob boss, you decide what you want the other Gangsters to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line."
}
NeedToChangeFrom = TEAM_COLUMBIAN_MEMBER
})
TEAM_POLICE = DarkRP.createJob("Tresurer", {
color = Color(255, 255, 255, 255),
model = "models/humans/suitfem/female_02.mdl"
description = [[Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.]],
weapons = {"keys", "pocket"},
command = "Treasurer",
max = 1,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
help = {"Controls the town's treasury and budget. Treasury is top priorty for this class. The governor may direct the direction of the treasury. RAID = NO.",}
})
{TEAM_POLICE = DarkRP.createJob("GIGN", {
color = Color(255, 255, 255, 255),
model = "models/player/ct_gign.mdl"
using (, [, and { can be confusing. notepad++ highlights those for you, so if the cursor is after a ], it will highlight the [ that belongs to it, both in red. vice versa too.
[QUOTE=Handsome Matt;43408155]}
})
you need one less }[/QUOTE]
I wish it was that simple but no that was the solution to the errors i was getting so that is not the problem
[editline]11th January 2014[/editline]
[QUOTE=mitterdoo;43411035]using (, [, and { can be confusing. notepad++ highlights those for you, so if the cursor is after a ], it will highlight the [ that belongs to it, both in red. vice versa too.[/QUOTE]
I'm not using notepad for this i would have killed myself by now if that was the case i'm using a lua coding program
I'm just saying I have tried that and it doesn't work
Sorry, you need to Log In to post a reply to this thread.