Skip to content
This repository was archived by the owner on Jun 13, 2022. It is now read-only.
This repository was archived by the owner on Jun 13, 2022. It is now read-only.

[Suggestion] Use Native Gta Skill Up Notify #4

@ihyajb

Description

@ihyajb

I may PR this if I get around to it. But it has to do with this native: https://docs.fivem.net/natives/?_0x2B7E9A4EAAA93C89

Small Image + Code Snippet

image

Citizen.CreateThread(function()
    -- Get the ped headshot image.
    local handle = RegisterPedheadshot(PlayerPedId())
    while not IsPedheadshotReady(handle) or not IsPedheadshotValid(handle) do
        Citizen.Wait(0)
    end
    local txd = GetPedheadshotTxdString(handle)

    -- Add the notification text
    BeginTextCommandThefeedPost("PS_UPDATE")
    AddTextComponentInteger(50)

    -- Set the notification title and progress
    local title = "PSF_STAMINA"
    local p1 = 14
    local lastProgress = 25
    local newProgress = 50
    local unknownBool = false
    EndTextCommandThefeedPostStats(title, p1, newProgress, lastProgress, unknownBool, txd, txd)

    -- Draw the notification
    local showInBrief = true
    local blink = false -- blink doesn't work when using icon notifications.
    EndTextCommandThefeedPostTicker(blink, showInBrief)
    
    -- Cleanup after yourself!
    UnregisterPedheadshot(handle)
end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions