Skip to content

QB-WEAPONS RECOIL EXPORT #206

Description

@LawProductions

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions