[ DARKRP ] I have 3 jobs made, but they do not appear and no entities also.
5 replies, posted
So i originaly placed these jobs in the categories.lua, but i desided to move them to the jobs.lua since the shipments, and entities dont appear, now the jobs dont appear.
jobs.lua
TEAM_VAP = DarkRP.createJob("Vapist", {
color = Color(60, 144, 0, 255),
model = {
"models/player/Group03/female_01.mdl",
"models/player/Group03/female_02.mdl",
"models/player/Group03/female_04.mdl",
"models/player/Group03/female_05.mdl",
"models/player/Group03/female_06.mdl",
"models/player/Group03/female_03.mdl"
},
description = [[Your a vapist that sells vapes to the public.
VAPENATION!]],
weapons = {"weapon_vape", "weapon_arc_atmcard"},
command = "Vapist",
max = 2,
salary = 150,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Citizens"
})
TEAM_MIN = DarkRP.createJob("Bitcoin Miner", {
color = Color(197, 134, 0, 255),
model = {
"models/player/hostage/hostage_01.mdl",
"models/player/hostage/hostage_02.mdl",
"models/player/hostage/hostage_03.mdl",
"models/player/anonymous.mdl"
},
description = [[Your a Bitcoin Miner, mining bitcoins that are worth 18000$, but be aware that thiefs and other pepole will try to get some of them!]],
weapons = {"weapon_arc_atmcard"},
command = "Bitcoinminer",
max = 3,
salary = 250,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Citizens"
})
TEAM_MET = DarkRP.createJob("Meth Cooker", {
color = Color(93, 198, 255, 255),
model = {
"models/player/hostage/hostage_01.mdl",
"models/player/hostage/hostage_02.mdl",
"models/player/hostage/hostage_03.mdl"
},
description = [[Your a Meth Cooker, and you make Meth while hiding form the cops]],
weapons = {"weapon_arc_atmcard"},
command = "Methcook",
max = 2,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Criminals"
})
categories.lua
DarkRP.createCategory{
name = "Meth Stuff",
categorises = "entities",
startExpanded = true,
color = Color(61, 174, 191, 255),
canSee = function(ply) return table.HasValue({TEAM_METH}, ply:Team()) end,
sortOrder = 96
}
DarkRP.createCategory{
name = "Bitcoin Miners",
categorises = "entities",
startExpanded = true,
color = Color(205, 139, 0, 255),
canSee = function(ply) return table.HasValue({TEAM_MINER}, ply:Team()) end,
sortOrder = 64
}
DarkRP.createCategory{
name = "Simple vapes",
categorises = "shipments",
startExpanded = true,
color = Color(22, 121, 0, 255),
canSee = function(ply) return table.HasValue({TEAM_VAPIST}, ply:Team()) end,
sortOrder = 68
}
entities.lua
DarkRP.createEntity("Stove", {
ent = "eml_stove",
model = "models/props_c17/furnitureStove001a.mdl",
price = 3000,
max = 2,
cmd = "buystove",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Liquid Sulfur", {
ent = "eml_sulfur",
model = "models/props_lab/jar01b.mdl",
price = 500,
max = 20,
cmd = "buysulfur",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Jar", {
ent = "eml_jar",
model = "models/props_lab/jar01a.mdl",
price = 1000,
max = 20,
cmd = "buyjar",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Water", {
ent = "eml_water",
model = "models/props_junk/garbage_plasticbottle003a.mdl",
price = 300,
max = 20,
cmd = "buywater",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 1000,
max = 20,
cmd = "buygascanister",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Liquid Iodine", {
ent = "eml_iodine",
model = "models/props_lab/jar01b.mdl",
price = 800,
max = 20,
cmd = "buyiodine",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Muriatic Acid", {
ent = "eml_macid",
model = "models/props_junk/garbage_plasticbottle001a.mdl",
price = 800,
max = 20,
cmd = "buymacid",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Pot", {
ent = "eml_pot",
model = "models/props_c17/metalPot001a.mdl",
price = 1500,
max = 20,
cmd = "buypot",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Special Pot", {
ent = "eml_spot",
model = "models/props_c17/metalPot001a.mdl",
price = 2000,
max = 20,
cmd = "buyspot",
category = "Meth Stuff",
allowed = {TEAM_MET},
})
DarkRP.createEntity("Miner Light", {
ent = "bit_miner_light",
model = "models/BITMINER/BitMinerLight.mdl",
price = 20000,
max = 6,
cmd = "MinerLight",
category = "Bitcoin Miners",
allowed = {TEAM_MIN},
})
DarkRP.createEntity("Miner Standard", {
ent = "bit_miner_medium",
model = "models/BITMINER/BitMinerMedium.mdl",
price = 50000,
max = 4,
cmd = "MinerStandard",
category = "Bitcoin Miners",
allowed = {TEAM_MIN},
})
DarkRP.createEntity("Miner Pro", {
ent = "bit_miner_heavy",
model = "models/BITMINER/BitMinerHeavy.mdl",
price = 100000,
max = 2,
cmd = "MinerPro",
category = "Bitcoin Miners",
allowed = {TEAM_MIN},
})
shipments.lua
DarkRP.createShipment("Classic Vape", {
model = "models/swamponions/vape.mdl",
entity = "weapon_vape",
amount = 5,
price = 10000,
separate = true,
pricesep = 2000,
noship = false,
category = "Simple vapes",
allowed = {TEAM_VAP},
})
DarkRP.createShipment("Custom Vape", {
model = "models/swamponions/vape.mdl",
entity = "weapon_vape_custom",
amount = 5,
price = 12000,
separate = true,
pricesep = 3000,
noship = false,
category = "Simple vapes",
allowed = {TEAM_VAP},
})
DarkRP.createShipment("Custom Vape", {
model = "models/swamponions/vape.mdl",
entity = "weapon_vape_custom",
amount = 5,
price = 12000,
separate = true,
pricesep = 3000,
noship = false,
category = "Simple vapes",
allowed = {TEAM_VAP},
})
DarkRP.createShipment("Butterfly Vape", {
model = "models/swamponions/vape.mdl",
entity = "weapon_vape_butterfly",
amount = 5,
price = 25000,
separate = true,
pricesep = 5000,
noship = false,
category = "Simple vapes",
allowed = {TEAM_VAP},
})
DarkRP.createShipment("Butterfly Vape", {
model = "models/swamponions/vape.mdl",
entity = "weapon_vape_hallucinogenic",
amount = 5,
price = 25000,
separate = true,
pricesep = 5000,
noship = false,
category = "Simple vapes",
allowed = {TEAM_VAP},
})
You can use this code if you want since alot of servers have these jobs.
I would love to get some advise with this and help.
Thanks!
This is what your categories.lua should look like :
DarkRP.createCategory{
name = "Citizens",
categorises = "jobs",
startExpanded = true,
color = Color(0, 107, 0, 255),
canSee = function(ply) return true end,
sortOrder = 1,
}
DarkRP.createCategory{
name = "Criminals",
categorises = "jobs",
startExpanded = true,
color = Color(150, 0, 0, 255),
canSee = function(ply) return true end,
sortOrder = 2,
DarkRP.createCategory{
name = "Meth Stuff",
categorises = "entities",
startExpanded = true,
color = Color(61, 174, 191, 255),
canSee = function(ply) return table.HasValue({TEAM_METH}, ply:Team()) end,
sortOrder = 96
}
DarkRP.createCategory{
name = "Bitcoin Miners",
categorises = "entities",
startExpanded = true,
color = Color(205, 139, 0, 255),
canSee = function(ply) return table.HasValue({TEAM_MINER}, ply:Team()) end,
sortOrder = 64
}
DarkRP.createCategory{
name = "Simple vapes",
categorises = "shipments",
startExpanded = true,
color = Color(22, 121, 0, 255),
canSee = function(ply) return table.HasValue({TEAM_VAPIST}, ply:Team()) end,
sortOrder = 68
}
You had forgot to create categories for the jobs (Criminals and Citizens)
Ill check them out!
Please post your FULL jobs.lua and your FULL categories.lua, rather than just 3 jobs. Also, have you disabled the default jobs in disabled_defaults.lua and re-created them or did you leave them enabled?
Updated, and i have disabled all of the default jobs execpt citizens, and hobo.
Remove the jobs one by one to see what is causing problems. Also, remove the capital letters from the commands.
Sorry, you need to Log In to post a reply to this thread.