I'm trying to set armor on players based on their jobs, but I'm having issues. I'm not getting any errors, but players simply do not spawn with armor. Look at the police jobs and tell me if my method is correct please?
[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_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {
"models/ocrp2players/clothes1/10/male_01.mdl",
"models/ocrp2players/clothes1/10/female_01.mdl",
"models/ocrp2players/clothes1/10/male_02.mdl",
"models/ocrp2players/clothes1/10/female_02.mdl",
"models/ocrp2players/clothes1/10/male_03.mdl",
"models/ocrp2players/clothes1/10/female_03.mdl",
"models/ocrp2players/clothes1/10/male_04.mdl",
"models/ocrp2players/clothes1/10/female_04.mdl",
"models/ocrp2players/clothes1/10/male_05.mdl",
"models/ocrp2players/clothes1/10/male_06.mdl",
"models/ocrp2players/clothes1/10/female_06.mdl",
"models/ocrp2players/clothes1/10/male_07.mdl",
"models/ocrp2players/clothes1/10/female_07.mdl",
"models/ocrp2players/clothes1/10/male_08.mdl",
"models/ocrp2players/clothes1/10/male_09.mdl",
},
description = [[No specific role in city life. Make your own roleplay story!]],
weapons = {"m9k_fists"},
command = "citizen",
max = 0,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_BMD = DarkRP.createJob("Black Market Dealer", {
color = Color(53, 45, 45, 255),
model = "models/player/monk.mdl",
description = [[Sell "less-than-legal" substances to the citizens of EvoCity.]],
weapons = {"m9k_fists"},
command = "bmd",
max = 2,
salary = 120,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_TAXI = DarkRP.createJob("Taxi Driver", {
color = Color(205, 212, 16, 255),
model = {
"models/ocrp2players/clothes1/10/male_01.mdl",
"models/ocrp2players/clothes1/10/female_01.mdl",
"models/ocrp2players/clothes1/10/male_02.mdl",
"models/ocrp2players/clothes1/10/female_02.mdl",
"models/ocrp2players/clothes1/10/male_03.mdl",
"models/ocrp2players/clothes1/10/female_03.mdl",
"models/ocrp2players/clothes1/10/male_04.mdl",
"models/ocrp2players/clothes1/10/female_04.mdl",
"models/ocrp2players/clothes1/10/male_05.mdl",
"models/ocrp2players/clothes1/10/male_06.mdl",
"models/ocrp2players/clothes1/10/female_06.mdl",
"models/ocrp2players/clothes1/10/male_07.mdl",
"models/ocrp2players/clothes1/10/female_07.mdl",
"models/ocrp2players/clothes1/10/male_08.mdl",
"models/ocrp2players/clothes1/10/male_09.mdl",
},
description = [[Drive other players around the map for money.]],
weapons = {"m9k_fists"},
command = "taxidriver",
max = 3,
salary = 130,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Police Officer", {
color = Color(25, 25, 170, 255),
model = {"models/ocrp2players/police/l1/male_01.mdl",
"models/ocrp2players/police/l1/female_01.mdl",
"models/ocrp2players/police/l1/male_02.mdl",
"models/ocrp2players/police/l1/female_02.mdl",
"models/ocrp2players/police/l1/male_03.mdl",
"models/ocrp2players/police/l1/female_03.mdl",
"models/ocrp2players/police/l1/male_04.mdl",
"models/ocrp2players/police/l1/female_04.mdl",
"models/ocrp2players/police/l1/male_05.mdl",
"models/ocrp2players/police/l1/male_06.mdl",
"models/ocrp2players/police/l1/female_06.mdl",
"models/ocrp2players/police/l1/male_07.mdl",
"models/ocrp2players/police/l1/female_07.mdl",
"models/ocrp2players/police/l1/male_08.mdl",
"models/ocrp2players/police/l1/male_09.mdl"
},
description = [[Patrol the city, and co-operate with your fellow officers and other government agencies to enforce the law.]],
weapons = {"arrest_stick", "m9k_fists", "unarrest_stick", "bb_fiveseven_cop", "bb_m3_cop", "stunstick", "door_ram", "weaponchecker"},
command = "cp",
max = 7,
salary = 130,
PlayerSpawn = function(ply) ply:SetArmor(35) end,
admin = 0,
vote = true,
hasLicense = true,
ammo = {
["pistol"] = 60,
["smg1"] = 240,
["buckshot"] = 48,
}
})
TEAM_CHIEF = DarkRP.createJob("Police Chief", {
color = Color(20, 20, 255, 255),
model = {"models/ocrp2players/police/l1/male_01.mdl",
"models/ocrp2players/police/l1/female_01.mdl",
"models/ocrp2players/police/l1/male_02.mdl",
"models/ocrp2players/police/l1/female_02.mdl",
"models/ocrp2players/police/l1/male_03.mdl",
"models/ocrp2players/police/l1/female_03.mdl",
"models/ocrp2players/police/l1/male_04.mdl",
"models/ocrp2players/police/l1/female_04.mdl",
"models/ocrp2players/police/l1/male_05.mdl",
"models/ocrp2players/police/l1/male_06.mdl",
"models/ocrp2players/police/l1/female_06.mdl",
"models/ocrp2players/police/l1/male_07.mdl",
"models/ocrp2players/police/l1/female_07.mdl",
"models/ocrp2players/police/l1/male_08.mdl",
"models/ocrp2players/police/l1/male_09.mdl"
},
description = [[Lead the police force against crime. You take orders from nobody except the mayor.]],
weapons = {"arrest_stick", "m9k_fists", "unarrest_stick", "bb_deagle_cop", "bb_m3_cop", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 170,
admin = 0,
vote = false,
PlayerSpawn = function(ply) ply:SetArmor(75) end,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
ammo = {
["pistol"] = 60,
["smg1"] = 240,
["buckshot"] = 48,
}
})
TEAM_SWAT = DarkRP.createJob("SWAT", {
color = Color(13, 13, 127, 127),
model = {"models/ocrp2players/swat/10/male_01.mdl",
"models/ocrp2players/swat/10/male_02.mdl",
"models/ocrp2players/swat/10/male_03.mdl",
"models/ocrp2players/swat/10/male_04.mdl",
"models/ocrp2players/swat/10/male_05.mdl",
"models/ocrp2players/swat/10/male_06.mdl",
"models/ocrp2players/swat/10/male_07.mdl",
"models/ocrp2players/swat/10/male_08.mdl",
"models/ocrp2players/swat/10/male_09.mdl"},
description = [[Assist the police force in highly dangerous missions. You are the worst nightmare of even the most experienced criminal.]],
weapons = {"arrest_stick", "m9k_fists", "unarrest_stick", "bb_fiveseven_cop", "bb_mp5_cop", "stunstick", "door_ram", "weaponchecker"},
command = "swat",
max = 4,
salary = 140,
PlayerSpawn = function(ply) ply:SetArmor(100) end,
admin = 0,
vote = true,
hasLicense = true,
customCheck = function(ply) return CLIENT or
ply:IsUserGroup ("VIP") or
ply:IsUserGroup ("vip") or
ply:IsUserGroup ("donator") or
ply:IsUserGroup ("Donator") or
ply:IsUserGroup("admin") or
ply:IsUserGroup("super-admin") or
ply:IsUserGroup("liaison") or
ply:IsUserGroup("council") or
ply:IsUserGroup("owner") or
ply:IsUserGroup("Moderator") or
ply:IsUserGroup("Admin") or
ply:IsUserGroup("moderator") or
ply:IsUserGroup("Super-Admin") or
ply:IsUserGroup("superadmin") or
ply:IsUserGroup("Liaison") or
ply:IsUserGroup("Council")end,
CustomCheckFailMsg = "This job requires VIP status.",
ammo = {
["pistol"] = 60,
["smg1"] = 240,
["buckshot"] = 48,
}
})
TEAM_SWATCHIEF = DarkRP.createJob("SWAT Team Leader", {
color = Color(13, 13, 127, 127),
model = {"models/ocrp2players/swat/10/male_01.mdl",
"models/ocrp2players/swat/10/male_02.mdl",
"models/ocrp2players/swat/10/male_03.mdl",
"models/ocrp2players/swat/10/male_04.mdl",
Sorry, you need to Log In to post a reply to this thread.