Skip to content

Commit

Permalink
examples and icon changes
Browse files Browse the repository at this point in the history
  • Loading branch information
StuxxyOfficial committed Oct 26, 2022
1 parent 7afe1a9 commit 355c724
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 12 deletions.
9 changes: 5 additions & 4 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local function createPed(self, i)
gender = 5
end

npcs[i] = CreatePed(gender, self.data.ped.model, self.pedCoords.x, self.pedCoords.y, self.pedCoords.z, self.pedCoords.w, false, false)
npcs[i] = CreatePed(gender, self.data.ped.model, self.pedCoords.x, self.pedCoords.y, self.pedCoords.z - 1.0, self.pedCoords.w, false, false)
FreezeEntityPosition(npcs[i], true)
SetEntityInvincible(npcs[i], true)
SetBlockingOfNonTemporaryEvents(npcs[i], true)
Expand All @@ -66,18 +66,19 @@ end

local function openMenu(outfits, group)
local options = {}
local playerModel = GetEntityModel(cache.ped)
for k, v in pairs(outfits) do
if permCheck(group, v.grade) then
if permCheck(group, v.grade) and v.model == playerModel then
options[#options+1] = {id = 'job_clothes_' .. k, icon = "fa-solid fa-shirt", title = v.label, onSelect = function() changeOutfit(v) end}
end
end
if table.type(options) == 'empty' then
return lib.notify({type = 'error', description = 'You do not have access to this Wardrobe'})
end
if savedFit ~= nil then
options[#options+1] = {id = 'job_clothes_restore', icon = "fa-solid fa-shirt", title = 'Grab Clothes', onSelect = function() restoreOutfit() end}
options[#options+1] = {id = 'job_clothes_restore', icon = "fa-solid fa-hand-back-fist", title = 'Grab Clothes', onSelect = function() restoreOutfit() end}
end
options[#options+1] = {id = 'job_clothes_save', icon = "fa-solid fa-shirt", title = 'Save Current Outfit', onSelect = function() saveOutfit() end}
options[#options+1] = {id = 'job_clothes_save', icon = "fa-solid fa-floppy-disk", title = 'Save Current Outfit', onSelect = function() saveOutfit() end}
lib.registerContext({id = 'job_clothes', title = 'Wardrobe', options = options})
lib.showContext('job_clothes')
end
Expand Down
87 changes: 79 additions & 8 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Config.groups = {
gender = 'female'
},
locations = {
vector4(457.8055, -999.5868, 30.6896, 322.4940),
vector4(456.0670, -982.2729, 30.6896, 172.2451),
vector4(458.8778, -997.9269, 30.6896, 191.6873),
},
outfits = {
{
Expand All @@ -28,16 +27,30 @@ Config.groups = {
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = 1}
},
{
model = `mp_f_freemode_01`,
grade = 0,
label = 'Recruit outfit 1',
arms = {component_id = 3, texture = 0, drawable = 14},
torso = {component_id = 11, texture = 0, drawable = 48},
undershirt = {component_id = 8, texture = 0, drawable = 14},
pants = {component_id = 4, texture = 0, drawable = 34},
shoes = {component_id = 6, texture = 0, drawable = 101},
bag = {component_id = 5, texture = 6, drawable = 0},
accesories = {component_id = 7, texture = 0, drawable = 0},
kevlar = {component_id = 9, texture = 0, drawable = 0},
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = -1}
},
}
},
['ambulance'] = {
['garbage'] = {
ped = {
model = `mp_f_cardesign_01`,
model = `S_M_Y_Garbage`,
gender = 'female'
},
locations = {
vector4(50, 50, 50, 50),
vector4(100, 100, 50, 50),
vector4(-354.9425, -1514.2347, 27.7177, 214.0024),
},
outfits = {
{
Expand All @@ -48,13 +61,71 @@ Config.groups = {
torso = {component_id = 11, texture = 0, drawable = 111},
undershirt = {component_id = 8, texture = 0, drawable = 44},
pants = {component_id = 4, texture = 0, drawable = 10},
shoes = {component_id = 6, texture = 0, drawable = 12},
shoes = {component_id = 6, texture = 0, drawable = 19},
bag = {component_id = 5, texture = 6, drawable = 281},
accesories = {component_id = 7, texture = 0, drawable = 0},
kevlar = {component_id = 9, texture = 0, drawable = 7},
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = 1}
},
{
model = `mp_f_freemode_01`,
grade = 0,
label = 'Recruit outfit 1',
arms = {component_id = 3, texture = 0, drawable = 49},
torso = {component_id = 11, texture = 2, drawable = 59},
undershirt = {component_id = 8, texture = 0, drawable = 219},
pants = {component_id = 4, texture = 0, drawable = 35},
shoes = {component_id = 6, texture = 0, drawable = 101},
bag = {component_id = 5, texture = 6, drawable = 0},
accesories = {component_id = 7, texture = 0, drawable = 0},
kevlar = {component_id = 9, texture = 0, drawable = 0},
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = -1}
},
}
}
},
['gang'] = {
ped = {
model = `IG_Ballas_Leader`,
gender = 'female'
},
locations = {
vector4(-1.2072, -1810.0857, 29.1527, 213.2372),
},
outfits = {
{
model = `mp_m_freemode_01`,
grade = 0,
label = 'Recruit outfit 1',
arms = {component_id = 3, texture = 0, drawable = 4},
torso = {component_id = 11, texture = 0, drawable = 111},
undershirt = {component_id = 8, texture = 0, drawable = 44},
pants = {component_id = 4, texture = 0, drawable = 10},
shoes = {component_id = 6, texture = 0, drawable = 19},
bag = {component_id = 5, texture = 6, drawable = 0},
accesories = {component_id = 7, texture = 0, drawable = 0},
kevlar = {component_id = 9, texture = 0, drawable = 0},
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = 0},
mask = {component_id = 1, texture = 2, drawable = 209}
},
{
model = `mp_f_freemode_01`,
grade = 0,
label = 'Recruit outfit 1',
arms = {component_id = 3, texture = 0, drawable = 88},
torso = {component_id = 11, texture = 2, drawable = 356},
undershirt = {component_id = 8, texture = 0, drawable = 14},
pants = {component_id = 4, texture = 3, drawable = 155},
shoes = {component_id = 6, texture = 0, drawable = 1},
bag = {component_id = 5, texture = 6, drawable = 0},
accesories = {component_id = 7, texture = 0, drawable = 0},
kevlar = {component_id = 9, texture = 0, drawable = 0},
badge = {component_id = 10, texture = 0, drawable = 0},
hat = {component_id = 0, texture = 0, drawable = -1},
mask = {component_id = 1, texture = 2, drawable = 209}
},
}
},
}

0 comments on commit 355c724

Please sign in to comment.