Add files via upload
This commit is contained in:
1 parent
f9709311af
commit
e69ff1948b
30 files changed
+3208
-3607
No files matched your search
+6
-13
@@ -3,12 +3,11 @@ QBCore = exports['qb-core']:GetCoreObject()
|
||||
RegisterServerEvent('md-drugs:server:payfortruck', function()
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
|
||||
local playerPed = GetPlayerPed(source)
|
||||
if Player.Functions.RemoveMoney('cash', Config.TruckPrice ) or Player.Functions.RemoveMoney('bank', Config.TruckPrice ) then
|
||||
TriggerClientEvent("md-drugs:Client:getoxylocation", src)
|
||||
|
||||
else
|
||||
TriggerClientEvent('QBCore:Notify', src, "Your Broke Ass Cant Afford these", "error")
|
||||
Notifys(Lang.oxy.broke, "error")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -22,23 +21,17 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function()
|
||||
local item = Config.OxyRandItems[math.random(1, #Config.OxyRandItems)]
|
||||
|
||||
if chance <= Config.OxyRunDitchChance then
|
||||
TriggerClientEvent('QBCore:Notify', src, "The Car Is Hot Now! Dump it", "error")
|
||||
Notifys(Lang.oxy.hot, "error")
|
||||
Player.Functions.AddMoney("cash", cash * 0.5)
|
||||
if itemchance <= Config.OxyItemChance then
|
||||
Player.Functions.AddItem(item, Config.OxyItemAmount)
|
||||
Player.Functions.AddItem("oxy", Config.OxyItemAmount)
|
||||
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", Config.OxyItemAmount)
|
||||
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items["oxy"], "add", Config.OxyItemAmount)
|
||||
AddItem(item, Config.OxyItemAmount)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent('QBCore:Notify', src, "Get To The Next Location", "success")
|
||||
Notifys(Lang.oxy.next, "success")
|
||||
TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
|
||||
Player.Functions.AddMoney("cash", cash)
|
||||
if itemchance <= Config.OxyItemChance then
|
||||
Player.Functions.AddItem(item, Config.OxyItemAmount)
|
||||
Player.Functions.AddItem("oxy", Config.OxyItemAmount)
|
||||
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", Config.OxyItemAmount)
|
||||
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items["oxy"], "add", Config.OxyItemAmount)
|
||||
AddItem(item, Config.OxyItemAmount)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user