Hello, my vip jobs don't appear in the job list but there is nothing wrong, no errors just don't work.
[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/master/gamemode/config/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_VICE = DarkRP.createJob("Vice President", {
color = Color(150, 20, 20, 255),
model = {"models/fearless/mayor2.mdl"},
description = [[You Are A Vice President, work with
president to sort out problems of the town
but remeber the president is a higher Job then you!]],
weapons = {"weapon_fists"},
command = "vice",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false,
PlayerDeath = function(ply, weapon, killer)
if( ply:Team() == TEAM_VICE ) then
ply:ChangeTeam( GAMEMODE.DefaultTeam, true )
for k,v in pairs( player.GetAll() ) do
v:PrintMessage( HUD_PRINTCENTER, "The Vice President has been killed!" )
end
end
end
})
TEAM_BANK = DarkRP.createJob("Banker", {
color = Color(255, 103, 96),
model = "models/player/hostage/hostage_03.mdl",
description = [[You Hold Peoples money for a certain amount of price per pay day, you can also hold their money printers!]],
weapons = {"weapon_fists"},
command = "bank",
max = 3,
salary = 70,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
mayorCanSetSalary = false
})
TEAM_RAPIST = DarkRP.createJob("Rapist", {
color = Color(255, 103, 96),
VIPOnly = true,
model = "models/player/odessa.mdl",
description = [[You rape people in closed of areas *Do not rape in public.*]],
weapons = {"weapon_rape", "weapon_fists"},
command = "rapist",
max = 2,
salary = 70,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
mayorCanSetSalary = false,
customCheck = function(ply) return table.HasValue({"superadmin”, "admin", "headadmin", "vip", "vip+", "vip++", "donator", "donator+", "donator++", "trialadmin", "owner",}, ply:GetNWString("usergroup")) end,
CustomCheckFailMsg = "You need to be a VIP donor to be this job!."
})
TEAM_PROTHIEF = DarkRP.createJob("Pro Thief", {
color = Color(0, 153, 204),
VIPOnly = true,
model = "models/kane_robber_masked.mdl",
description = [[Raid People for money, hold them up, steal printers, Raid The CPS!]],
weapons = {"weapon_deagle2","ninjalockpick", "keypad_cracker", "climb_swep2", "weapon_fists"},
command = "ProThief",
max = 4,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false,
customCheck = function(ply) return table.HasValue({"superadmin", "admin", "headadmin", "vip", "vip+", "vip++", "donator", "donator+", "donator++", "trialadmin", "owner",}, ply:GetNWString("usergroup")) end,
CustomCheckFailMsg = "You need to be a VIP donor to be this job!."
})
TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 153, 204),
model = "models/kane_robber_masked.mdl",
description = [[Raid People for money, hold them up, steal printers, Raid The CPS!]],
weapons = {"weapon_deagle2","lockpick", "keypad_cracker", "wDclimb_swep2", "weapon_fists"},
command = "Thief",
max = 5,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false
})
TEAM_HIT = DarkRP.createJob("Hitman", {
color = Color(2, 161, 0),
model = "models/player/agent_47.mdl",
description = [[you're an Assasin on the streets, you get paid to kill peopole. the limit price is $250!]],
weapons = {"bb_scout", "bb_usp", "weapon_fists"},
command = "Hitman",
max = 2,
salary = 70,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false
})
TEAM_SEC = DarkRP.createJob("Security Guard", {
color = Color(176, 231, 0),
model = "models/player/guard_pack/guard_03.mdl",
description = [[You Are A Security Guard You Get Paid For Looking After Peoples Stuff!]],
weapons = {"bb_deagle_alt", "weapon_fists"},
command = "Security",
max = 5,
salary = 55,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false
})
TEAM_SSNIPER = DarkRP.createJob("Elite Swat Sniper", {
color = Color(204, 0, 102),
model = "models/jessev92/player/military/cod4_sniper.mdl",
description = [[Elite Swat Sniper!]],
weapons = {"bb_css_smoke_alt", "bb_sg550_alt", "bb_glock", "weapon_fists", "darkrp_spikes", "darkrp_spikerepair"},
command = "ESniper",
max = 1,
salary = 125,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false
})
TEAM_DETE = DarkRP.createJob("Detective", {
color = Color(99, 70, 115),
model = "models/player/smith.mdl",
description = [[You are A detective you help to solve crimes!]],
weapons = {"bb_glock", "arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker","weapon_fists", "darkrp_spikes", "darkrp_spikerepair"},
command = "Detective",
max = 3,
salary = 85,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
mayorCanSetSalary = false
})
TEAM_SWATSNIPER = DarkRP.createJob("Swat Sniper", {
color = Color(204, 0, 102),
model = "models/player/riot.mdl",
description = [[You Help out the police force in difficult times, stop terrorist from starting raids on the city.]],
weapons = {"ls_sniper","weapon_glock2", "weapon_fists"},
command = "sniper",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
mayorCanSetSalary = false
})
TEAM_SWATLEADER = DarkRP.createJob("Swat Leader", {
color = Color(204, 0, 102),
model = "models/player/riot.mdl",
description = [[You Help out the police force in difficult times, stop terrorist from starting raids on the city.]],
weapons = {"weapon_deagle2","weapon_pumpshotgun2","door_ram","stunstick","unarrest_stick","arrest_stick", "weapon_fists", "darkrp_spikes", "darkrp_spikerepair"},
command = "leader",
max = 1,
salary = 120,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
mayorCanSetSalary = false
})
TEAM_SWAT = DarkRP.createJob("Swat", {
color = Color(204, 0, 102),
model = "models/player/swat.mdl",
description = [[You Help out the police force in difficult times, stop terrorist from starting raids on the city.]],
weapons = {"weapon_deagle2","weapon_mac10
Have u tried looking at line 71 in darkrpmodification-master/lua/darkrp_customthings/jobs.lua to see if all the bracket blocks are correct?
By the way, 1 error can break an entire gamemode.
I'm not 100% sure, but I'm pretty sure its
[lua]
customCheck = function(ply) return table.HasValue({"superadmin”, "admin", "headadmin", "vip", "vip+", "vip++", "donator", "donator+", "donator++", "trialadmin", "owner",}, ply:GetNWString("usergroup")) end,
CustomCheckFailMsg = "You need to be a VIP donor to be this job!."
[/lua]
You have a "," after the last rank. " "owner", "
I'm not 100% sure if it is that though.
table.HasValue is quite slow as I recall, though, the line of the error does not show properly due to the comments used on top of the jobs.lua file. Count how many lines the comment has, then substract that from the line number it reports (71), and it'd give you a closer indication of where the error is.
[QUOTE=Positive;44614523]I'm not 100% sure, but I'm pretty sure its
[lua]
customCheck = function(ply) return table.HasValue({"superadmin”, "admin", "headadmin", "vip", "vip+", "vip++", "donator", "donator+", "donator++", "trialadmin", "owner",}, ply:GetNWString("usergroup")) end,
CustomCheckFailMsg = "You need to be a VIP donor to be this job!."
[/lua]
You have a "," after the last rank. " "owner", "
I'm not 100% sure if it is that though.[/QUOTE]
Actually judging by the looks of the broken syntax coloring in that... A quotation mark isn't the correct quotation mark that exits 'superadmin'.
[code]”[/code]
instead of
[code]"[/code]
Sorry, you need to Log In to post a reply to this thread.