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

Replace QB items.lua and weapons.lua with Ox #451

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

Conversation

Scullyy
Copy link
Contributor

@Scullyy Scullyy commented Apr 20, 2024

Description

This replaces the QBCore items.lua and weapons.lua with the ox one, I also had to add a WeaponHashes table for reverse hashing since ox uses strings. I have open PR's on other resources to be compatible with this also.

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.

Scullyy added a commit to Scullyy/qbx_policejob that referenced this pull request Apr 20, 2024
Scullyy added a commit to Scullyy/qbx_policejob that referenced this pull request Apr 20, 2024
Convert weapons.lua requirement to ox
Scullyy added a commit to Scullyy/qbx_policejob that referenced this pull request Apr 20, 2024
Convert weapons.lua requirement to ox
Scullyy added a commit to Scullyy/qbx_medical that referenced this pull request Apr 20, 2024
- Uses Qbox-project/qbx_core#451
- Added damage reasons since this handles damage
Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

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

This is a breaking change. The data format of ox_inventory is not the same as shared/weapons.lua

Copy link
Contributor

@TonybynMp4 TonybynMp4 left a comment

Choose a reason for hiding this comment

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

YES I LOVE YOU, just make sure the format is right tho

@Scullyy Scullyy requested a review from Manason April 20, 2024 23:40
@Scullyy Scullyy changed the title Replace QB weapons.lua with Ox Replace QB items.lua and weapons.lua with Ox Apr 21, 2024
@Scullyy
Copy link
Contributor Author

Scullyy commented Apr 21, 2024

The items.lua will need to replace the one inside ox_inventory with the recipe. If not using the oldItems method this may need it's own bridge inside ox_inventory.

@BerkieBb
Copy link
Contributor

BerkieBb commented May 2, 2024

I am not sure about this, I would rather not have an items.lua anymore in the future as they all get picked up by ox_inventory and placed in the data/items.lua anyway, otherwise they don't work

@SKITTLE6969
Copy link
Contributor

only issue that i see is when ox inventory try to convert the item lua in shared what happens then

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

5 participants