client/topheader.lua

function headerClickMainFunction()
    CloseInventory()
    while IsNuiFocused() do Wait(100) end
    exports["tgiann-esc"]:open()
end

function headerClickShopFunction()
    exports["tgiann-coinshop"]:openUi()
end

function headerClickSettingsFunction()
    CloseInventory()
    while IsNuiFocused() do Wait(100) end
    ActivateFrontendMenu(`FE_MENU_VERSION_LANDING_MENU`,0,-1)
end

function headerClickCraftFunction()
    TriggerEvent("tgiann-inventory:craft:openDefault")
end

RegisterNUICallback("headerClick", function(funcName, cb)
    _G[funcName]()
    cb("")
end)

Last updated