From 355c72433ea387150fd4aef3109de4cf378467c9 Mon Sep 17 00:00:00 2001 From: Stuxxy Date: Wed, 26 Oct 2022 05:46:47 +0100 Subject: [PATCH] examples and icon changes --- client.lua | 9 +++--- config.lua | 87 +++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/client.lua b/client.lua index 0cd7f6f..66bd438 100644 --- a/client.lua +++ b/client.lua @@ -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) @@ -66,8 +66,9 @@ 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 @@ -75,9 +76,9 @@ local function openMenu(outfits, group) 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 diff --git a/config.lua b/config.lua index 3d306b0..62b4f98 100644 --- a/config.lua +++ b/config.lua @@ -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 = { { @@ -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 = { { @@ -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} + }, + } + }, } \ No newline at end of file