This script can be standalone, if needed, and we implemented two basic frameworks. You can change to your preferred framework like this:
Copy Config.Framework = Frameworks.ESX -- for ESX
Config.Framework = Frameworks.QBCORE -- for QB
Config.Framework = Frameworks.STANDALONE -- for Standalone ❗ check note below ❗
Copy Config.LicenseType = 'license' --license, steam, discord
Copy {table_name = 'rcore_tattoos' , column_name = 'identifier' }
Copy TriggerServerEvent ( 'rcore_tattoos:reload' )
Copy
--███████╗██╗ ██╗██╗███████╗████████╗██╗███╗ ██╗ ██████╗ ██████╗██╗ ██╗ █████╗ ██████╗ █████╗ ██████╗████████╗███████╗██████╗
--██╔════╝╚██╗██╔╝██║██╔════╝╚══██╔══╝██║████╗ ██║██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗
--█████╗ ╚███╔╝ ██║███████╗ ██║ ██║██╔██╗ ██║██║ ███╗ ██║ ███████║███████║██████╔╝███████║██║ ██║ █████╗ ██████╔╝
--██╔══╝ ██╔██╗ ██║╚════██║ ██║ ██║██║╚██╗██║██║ ██║ ██║ ██╔══██║██╔══██║██╔══██╗██╔══██║██║ ██║ ██╔══╝ ██╔══██╗
--███████╗██╔╝ ██╗██║███████║ ██║ ██║██║ ╚████║╚██████╔╝ ╚██████╗██║ ██║██║ ██║██║ ██║██║ ██║╚██████╗ ██║ ███████╗██║ ██║
--╚══════╝╚═╝ ╚═╝╚═╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
--This function is triggered after you choose an EXISTING character.
function CharacterHasLoaded_EXISTING ( charid_1 , charid_2 , skin )
InitializeESX (charid_1, charid_2)
while not PlayerLoaded do Wait ( 0 ) end
ResetPlayerState ()
if GetResourceState ( 'cd_spawnselect' ) == 'started' then
------------------------------------------------------------------------------------------------------
--Add any additional trigger events here.
TriggerEvent ( 'cd_spawnselect:OpenUI' )
------------------------------------------------------------------------------------------------------
end
if Config.SkinScript == 'esx_skin' or Config.SkinScript == 'cui_character' then
if skin ~= 'Empty' then
if Config.SkinScript == 'esx_skin' then
Wait ( 2000 )
TriggerEvent ( 'skinchanger:loadSkin' , skin)
elseif Config.SkinScript == 'cui_character' then
TriggerEvent ( 'cui_character:SetPedClothes_multi' , false , skin)
end
else
print ( 'skin nil' )
end
elseif Config.SkinScript == 'betrayed_clothing_1' or Config.SkinScript == 'betrayed_clothing_2' then
TriggerServerEvent ( 'clothing:get_character_current' )
--TriggerServerEvent('clothing:checkIfNew') --You may need to try each of these. Not sure which will work for your skin script version.
elseif Config.SkinScript == 'other' then
--Add your own code here.
end
------------------------------------------------------------------------------------------------------
--Add any additional trigger events here.
------------------------------------------------------------------------------------------------------
--HERE
--RCORE_TATTOOOS
--RELOAD AFTER NEW CHARACTER
TriggerServerEvent ( 'rcore_tattoos:reload' )
end
--███╗ ██╗███████╗██╗ ██╗ ██████╗██╗ ██╗ █████╗ ██████╗ █████╗ ██████╗████████╗███████╗██████╗
--████╗ ██║██╔════╝██║ ██║ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗
--██╔██╗ ██║█████╗ ██║ █╗ ██║ ██║ ███████║███████║██████╔╝███████║██║ ██║ █████╗ ██████╔╝
--██║╚██╗██║██╔══╝ ██║███╗██║ ██║ ██╔══██║██╔══██║██╔══██╗██╔══██║██║ ██║ ██╔══╝ ██╔══██╗
--██║ ╚████║███████╗╚███╔███╔╝ ╚██████╗██║ ██║██║ ██║██║ ██║██║ ██║╚██████╗ ██║ ███████╗██║ ██║
--╚═╝ ╚═══╝╚══════╝ ╚══╝╚══╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
--This function is triggered after you create a NEW character.
function CharacterHasLoaded_NEW ( charid_1 , charid_2 )
InitializeESX (charid_1, charid_2)
while not PlayerLoaded do Wait ( 0 ) end
ResetPlayerState ()
SetCoords (Config.DefaultSpawn)
if GetResourceState ( 'cd_identity' ) == 'started' then
TriggerEvent ( 'cd_identity:OpenIdentityUI' , charid_1)
else
if Config.SkinScript == 'esx_skin' then
TriggerEvent ( 'skinchanger:loadDefaultModel' , true )
TriggerEvent ( 'skinchanger:ResetPlayerSkin' )
TriggerEvent ( 'esx_skin:openSaveableMenu' )
elseif Config.SkinScript == 'cui_character' then
TriggerEvent ( 'cui_character:SetPedClothes_multi' , true )
elseif Config.SkinScript == 'betrayed_clothing_1' or Config.SkinScript == 'betrayed_clothing_2' then
TriggerServerEvent ( 'clothing:checkIfNew' )
--TriggerServerEvent('clothing:checkIfNew') --You may need to try each of these. Not sure which will work for your skin script version.
elseif Config.SkinScript == 'other' then
--Add your own code here.
end
end
------------------------------------------------------------------------------------------------------
--Add any additional trigger events here.
------------------------------------------------------------------------------------------------------
--HERE
--RCORE_TATTOOOS
--RELOAD AFTER NEW CHARACTER
TriggerServerEvent ( 'rcore_tattoos:reload' )
end