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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

exports.qbx_core:Notify(Lang:t('error.no_firstaid'), 'error')
return
end
Expand Down Expand Up @@ -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.

exports.qbx_core:Notify(Lang:t('error.no_bandage'), 'error')
return
end
Expand Down Expand Up @@ -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.

end
end)

Expand Down
Loading