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

QB-WEAPONS RECOIL EXPORT #206

Open
LawProductions opened this issue Dec 26, 2024 · 0 comments
Open

QB-WEAPONS RECOIL EXPORT #206

LawProductions opened this issue Dec 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@LawProductions
Copy link

LawProductions commented Dec 26, 2024

While creating a script, I needed to access recoils.lua to retrieve weapon recoil values. However, I noticed there wasn't an export available for this functionality. To solve this, I created a simple export, tested it, and it worked perfectly with my script. Although a small change, this could be helpful for others in the future.

Export Code:

exports('GetWeaponRecoil', function(weaponName)
local hash = GetHashKey(weaponName)
return recoils[hash] or 2.0
end)

EDIT - place before the eventhandler.

@LawProductions LawProductions added the enhancement New feature or request label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant