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 authorizedHelicopterS typo and removed export hasitem #113

Closed
wants to merge 1 commit into from
Closed

Conversation

CarlBishop
Copy link

Description

There was a typo on the authorizedHelicopter config vaue, on the client file was called authorizedHelicopters.

Trere was also an export for HasItem "exports.qbx_core:HasItem" but HasItem should be called directly.

Checklist

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

@@ -155,7 +155,7 @@ end)
---Use bandage on nearest player to treat their wounds.
---Intended to be invoked by client or server.
RegisterNetEvent('hospital:client:TreatWounds', function()
if not exports.qbx_core:HasItem('bandage') then
if not HasItem('bandage') then
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this to use the ox_inventory Search method.

@@ -114,7 +114,7 @@ end)
---Use first aid on nearest player to revive them.
---Intended to be invoked by client or server.
RegisterNetEvent('hospital:client:RevivePlayer', function()
if not exports.qbx_core:HasItem('firstaid') then
if not HasItem('firstaid') then
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be using the ox_inventory Search. While this functionally works this is a deprecated function that may be removed in the future.

https://overextended.dev/ox_inventory/Functions/Client#search

@@ -300,7 +300,7 @@ CreateThread(function()
end

for _, coords in pairs(sharedConfig.locations.helicopter) do
createGarage(config.authorizedHelicopters, Lang:t('info.heli_plate'), coords)
createGarage(config.authorizedHelicopter, Lang:t('info.heli_plate'), coords)
Copy link
Contributor

Choose a reason for hiding this comment

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

authorizedHelicopters actually sounds like it should be the correct name? Maybe change the config to match instead of changing here.

@CarlBishop
Copy link
Author

you are right. I didn't se your pr about the same. I will close this and wait for your ps to be merged.
By the way this resource is unusable as it is.

@CarlBishop CarlBishop closed this Dec 6, 2023
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.

3 participants