moved more

This commit is contained in:
Mustache Dom committed 2024-11-12 01:04:42 -08:00
1 parent bcdf71b17a
commit 5bc0e9f4e0
12 files changed
+242 -275

No files matched your search

+13 -11
View File
@@ -3,7 +3,7 @@ QBCore = exports['qb-core']:GetCoreObject()
lib.callback.register('md-drugs:server:payfortruck', function()
local src = source
local Player = getPlayer(src)
if Player.Functions.RemoveMoney('cash', Config.TruckPrice ) or Player.Functions.RemoveMoney('bank', Config.TruckPrice ) then
if Player.Functions.RemoveMoney('cash', 500) or Player.Functions.RemoveMoney('bank', 500) then
Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
return true
else
@@ -17,24 +17,26 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
local Player = getPlayer(src)
local chance = math.random(1,100)
local cash = Config.OxyRunCompleteCash
local cash = 200
local itemchance = math.random(1,100)
local item = Config.OxyRandItems[math.random(1, #Config.OxyRandItems)]
if chance <= Config.OxyRunDitchChance then
local itemList = {
{item = 'oxy', amount = 2},
{item = 'lockpick', amount = 1},
{item = 'cryptostick', amount = 1},
}
local item = itemList[math.random(1, #itemList)]
if chance <= 30 then
Notifys(src, Lang.oxy.hot, "error")
Player.Functions.AddMoney("cash", cash * 0.5)
if itemchance <= Config.OxyItemChance then
AddItem(src, item, Config.OxyItemAmount)
Log(GetName(source) .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy')
if itemchance <= 30 then
AddItem(src, item.item, item.amount)
end
else
Notifys(Lang.oxy.next, "success")
TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
Player.Functions.AddMoney("cash", cash)
if itemchance <= Config.OxyItemChance then
AddItem(src, item, Config.OxyItemAmount)
Log(GetName(source) .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy')
if itemchance <= 30 then
AddItem(src, item.item, item.amount)
end
end