A common request on my server is a function to be able to toggle the HUD and various UI stuff on screen (or as much of it as possible) to get nice screenshots. I’m seeking a way to make this possible and I think I have a lead but I’m not sure how it would work (not the most experienced in coding).
We do have the plugin that allows us to hide crosshairs and that uses “HideHudComponentThisFrame(14)” in order to hide the reticle. There is a full list of different HUD components listed here: https://wiki.fivem.net/wiki/HUD
What I’m curious as to, and I hope someone can tell me if this is possible, is if we can use that line to toggle HUD. Basically, you press a hotkey and it hides the various components that we want it to hide.Then you press it again and it goes back to normal. Any ideas would be appreciated!