Native function to know when you are in the menu

What is the native function to detect if one is in the menu? It is to be able to hide my money menu …


Thanks but its dont work
Where do you find all the native functions and their explanation?

IsPauseMenuActive() will return true or false I guess on my phone so haven’t checked, in your fivem client files there is a native.lua with all the natives and the parameters they take.

I take

if IsPauseMenuActive() then
SendNUIMessage({mod="baseMods", type="viewMsg", model=1, text=1})

but its dont work.
Thank Thorgaming for the native solution

Its work
Thanks all