The change of work clothes does not work for me, do I have to modify something?
how to set clothe buy via money ?
Yeah same any fix for it?
how can I make the player pay for clothes in the clotheshop?
For you that still have errors in changing into work clothes, hereās what Iāve found.
Dependency
Notes
- I completely get rid of skinchanger and esx_skin
- Skin doesnāt work with work clothes that comes when you first import SQL from esx_jobs. You need to replace all the skins with fivem-appearance skin format. How do you do that? Easy, first, you save the clothes via Clothing Store or using export
startPlayerCustomization
. Second is easier using cd_devtools which you can easily copy the skin data, use the example given from the docs - Tested with esx_jobs, esx_ambulancejob, and esx_mechanicjob working fine with changing citizen clothes and work clothes. It really doesnāt matter what job because most of them usually use the same method to change clothes (Step to Fix, step number 2)
Step to Fix
- Open ox_appearance/server/esx.lua and search for
esx_skin:getPlayerSkin
and replace with:
ESX.RegisterServerCallback('esx_skin:getPlayerSkin', function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
local jobSkin = {
skin_male = xPlayer.job.skin_male,
skin_female = xPlayer.job.skin_female
}
local identifier = Players[source]
local appearance = MySQL.scalar.await('SELECT skin FROM users WHERE identifier = ?', { identifier })
cb((appearance and json.decode(appearance)), jobSkin or {})
end)
- Here I will take an example on esx_jobs. Open esx_jobs/client/main.lua and search for:
if skin.sex == 0 then
if ESX.Table.SizeOf(jobSkin.skin_male) >= 1 then
TriggerEvent("skinchanger:loadClothes", skin, jobSkin.skin_male)
else
ESX.ShowNotification("Work", _U("no_male_clothing"), "error")
end
else
if ESX.Table.SizeOf(jobSkin.skin_female) >= 1 then
TriggerEvent("skinchanger:loadClothes", skin, jobSkin.skin_female)
else
ESX.ShowNotification("Work", _U("no_female_clothing"), "error")
end
end
and replace with
if skin.model == "mp_m_freemode_01" then
if ESX.Table.SizeOf(jobSkin.skin_male) >= 1 then
TriggerEvent("skinchanger:loadSkin", jobSkin.skin_male)
else
ESX.ShowNotification("Work", _U("no_male_clothing"), "error")
end
else
if ESX.Table.SizeOf(jobSkin.skin_female) >= 1 then
TriggerEvent("skinchanger:loadSkin", jobSkin.skin_female)
else
ESX.ShowNotification("Work", _U("no_female_clothing"), "error")
end
end
Skin Format
Here I give you a visualization to see the difference between the skin format fivem-appearance and with regular skin format:
fivem-appearance
regular skin format
This is not a complicated task, read carefully and make sure you donāt miss anything. I hope this fixes your issue. Also, Iād love to know otherās solutions for this too!
is there anyone that can help me set this up as im more a visual learner
So using c# here and on the
Exports[āfivem-appearanceā].startPlayerCustomization(new Action(async (appearance) => ā¦
I am not sure what āappearanceā datatype is here. Object works but I canāt deserialize it. Is there a structure listed somewhere or something?
Actually, I was able to serialize it to a string and get the json structure. I had everything right on except tattoos has a different structure. I donāt know if it changed somewhere along the way or what.
I put them in and they do not show up, is there something else I need to do im trying to add the criminal enterprise tattoos as fivem does not update
Does anyone know how to make it so ped models that arent freemode can change hair options in fivem-appearance?
How add payment system when using the clotheshop?
Thanks
Is there any option to remove āglassesā and āhatsā from props and add them to components? Because I would like to add an Jewelry shop with only chains, watches and earrings.
You can now find the fivem-appearance documentation at Fivepunchās resource documentation. A rewrite is planned to match the docs format.
canāt save outfits
use QB: SaveSkin() - not work
use example:
TriggerServerEvent(āsaveCharacterCustomizationā, JSON.encode(appearance))
Itās lowercase - json
not JSON
.
and still not save (table not update)
qb-clothing\client\main.lua
RegisterCommand(ācustomizationā, function()
local config = {
ped = true,
headBlend = true,
faceFeatures = true,
headOverlays = true,
components = true,
props = true,
tattoos = true
}exports[āfivem-appearanceā]:startPlayerCustomization(function (appearance)
if (appearance) then
TriggerServerEvent(āsaveCharacterCustomizationā, json.encode(appearance))
end
end, config)end, false)
RegisterNetEvent(āloadCharacterAppearanceā)
AddEventHandler(āloadCharacterAppearanceā, function (encodedAppearance)
local appearance = json.decode(encodedAppearance)
exports[āfivem-appearanceā]:setPlayerAppearance(appearance)
end)
my script wont work at at im conused on to set it it up correctly to get it to work
Hi, I wanted to make some changes to the UI of the clothing menu, I downloaded the source code and tried installing the dependencies but I keep encountering errors
GTAO Multicharacter now supports fivem-appearance
.