Editable Files

client/editable.lua

function meDoEmote(cm)
    print("Penis: " .. cm .. "cm")
end

local function scriptIsStarted(name)
    return GetResourceState(name) ~= "missing"
end

function resetClothing()
    if scriptIsStarted("tgiann-clothing") then
        TriggerEvent("tgiann-clothing:refreshSkin")
    elseif scriptIsStarted("fivem-appearance") then
        TriggerEvent("fivem-appearance:client:reloadSkin")
    elseif scriptIsStarted("illenium-appearance") then
        TriggerEvent("illenium-appearance:client:reloadSkin")
    else
        if config.framework == "qb" then
            TriggerServerEvent("qb-clothes:loadPlayerSkin")  -- LOADING PLAYER'S CLOTHES
            TriggerServerEvent("qb-clothing:loadPlayerSkin") -- LOADING PLAYER'S CLOTHES - Event 2
            TriggerEvent("qb-radialmenu:ResetClothing")
        else
            tgiCore.cbFunction('esx_skin:getPlayerSkin', function(skin, jobSkin)
                TriggerEvent('skinchanger:loadSkin', skin)
            end)
        end
    end
end

function canUse() --it works when you use the unclothe command(client)
    return true
end

server/editable.lua

function setNewPenis()
    math.randomseed(GetGameTimer())
    local randomPenis = math.random(1, #config.penisCm)
    if randomPenis == 6 then                -- 19cm
        if math.random(1, 100) < 90 then
            randomPenis = math.random(2, 3) -- 9-12cm
        end
    elseif randomPenis == 5 then            -- 16cm
        if math.random(1, 100) < 75 then
            randomPenis = math.random(2, 3) -- 9-12cm
        end
    elseif randomPenis == 4 then            -- 14cm
        if math.random(1, 100) < 85 then
            randomPenis = math.random(2, 3) -- 9-12cm
        end
    elseif randomPenis == 1 then            -- 5cm
        if math.random(1, 100) < 85 then
            randomPenis = math.random(2, 3) -- 9-12cm
        end
    end

    return config.penisCm[randomPenis]
end

function canUse(src, xPlayer) --it works when you use the unclothe command(server)
    return true
end

server/commands.lua

local adminPerm = config.framework == "qb" and adminPerm or "admin"

tgiCore.CommandsAdd("nakedrandom", "Reset Player's Nudity Data", { { name = "id", help = "Player Server ID" } }, true,
    function(source, args)
        nakedrandom(source, args[1])
    end, adminPerm)

tgiCore.CommandsAdd(config.commads.unclothe, config.text.unclotheDecs, {}, false, function(source, args)
    if not checkNakedDataForCommands() then return end
    local src = source
    local xPlayer = tgiCore.getPlayer(src)
    if not canUse(src, xPlayer) then return end
    local xPlayerCitizenId = tgiCore.getCid(xPlayer)
    local data = getData(xPlayerCitizenId)
    if not data or config.test then
        data = setPlayerData(src, xPlayerCitizenId)
    end
    TriggerClientEvent("tgiann-naked:setPlayerNaked", src, data)
end)

tgiCore.CommandsAdd(config.commads.unclothecolor, config.text.unclothecolorDecs, {}, false,
    function(source, _)
        local src = source
        local xPlayer = tgiCore.getPlayer(src)
        local data = getData(tgiCore.getCid(xPlayer))
        TriggerClientEvent("tgiann-naked:setPlayerNakedColor", src, data)
    end)

tgiCore.CommandsAdd(config.commads.unclothehair, config.text.unclothehairDecs, {}, false,
    function(source, _)
        local src = source
        local xPlayer = tgiCore.getPlayer(src)
        local data = getData(tgiCore.getCid(xPlayer))
        TriggerClientEvent("tgiann-naked:setPlayerNakedHairType", src, data)
    end)

tgiCore.CommandsAdd(config.commads.unclotheErect, config.text.unclotheErectDecs, {}, false,
    function(source, _)
        local src = source
        local xPlayer = tgiCore.getPlayer(src)
        local data = getData(tgiCore.getCid(xPlayer))
        TriggerClientEvent("tgiann-naked:forceErect", src, data)
    end)

tgiCore.CommandsAdd(config.commads.censor, config.text.censorDecs, {}, false, function(source, args)
    censorCommand(source)
end)

Last updated