修改暂停界面标题及角色信息内容,如下图所示

CreateThread(function()
    while true do
        Wait(0)
        if IsPauseMenuActive() then
            local xPlayer = QBCore.Functions.GetPlayerData()
            local playerName = xPlayer.charinfo.firstname .. ' ' .. xPlayer.charinfo.lastname

            local maxLen = #tostring(xPlayer.money['bank'])
            if xPlayer.money['cash'] > xPlayer.money['bank'] then
                maxLen = #tostring(xPlayer.money['cash'])
            end

            local cashText = string.format("$%s [现金余额]", xPlayer.money['cash'])
            local bankText = string.format("$%s [银行账户]", xPlayer.money['bank'])
            local playerText = string.format("%s - [户头: %s]", playerName, xPlayer.source)

            local config = {
                -- Left Menu Config
                ["TITLE"] = "~b~FiveM LSRP~t~",
                ["SUBTITLE"] = "~g~https://kook.top/zUuHYS 致力于打造国服最好的RP服务器~t~",
                -- Right Menu Config
                ["PLAYER_INFO"] = playerText,
                ["CAHS_MONEY"] = cashText,
                ["BANK_MONEY"] = bankText,
            }

            -- Left Menu
            N_0xb9449845f73f5e9c("SHIFT_CORONA_DESC")
            PushScaleformMovieFunctionParameterBool(true)
            PopScaleformMovieFunction()
            N_0xb9449845f73f5e9c("SET_HEADER_TITLE")
            PushScaleformMovieFunctionParameterString(config["TITLE"])
            PushScaleformMovieFunctionParameterBool(true)
            PushScaleformMovieFunctionParameterString(config["SUBTITLE"])
            PushScaleformMovieFunctionParameterBool(true)
            PopScaleformMovieFunctionVoid()
            -- Right Menu
            BeginScaleformMovieMethodOnFrontendHeader("SET_HEADING_DETAILS")
            PushScaleformMovieFunctionParameterString(config["PLAYER_INFO"])
            PushScaleformMovieFunctionParameterString(config["CAHS_MONEY"]:format(cashAmount))
            PushScaleformMovieFunctionParameterString(config["BANK_MONEY"]:format(bankAmount))
            ScaleformMovieMethodAddParamBool(false)
            ScaleformMovieMethodAddParamBool(isScripted)
            EndScaleformMovieMethod()
        end
    end
end)
文章作者: E9C50
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 E9C50 Halo
技术 FiveM
喜欢就支持一下吧
打赏
微信 微信
支付宝 支付宝