Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LawProductions
Copy link

@LawProductions LawProductions commented Jan 16, 2025

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.

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.

1 participant