Add files via upload
This commit is contained in:
1 parent
f9709311af
commit
e69ff1948b
30 files changed
+3208
-3607
No files matched your search
@@ -1,12 +1,12 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterServerEvent("md-drugs:server:travellingmerchantox", function(amount, money, item, price)
|
||||
RegisterServerEvent("md-drugs:server:travellingmerchantox", function(amount, money, item, price,table,num)
|
||||
local src = source local Player = QBCore.Functions.GetPlayer(src)
|
||||
|
||||
if not table[num]['name'] == item then return end
|
||||
if Player.Functions.RemoveMoney(tostring(money), tonumber(price) * tonumber(amount)) then
|
||||
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "add", amount)
|
||||
Player.Functions.AddItem(item, amount)
|
||||
else
|
||||
TriggerClientEvent('QBCore:Notify', source, "Broke Ass Cant Afford This", "error")
|
||||
end
|
||||
|
||||
end)
|
||||
Reference in new issue
Block a user