Make a help label disappear?


#1

I am trying to figure out how to make a created help label disappear maybe after a certain time or after a control is pressed.

My help label:

        SetTextComponentFormat("STRING")
        AddTextComponentString(help)
        DisplayHelpTextFromStringLabel(0, 0, 1, -1)

Once again, any help is well appreciated.


#2

Change the showed state to display or not the hint

showed = false
Citizen.CreateThread(function()
    while true do
        Wait(0)
        if showed == true then
            SetTextComponentFormat("STRING")
            AddTextComponentString(help)
            DisplayHelpTextFromStringLabel(0, 0, 1, -1)
        end
    end
end)


#3

Thank you. This helps a lot. :+1: