Editable Files

Client/editable.lua

local rpemotesReborn = GetResourceState("rpemotes-reborn") ~= "missing"
local cdevEmoteMenu = GetResourceState("cdev_emotemenu") ~= "missing"
local rdAnimations = GetResourceState("rd-animations") ~= "missing"
local cylexAnimMenuV2 = GetResourceState("cylex_animmenuv2") ~= "missing"
local rAnimations = GetResourceState("r_animations") ~= "missing"

--- @return boolean, string @true, send error notification message
function editableCanOpenPhotoCam()
    return true, LANG.PHOTO_CAM_CANT_OPEN_MENU_EDITABLE
end

--- @return boolean, string @true, send error notification message
function editableCanOpenFreeCam()
    return true, LANG.FREE_CAM_CANT_OPEN_MENU_EDITABLE
end

--- @return boolean @true, if player is playing animation
function isPlayingAnim()
    if rpemotesReborn then
        return exports["rpemotes-reborn"]:IsPlayerInAnim()
    elseif cdevEmoteMenu then
        return exports["cdev_emotemenu"]:isAnimRunning()
    elseif rdAnimations then
        return exports["rd-animations"]:IsPlayingAnimation()
    elseif cylexAnimMenuV2 then
        return exports["cylex_animmenuv2"]:getCurrentEmote()
    elseif rAnimations then
        return exports['r_animations']:IsPlayingAnimation()
    else
        print("There is no emote menu resource found. Script work without emote menu.")
        return true
    end
end

function onAnimPosOpen()
    -- Your code here
end

function onAnimPosClose()
    -- Your code here
end

function onPhotoCamOpen()
    -- Your code here
end

function onPhotoCamClose()
    -- Your code here
end

function onFreeCamOpen()
    TriggerEvent("tgiann-lumihud:ui", false)
end

function onFreeCamClose()
    TriggerEvent("tgiann-lumihud:ui", true)
end

Server/editable.lua

Language File

Last updated