Exports

Here you will find all the useful exports for this asset, please read each step and example carefully to better understand how it works, we do not recommend using these if you are not an experienced developer.


showHintUI

To show hint for player you need to use the following export.

exports['p_hints']:showHintUI(data)

Example of usage

exports['p_hints']:showHintUI({
   title = 'Example title',
   text = 'Example <font>text</font>',
   timeout = 5000, -- optional
   position = 'center-left' -- center-left / center-right
})

hideHintUI

To hide hint for player you need to use the following export.

exports['p_hints']:hideHintUI()

Script Import

You can add following line to shared_scripts in fxmanifest of your script.

'@p_hints/init.lua'

Example

shared_scripts {
    '@es_extended/imports.lua',
    '@ox_lib/init.lua',
    '@p_hints/init.lua', -- Hint import
}

Usage

Now you are able to use following code to show / hide hint.

Hints.showHintUI(data)
Hints.hideTextUI()

Last updated