Installation

SQL

You can find assets/db.sql file in assets folder, please insert that sql into your database. It will create 1 table for player tattoos.

Config setup

Open the config.lua file.

Framework

This script can be standalone, if needed, and we implemented two basic frameworks. You can change to your preferred framework like this:

Config.Framework = Frameworks.ESX -- for ESX
Config.Framework = Frameworks.QBCORE -- for QB
Config.Framework = Frameworks.STANDALONE -- for Standalone ❗ check note below ❗

For Frameworks.STANDALONE, check Frameworks in config, please.

To implement your custom framework, take a look at the Framework easy guide.

License type

Change LicenseType to the type of license you use to save your player data. We use this information to get the player's identifier.

Config.LicenseType = 'license' --license, steam, discord

Language

To change the language of this script, you can simply change Config.Locale to any available language in locales folder (except tattooNames, that is used to make custom tattoo names).

Multicharacter

cd_multichar

  1. in rcore_tattoos/config.lua Config.LicenseWithoutPrefix = true

  2. cd_multicharacter/configs/config.lua add into additional tables

{table_name = 'rcore_tattoos', column_name = 'identifier'}
  1. cd_multicharacter/configs/client_customise_me.lua add this into existing character & new character

TriggerServerEvent('rcore_tattoos:reload')

Example


--███████╗██╗  ██╗██╗███████╗████████╗██╗███╗   ██╗ ██████╗      ██████╗██╗  ██╗ █████╗ ██████╗  █████╗  ██████╗████████╗███████╗██████╗ 
--██╔════╝╚██╗██╔╝██║██╔════╝╚══██╔══╝██║████╗  ██║██╔════╝     ██╔════╝██║  ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗
--█████╗   ╚███╔╝ ██║███████╗   ██║   ██║██╔██╗ ██║██║  ███╗    ██║     ███████║███████║██████╔╝███████║██║        ██║   █████╗  ██████╔╝
--██╔══╝   ██╔██╗ ██║╚════██║   ██║   ██║██║╚██╗██║██║   ██║    ██║     ██╔══██║██╔══██║██╔══██╗██╔══██║██║        ██║   ██╔══╝  ██╔══██╗
--███████╗██╔╝ ██╗██║███████║   ██║   ██║██║ ╚████║╚██████╔╝    ╚██████╗██║  ██║██║  ██║██║  ██║██║  ██║╚██████╗   ██║   ███████╗██║  ██║
--╚══════╝╚═╝  ╚═╝╚═╝╚══════╝   ╚═╝   ╚═╝╚═╝  ╚═══╝ ╚═════╝      ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝   ╚═╝   ╚══════╝╚═╝  ╚═╝


--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

Last updated