QBCore Install

Step 1. Remove Old Clothing Resources

Delete qb-clothing or illenium-appearance from your resources folder

Delete any tattoo shop resources e.g. qb-tattooshop from your resources folder


Step 2. Install dependencies

Install the dependencies if they are not installed.


Step 3. Download lvs_clothing

Drag And Drop, put lvs_clothing in resources folder


Step 4. SQL

Delete the playerskins table from your database

Delete the player_outfits table from your database

Run the database.sql file located in the resource folder in your database! Or execute the SQL:

CREATE TABLE IF NOT EXISTS `playerskins` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `citizenid` varchar(255) NOT NULL,
    `model` varchar(255) NOT NULL,
    `skin` text NOT NULL,
    `active` tinyint(4) NOT NULL DEFAULT 1,
    PRIMARY KEY (`id`),
    KEY `citizenid` (`citizenid`),
    KEY `active` (`active`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;


CREATE TABLE IF NOT EXISTS `player_outfits` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `citizenid` varchar(50) DEFAULT NULL,
    `outfitname` varchar(50) NOT NULL DEFAULT '0',
    `tags` varchar(50) DEFAULT NULL DEFAULT 'No Tags',
    `model` varchar(50) DEFAULT NULL,
    `props` varchar(1000) DEFAULT NULL,
    `components` varchar(1500) DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `citizenid_outfitname_model` (`citizenid`,`outfitname`,`model`),
    KEY `citizenid` (`citizenid`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

Step 5. Config

Now configure and translate your resource.

Config files

/config/config.lua /config/blacklist.lua /config/cloakroom.lua /config/peds.lua /config/stores.lua /config/target.lua /config/tattoos.lua /config/ui.lua


Step 6. Script initiate

Start the script in server.cfg , ensure lvs_clothing.


Step 7. qb-multicharacter

Open qb-multicharacter/server/main.lua find the callback qb-multicharacter:server:getSkin (line 198) and replace with:

QBCore.Functions.CreateCallback("qb-multicharacter:server:getSkin", function(_, cb, cid)
    local result = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?', {cid, 1})
    if result[1] ~= nil then
        cb(json.decode(result[1].skin))
    else
        cb(nil)
    end
end)

Open qb-multicharacter/client/main.lua find the nuicallback RegisterNUICallback('cDataPed', function(nData, cb) (line 206) and replace with:

RegisterNUICallback('cDataPed', function(nData, cb)
    local cData = nData.cData
    SetEntityAsMissionEntity(charPed, true, true)
    DeleteEntity(charPed)
    if cData ~= nil then
        if not cached_player_skins[cData.citizenid] then
            local temp_model = promise.new()
            local temp_data = promise.new()

            QBCore.Functions.TriggerCallback('qb-multicharacter:server:getSkin', function(data)
		local model = data.model or "mp_m_freemode_01"
                temp_model:resolve(model)
                temp_data:resolve(data)
            end, cData.citizenid)

            local resolved_model = Citizen.Await(temp_model)
            local resolved_data = Citizen.Await(temp_data)

            cached_player_skins[cData.citizenid] = {model = resolved_model, data = resolved_data}
        end

        local model = cached_player_skins[cData.citizenid].model
        local data = cached_player_skins[cData.citizenid].data

        if model ~= nil then
            initializePedModel(model, data)
        else
            initializePedModel()
        end
        cb("ok")
    else
        initializePedModel()
        cb("ok")
    end
end)

Last updated