-
Notifications
You must be signed in to change notification settings - Fork 50
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
base: master
Are you sure you want to change the base?
Conversation
Added the support for Ox Inventory and Target
Added the support for Ox Inventory
server/server.lua
Outdated
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', |
There was a problem hiding this comment.
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.
Default to qb
Add the support for MultiLanguage
Added the support for language in notification and changed to bank for buying
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'] |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"success" and not "sucess"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See review changes.
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