[Help] accessories add/remove bproof, Bags

Hi i seem to be stuck. ive tried to find the right number for bproof and bags to remove it and add it to your ped. but the numbers seems to be wrong and cant find it. anyone have an idee how or what the correct code might be? thanks in advance.

Lua code snip

if data.current.value == 'no' then
                    local player = GetPlayerPed(-1)
                    TriggerEvent('esx_skin:getLastSkin', function(skin)
                        TriggerEvent('skinchanger:loadSkin', skin)
                    end)
                    if accessory == "Ears" then
                        ClearPedProp(player, 2)
                    elseif accessory == "Mask" then
                        SetPedComponentVariation(player, 1, 0 ,0 ,2)
		    elseif accessory == "Bags" then
                        -> ? SetPedComponentVariation(player, 0, 0 ,0 ,0) ?
		    elseif accessory == "Vest" then
                        -> ? SetPedComponentVariation(player, 0, 0 ,0 ,0) ?
                    elseif accessory == "Helmet" then
                        ClearPedProp(player, -0)
                    elseif accessory == "Glasses" then
                        SetPedPropIndex(player, 1, -1, 0, 0)
                    end
                end
elseif accessory == "Bags" then
    SetPedComponentVariation(player, 5, 0 ,0 ,2) 
elseif accessory == "Vest" then
    SetPedComponentVariation(player, 9, 0 ,0 ,2) 

Try that. The 5 and 9 are the component ID’s, the 2 is the paletteID I haven’t quite figured out what that does yet, but I see that the mask has it set to 2, so I made these 2 as well.

For someone that might need this.

Enter this at the top of the client.lua:

ESX = nil

currentjob = nil

Citizen.CreateThread(function()

while ESX == nil do

  TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

  Citizen.Wait(0)

  currentjob = ESX.PlayerData.job.name  --Voeg deze toe om job aan te roepen in script

end

end)

RegisterNetEvent(‘esx:setJob’)

AddEventHandler(‘esx:setJob’, function(job)

currentjob = job.name

end)


Add this to the command you want to be job specific:

RegisterCommand(“hesje”, function(args, string)

------> if currentjob == ‘police’ or currentjob == ‘sherrif’ then <------

local ped = GetPlayerPed(PlayerId())

And dont forget to add an extra close at the end of the command.

I hope this will help alot of people.