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

feat(client/weapons): add useSlot weapon anim skip #1614

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

Demigod916
Copy link
Contributor

this adds a new optional param to the useSlot export, it allows for you to disable the anim for weapons if enabled when calling useSlot externally. while this is a little bit niche, i think this can come in handy in any instances where you need to set a weapon to a player immediately.

this adds a new optional param to the useSlot export, it allows for you to disable the anim for weapons if enabled when calling useSlot externally.
while this is a little bit niche, i think this can come in handy in any instances where you need to set a weapon to a player immediately.
@Demigod916 Demigod916 changed the title feat(client/weapons): add weapon equip anim skip feat(client/weapons): add useSlot weapon anim skip Feb 2, 2024
@thelindat
Copy link
Member

A generic skipAnim or such would probably make more sense (though anims are tied to the progress bar).

@Demigod916
Copy link
Contributor Author

I'll work on a pr for a generic skipAnim then. Thanks

@Demigod916
Copy link
Contributor Author

Demigod916 commented Feb 29, 2024

ive updated the PR to now be more of a generic anim skip. so if you manually use the useSlot export and pass true for 2nd arg, it will skip the weapon anim and then if the item is not a weapon it will skip the progress/anim for it instead

this allows for a "use immediately" type of functionality

exports.ox_inventory:useSlot(1, true)

@thelindat thelindat merged commit 91f74cb into overextended:main Feb 29, 2024
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.

None yet

2 participants