For anyone wondering how they will put this script working… put this:
Citizen.CreateThread(function()
while ESX == nil do
ESX = exports["es_extended"]:getSharedObject()
Citizen.Wait(0)
end
end)
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(playerData)
ESX.TriggerServerCallback('esx_tattooshop:requestPlayerTattoos', function(tattooList)
if tattooList then
for k,v in pairs(tattooList) do
ApplyPedOverlay(PlayerPedId(), GetHashKey(v.collection), GetHashKey(Config.TattooList[v.collection][v.texture].nameHash))
end
currentTattoos = tattooList
end
end)
end)
RegisterNetEvent('esx_ambulancejob:revive')
AddEventHandler('esx_ambulancejob:revive', function()
Citizen.Wait(100)
ESX.TriggerServerCallback('esx_tattooshop:requestPlayerTattoos', function(tattooList)
if tattooList then
for k,v in pairs(tattooList) do
ApplyPedOverlay(PlayerPedId(), GetHashKey(v.collection), GetHashKey(Config.TattooList[v.collection][v.texture].nameHash))
end
currentTattoos = tattooList
end
end)
end)
instead of this:
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
AddEventHandler('skinchanger:modelLoaded', function()
ESX.TriggerServerCallback('esx_tattooshop:requestPlayerTattoos', function(tattooList)
if tattooList then
for k,v in pairs(tattooList) do
ApplyPedOverlay(PlayerPedId(), GetHashKey(v.collection), GetHashKey(Config.TattooList[v.collection][v.texture].nameHash))
end
currentTattoos = tattooList
end
end)
end)
on your client/main.lua
Thank you, come again