Untitled
unknown
plain_text
3 years ago
1.4 kB
13
Indexable
TEAM_ZFRUITSLICER = DarkRP.createJob("Fruit Slicer", {
color = Color(0, 128, 255, 255),
model = {"models/fearless/chef1.mdl"},
description = [[You sell Smoothies!]],
weapons = {"zfs_knife"},
command = "FruitSlicer",
max = 4,
salary = 50,
admin = 0,
vote = false,
category = "Citizens",
hasLicense = false
})
DarkRP.createCategory{
name = "FruitSlicer",
categorises = "entities",
startExpanded = true,
color = Color(0, 107, 0, 255),
canSee = function(ply) return true end,
sortOrder = 235
}
DarkRP.createEntity("FruitSlicer Shop", {
ent = "zfs_shop",
model = "models/zerochain/fruitslicerjob/fs_shop.mdl",
price = 4000,
max = 1,
cmd = "buyzfs_shop",
allowed = TEAM_ZFRUITSLICER,
category = "FruitSlicer",
sortOrder = 0
})
// Needs to run delayed to make sure zfs.config.Fruits exists
timer.Simple(1, function()
for k, v in pairs(zfs.config.Fruits) do
DarkRP.createEntity(v.Name, {
ent = "zfs_fruitbox",
model = "models/zerochain/fruitslicerjob/fs_cardboardbox.mdl",
price = 1000,
max = 5,
cmd = "buy" .. v.Name,
allowed = TEAM_ZFRUITSLICER,
category = "FruitSlicer",
spawn = function(ply, tr, tblEnt)
local ent = ents.Create("zfs_fruitbox")
ent:SetFruitID(k)
ent:SetPos(tr.HitPos + Vector(0,0,10))
ent:Spawn()
ent:Activate()
ent:SetFruitID(k)
return ent
end,
})
end
end)
Editor is loading...