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

fix(qbx_hudcomponents): Allow weapon scopes to be used #133

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

Conversation

citRaTTV
Copy link

Description

Allows weapon scopes to be used by using IsFirstPersonAimCamActive(). Closes #119

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

if not weapon then return end
CreateThread(function()
while cache.weapon ~= weapon do Wait(1) end -- Wait for cache.weapon to update
while cache.weapon == weapon do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For style, add a space above this line as both loops serve different purposes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Wait(0)
end
end)

lib.onCache('weapon', function(weapon)
if not weapon then return end
CreateThread(function()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For style, add a space between the if statement and the thread as they are separate from each other.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

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.

[Suggestion/issue] Check for scoped weapons in hide hud components
2 participants