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

Add support for OverExtended (Ox) #33

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Amrizamaa
Copy link

Hello,

Find here the modification to add support for Ox Inventory and Ox Target

I edited the config.lua to add the variables
I edited Client Side to add the Ox Target support
I edited Server Side to add the Ox Inventory support

Have a good day

Added the support for Ox_Target
Added the support for Ox Inventory and Target
Added the support for Ox Inventory
Comment on lines 63 to 72
TriggerClientEvent('QBCore:Notify', source, 'Tu as acheté un journal pour ' .. Config.Price .. ' $',
'success')
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['newspaper'], "add")
elseif Config.Inventory == 'ox' then
TriggerClientEvent('QBCore:Notify', source, 'Tu as acheté un journal pour ' .. Config.Price .. ' $',
'success')
exports.ox_inventory:AddItem(source, type, 1)
end
else
TriggerClientEvent('QBCore:Notify', source, '$' .. Config.Price .. ' required for buying a newspaper',
TriggerClientEvent('QBCore:Notify', source, '$' .. Config.Price .. ' requis pour acheter un journal',
Copy link
Owner

Choose a reason for hiding this comment

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

Messages should be in english.

config.lua Outdated Show resolved Hide resolved
Default to qb
Add the support for MultiLanguage
Added the support for language in notification and changed to bank for buying
@Amrizamaa
Copy link
Author

Change done

Update the Fx Manifest Version
end
end)

-- Buy a newspaper
RegisterNetEvent('newspaper:buy', function(type)
local Player = QBCore.Functions.GetPlayer(source)
local cash = Player.PlayerData.money['cash']
local cash = Player.PlayerData.money['bank']
Copy link
Owner

Choose a reason for hiding this comment

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

It should not be from the bank but from cash.

@@ -0,0 +1,20 @@
local Translations = {

sucess = {
Copy link
Owner

Choose a reason for hiding this comment

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

"success" and not "sucess"

Copy link
Owner

Choose a reason for hiding this comment

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

Please use camel case for the table keys.

Copy link
Owner

@xFutte xFutte left a comment

Choose a reason for hiding this comment

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

See review changes.

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