Skip to content

Hide UI Functions, Exports and In game Commands.#200

Open
LawProductions wants to merge 6 commits into
qbcore-framework:mainfrom
LawProductions:main
Open

Hide UI Functions, Exports and In game Commands.#200
LawProductions wants to merge 6 commits into
qbcore-framework:mainfrom
LawProductions:main

Conversation

@LawProductions

@LawProductions LawProductions commented Jan 16, 2025

Copy link
Copy Markdown

Description

This PR adds essential HUD visibility functionality to qb-hud, addressing a significant gap in the resource. Currently, there's no native way to programmatically hide/show the HUD, which is crucial for developers creating immersive UI experiences, cutscenes, or custom interfaces.

Key additions:

Server-side /togglehud command
Client-side export ToggleHud() for toggling visibility
Export IsHudHidden() to check current state
Export SetHudState(state) for direct state control
Proper state management for vehicle/on-foot transitions
Clean player state clean-up on disconnect

Checklist

  • I have personally loaded this code into an updated qbcore project and checked all of its functionality.
  • My code fits the style guidelines.
  • My PR fits the contribution guidelines.

@LawProductions

Copy link
Copy Markdown
Author

Removed an Linting Report Error on line 781 Due to an unused Variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants