Editable Files

Client

local tgiann_clothing = GetResourceState("tgiann-clothing") ~= "missing"
local esx_skin = GetResourceState("esx_skin") ~= "missing"
local illenium_appearance = GetResourceState("illenium-appearance") ~= "missing"

---@param veh number
function giveVehicleKey(veh)
    --local plate = GetVehicleNumberPlateText(veh)
    debug(("GIVING KEY TO VEHICLE %s"):format(veh))
    tgiCore.GiveVehicleKey(veh, false)
end

---@param card table config.hacking.levels[index]
function policeAlert(card)
    TriggerServerEvent('police:server:policeAlert', 'Credi Card Hacking')
end

---@return number
function getPoliceCount()
    return exports["tgiann-core"]:getPoliceCount()
end

---@param active boolean
function changeClothe(active)
    if not config.job.clothe.active then return end
    if active then
        local clotheData = GetEntityModel(PlayerPedId()) == 1885233650 and config.job.clothe.male or config.job.clothe.female
        if tgiann_clothing then
            TriggerEvent("tgiann-clothing:changeScriptClothe", clotheData)
        else
            local newList = {}
            for i = 1, #clotheData do
                local data = clotheData[i]
                local mainTag = data.isProp and "p" or "c"
                if not newList[mainTag .. data.componentId] then
                    newList[mainTag .. data.componentId] = {
                        componentId = data.componentId,
                        isProp = data.isProp
                    }
                end
                if string.find(data.name, "_2") then
                    newList[mainTag .. data.componentId].textureId = data.val
                else
                    newList[mainTag .. data.componentId].drawableId = data.val
                end
            end

            for _, value in pairs(newList) do
                if value.isProp then
                    SetPedPropIndex(PlayerPedId(), value.componentId, value.drawableId, value.textureId or 0, 2)
                else
                    SetPedComponentVariation(PlayerPedId(), value.componentId, value.drawableId, value.textureId or 0, 2)
                end
            end
        end
    else
        if tgiann_clothing then
            TriggerEvent("tgiann-clothing:changeScriptClothe")
        elseif illenium_appearance then
            TriggerEvent("illenium-appearance:client:reloadSkin")
        elseif esx_skin then
            tgiCore.core.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
                TriggerEvent('skinchanger:loadSkin', skin)
            end)
        elseif config.framework == "qb" then
            TriggerServerEvent("qb-clothes:loadPlayerSkin")
            TriggerServerEvent("qb-clothing:loadPlayerSkin")
            TriggerEvent("qb-radialmenu:ResetClothing")
        else
            TriggerEvent("fivem-appearance:client:reloadSkin")
        end
    end
end

Server

Last updated