-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
isPlayerHudComponentVisible only works with setPlayerHudComponentVisible #547
Comments
This is a weird one. There needs to be a distinction between "visible" and "enabled"... |
I don't think we can just change the default behaviour of One way to solve this problem is to change the syntax from: bool isPlayerHudComponentVisible( string component ) To: bool isPlayerHudComponentVisible(string component, bool checkEnabled=true) And carefully document that by default it checks that the HUD component is enabled, rather than visible on screen. And that scripters need to provide Thoughts, @Unde-R, @patrikjuvonen? |
looks good to me |
@qaisjp |
Like this right? (let me test it tho) |
something like that. I guess you can go ahead and update your PR with an implementation |
Describe the bug
when Using isPlayerHudComponentVisible( string Component) returns always true until using setPlayerHudComponentVisible
Examples when it is wrong:
To reproduce
showhud
crun isPlayerHudComponentVisible("health")
returns true when should be falseExpected behaviour
To return false when component not on screen.
Screenshots
If applicable, add screenshots to help explain your problem.
MTA Client:
MTA Server:
Additional context
Add any other context about the problem here
From https://bugs.mtasa.com/view.php?id=7356
The text was updated successfully, but these errors were encountered: