removed 90% of logs ( added logs to getrecipe, locationcheck, and fixed wholesale, dealers, and oxyruns, and meth
This commit is contained in:
1 parent
cdd26ab465
commit
5c5f454207
14 files changed
+94
-209
No files matched your search
@@ -79,7 +79,6 @@ end)
|
||||
|
||||
CreateThread(function()
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
if not config then print('why') return end
|
||||
if Config.FancyCokeAnims == false then
|
||||
AddBoxZoneMulti('cuttcoke', config.CuttingCoke, { type = "client",event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
|
||||
AddBoxZoneMulti('baggcoke', config.BaggingCoke, { type = "client",event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
|
||||
|
||||
@@ -4,6 +4,7 @@ local sold = false
|
||||
local targbusy = false
|
||||
local inZone = false
|
||||
local active = false
|
||||
|
||||
local function reset(targ)
|
||||
FreezeEntityPosition(targ, false)
|
||||
ClearPedTasks(targ)
|
||||
|
||||
+11
-3
@@ -1,14 +1,13 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local isActive = false
|
||||
|
||||
local dealer = {}
|
||||
RegisterNetEvent('md-drugs:client:opendealermenu', function()
|
||||
local rep = GetRep()
|
||||
makeMenu('dealermenu', rep)
|
||||
lib.showContext('dealermenu')
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local dealer = {}
|
||||
local function SpawnDealer()
|
||||
local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
@@ -30,6 +29,14 @@ CreateThread(function()
|
||||
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
|
||||
}}, dealer[k])
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
@@ -55,3 +62,4 @@ RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
end
|
||||
}, nil)
|
||||
end)
|
||||
|
||||
+17
-11
@@ -473,15 +473,22 @@ function AddBoxZoneMulti(name, table, data)
|
||||
end
|
||||
|
||||
function AddBoxZoneMultiOptions(name, loc, data)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
|
||||
{ options = data, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = data })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = data})
|
||||
end
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
table.insert(options, {
|
||||
icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
|
||||
{ options = options, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = options })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = options})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function AddSingleModel(model, data, num)
|
||||
@@ -497,13 +504,12 @@ function AddSingleModel(model, data, num)
|
||||
end
|
||||
|
||||
function AddMultiModel(model, data, num)
|
||||
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
options[#options + 1] = {
|
||||
table.insert(options, {
|
||||
icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
|
||||
}
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ CreateThread(function()
|
||||
AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
|
||||
AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
|
||||
local options = {
|
||||
{ name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
|
||||
{ name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
|
||||
canInteract = function()
|
||||
if amonia == nil and active == nil then
|
||||
return true
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
|
||||
|
||||
CreateThread(function()
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01'}
|
||||
|
||||
+12
-24
@@ -2,38 +2,35 @@ local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local miss = false
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
Notify(Lang.Wholesale.al, 'error')
|
||||
else
|
||||
TriggerServerEvent('md-drugs:server:RemoveBurner', drug)
|
||||
Notify(notify, 'success')
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local CurrentLocation = drug.location
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(CurrentLocation.x, CurrentLocation.y)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
local current = "g_m_y_famdnf_01"
|
||||
local drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
AddSingleModel(drugdealer, {
|
||||
type = "client",
|
||||
label = Lang.Wholesale.talk,
|
||||
AddMultiModel(drugdealer, {{
|
||||
label = Lang.targets.Wholesale.talk,
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck >= Config.SuccessfulChance then
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:SuccessSale", drug)
|
||||
else
|
||||
TriggerEvent("md-drugs:client:SetUp")
|
||||
TriggerEvent("md-drugs:client:SetUp", drug)
|
||||
end
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
miss = false
|
||||
end,
|
||||
},nil )
|
||||
end
|
||||
}},drugdealer )
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer + 1
|
||||
@@ -51,20 +48,11 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:SuccessSale", function(drug)
|
||||
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
|
||||
if drug == 'coke' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalecoke")
|
||||
elseif drug == 'crack' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalecrack")
|
||||
elseif drug == 'lsd' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalelsd")
|
||||
elseif drug == 'heroin' then
|
||||
TriggerServerEvent("md-drugs:server:wholesaleheroin")
|
||||
elseif drug == 'xtc' then
|
||||
TriggerEvent("md-drugs:client:wholesalextc")
|
||||
end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:SetUp", function()
|
||||
RegisterNetEvent("md-drugs:client:SetUp", function(drug)
|
||||
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
|
||||
TriggerServerEvent("md-drugs:server:SetUp", drug)
|
||||
SetUpPeds()
|
||||
end)
|
||||
@@ -213,12 +213,3 @@ RegisterServerEvent('md-drugs:server:cornerselling:stop', function()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
for k, v in pairs (DrugDeals) do
|
||||
print('DrugDeals: ', json.encode(v))
|
||||
end
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
@@ -133,7 +133,6 @@ RegisterServerEvent('md-drugs:server:getheroinlabkitback', function()
|
||||
AddItem(src, 'heroinlabkit', 1)
|
||||
end
|
||||
end
|
||||
print(json.encode(heroinLabKits))
|
||||
end)
|
||||
|
||||
|
||||
@@ -152,7 +151,6 @@ QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item)
|
||||
})
|
||||
Notifys(src, Lang.Heroin.placed, "success")
|
||||
end
|
||||
print(json.encode(heroinLabKits))
|
||||
end)
|
||||
|
||||
|
||||
|
||||
@@ -138,3 +138,8 @@ end)
|
||||
lib.callback.register('md-drugs:server:GetMerchant', function(source)
|
||||
return loc
|
||||
end)
|
||||
|
||||
function getRandW(src)
|
||||
local rand = math.random(1, #Target.oxylocations)
|
||||
return Target.oxylocations[rand]
|
||||
end
|
||||
@@ -34,7 +34,6 @@ QBCore.Functions.CreateUseableItem('lsdlabkit', function(source, item)
|
||||
})
|
||||
end
|
||||
end
|
||||
print(json.encode(lsdTables))
|
||||
end)
|
||||
|
||||
local function hasLabKit(source)
|
||||
@@ -64,7 +63,6 @@ RegisterServerEvent('md-drugs:server:getlabkitback', function()
|
||||
AddItem(src, 'lsdlabkit', 1)
|
||||
end
|
||||
end
|
||||
print(json.encode(lsdTables))
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:heatliquid', function()
|
||||
@@ -217,5 +215,4 @@ AddEventHandler('playerDropped', function()
|
||||
AddItem(src, 'lsdlabkit', 1)
|
||||
end
|
||||
end
|
||||
print(json.encode(lsdTables))
|
||||
end)
|
||||
@@ -4,7 +4,6 @@ RegisterServerEvent('md-drugs:server:startcook', function()
|
||||
local src = source
|
||||
if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
|
||||
Notifys(src, "Adding Things To The Mix", "success")
|
||||
Log(GetName(source) .. ' Started A Meth Batch', 'Meth')
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:givemethingridients', function()
|
||||
@@ -25,7 +24,6 @@ end)
|
||||
RegisterServerEvent('md-drugs:server:getmeth', function()
|
||||
local src = source
|
||||
if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
|
||||
Log(GetName(src) .. ' Bagged 5 Of Meth', 'Meth')
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:geteph', function(num)
|
||||
@@ -33,7 +31,6 @@ RegisterServerEvent('md-drugs:server:geteph', function(num)
|
||||
if not checkLoc(src, 'MethEph', num) then return end
|
||||
if AddItem(src, 'ephedrine', 1) then
|
||||
Notifys(src, 'Got Ephedrine!', "success")
|
||||
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Ephedrine', 'Meth')
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -42,6 +39,5 @@ RegisterServerEvent('md-drugs:server:getace', function(num)
|
||||
if not checkLoc(src, 'Methace', num) then return end
|
||||
if AddItem(src, 'acetone', 1) then
|
||||
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
|
||||
Notifys(src, 'Got Acetone!', "success")
|
||||
end
|
||||
end)
|
||||
+47
-147
@@ -4,162 +4,62 @@ local crack = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethre
|
||||
local lsd = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'}
|
||||
local heroin = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'}
|
||||
local xtc = {"white_playboys", "white_playboys2", "white_playboys3", "white_playboys4", "blue_playboys", "blue_playboys2", "blue_playboys3", "blue_playboys4", "red_playboys", "red_playboys2", "red_playboys3", "red_playboys4", "orange_playboys", "orange_playboy2s", "orange_playboys3", "orange_playboys4", "white_aliens", "white_aliens2", "white_aliens3", "white_aliens4", "blue_aliens", "blue_aliens2", "blue_aliens3", "blue_aliens4", "red_aliens", "red_aliens3", "red_aliens2", "red_aliens4", "orange_aliens", "orange_aliens2", "orange_aliens3", "orange_aliens4", "white_pl", "white_pl2", "white_pl3", "white_pl4", "blue_pl", "blue_pl2", "blue_pl3", "blue_pl4", "red_pl", "red_pl2", "red_pl3", "red_pl4", "orange_pl", "orange_pl2", "orange_pl3", "orange_pl4", "white_trolls", "white_trolls2", "white_trolls3", "white_trolls4", "blue_trolls", "blue_trolls2", "blue_trolls3", "blue_trolls4", "red_trolls", "red_trolls2", "red_trolls3", "red_trolls4", "orange_trolls", "orange_trolls2", "orange_trolls3", "orange_trolls4", "white_cats2", "white_cats3", "white_cats4", "white_cats", "blue_cats", "blue_cats3", "blue_cats2", "blue_cats4", "red_cats", "red_cats2", "red_cats3", "red_cats4", "orange_cats", "orange_cats2", "orange_cats3", "orange_cats4" }
|
||||
|
||||
local burners = {cokeburner = coke, crackburner = crack, lsdburner = lsd, heroinburner = heroin, xtcburner = xtc}
|
||||
local active = {}
|
||||
local Price = {
|
||||
coke = {min = 20, max = 60},
|
||||
crack = {min = 20, max = 60},
|
||||
lsd = {min = 20, max = 60},
|
||||
heroin = {min = 20, max = 60},
|
||||
xtc = {min = 20, max = 60},
|
||||
|
||||
}
|
||||
QBCore.Functions.CreateUseableItem("cokeburner", function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(source)
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, 'coke', "Bring Me All The Coke You Have")
|
||||
end)
|
||||
for k, v in pairs (burners) do
|
||||
QBCore.Functions.CreateUseableItem(k, function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
for m, d in pairs (active) do
|
||||
if d.cid == Player.PlayerData.citizenid then
|
||||
return Notifys(src, 'You Already Have A Delivery To Make', 'error' )
|
||||
end
|
||||
end
|
||||
local tab = ''
|
||||
if k == 'cokeburner' then tab = 'coke' end
|
||||
if k == 'crackburner' then tab = 'crack' end
|
||||
if k == 'lsdburner' then tab = 'lsd' end
|
||||
if k == 'heroinburner' then tab = 'heroin' end
|
||||
if k == 'xtcburner' then tab = 'xtc' end
|
||||
if RemoveItem(src, k, 1) then
|
||||
table.insert(active, {
|
||||
src = src,
|
||||
item = k,
|
||||
location = getRandW(src),
|
||||
cid = Player.PlayerData.citizenid,
|
||||
type = v,
|
||||
price = Price[tab]
|
||||
})
|
||||
for m, d in pairs (active) do
|
||||
if d.cid == Player.PlayerData.citizenid then
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, active[m])
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterServerEvent('md-drugs:server:wholesalecoke', function()
|
||||
local src = source
|
||||
RegisterNetEvent('md-drugs:server:SuccessSale', function(data)
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
local price = math.random(Price['coke'].min, Price['coke'].max)
|
||||
for k, v in pairs(coke) do
|
||||
local item = Player.Functions.GetItemByName(v)
|
||||
|
||||
if item and item.amount > 0 then
|
||||
local removed = Player.Functions.RemoveItem(v, item.amount)
|
||||
Player.Functions.AddMoney("cash", item.amount * price)
|
||||
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
|
||||
Log(GetName(source) .. ' Wholesaled Drugs ', 'wholesale')
|
||||
for k, v in pairs (active) do
|
||||
if v.cid == Player.PlayerData.citizenid then
|
||||
local payout = math.random(v.price.min, v.price.max)
|
||||
for m, d in pairs (v.type) do
|
||||
local git = Player.Functions.GetItemByName(d)
|
||||
if git and git.amount >= 1 then
|
||||
RemoveItem(src, d, git.amount)
|
||||
Player.Functions.AddMoney('cash', git.amount * payout)
|
||||
end
|
||||
table.remove(active, k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateUseableItem("crackburner", function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(source)
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, 'crack', "Bring Me All The Crack You Have")
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:wholesalecrack', function()
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
local price = math.random(Price['crack'].min, Price['crack'].max)
|
||||
for k, v in pairs(crack) do
|
||||
local item = Player.Functions.GetItemByName(v)
|
||||
if item and item.amount > 0 then
|
||||
local removed = Player.Functions.RemoveItem(v, item.amount)
|
||||
Player.Functions.AddMoney("cash", item.amount * price)
|
||||
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
|
||||
Log(GetName(source) .. ' Wholesaled Drugs ', 'wholesale')
|
||||
end
|
||||
end
|
||||
end)
|
||||
----------------- lsd
|
||||
|
||||
QBCore.Functions.CreateUseableItem("lsdburner", function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(source)
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, 'lsd', "Bring Me All The lsd You Have")
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:wholesalelsd', function()
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
local price = math.random(Price['lsd'].min, Price['lsd'].max)
|
||||
|
||||
for k, v in pairs(lsd) do
|
||||
local item = Player.Functions.GetItemByName(v)
|
||||
|
||||
if item and item.amount > 0 then
|
||||
local removed = Player.Functions.RemoveItem(v, item.amount)
|
||||
Player.Functions.AddMoney("cash", item.amount * price)
|
||||
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
|
||||
Log(GetName(source) .. ' Wholesaled Drugs ', 'wholesale')
|
||||
end
|
||||
end
|
||||
end)
|
||||
----------------- heroin
|
||||
|
||||
QBCore.Functions.CreateUseableItem("heroinburner", function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(source)
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, 'heroin', "Bring Me All The Heroin You Have")
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:wholesaleheroin', function()
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
local price = math.random(Price['heroin'].min, Price['heroin'].max)
|
||||
for k, v in pairs(heroin) do
|
||||
local item = Player.Functions.GetItemByName(v)
|
||||
|
||||
if item and item.amount > 0 then
|
||||
local removed = Player.Functions.RemoveItem(v, item.amount)
|
||||
Player.Functions.AddMoney("cash", item.amount * price)
|
||||
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
|
||||
Log(GetName(source) .. ' Wholesaled Drugs ', 'wholesale')
|
||||
end
|
||||
end
|
||||
end)
|
||||
---- xtc
|
||||
QBCore.Functions.CreateUseableItem("xtcburner", function(source, item)
|
||||
local src = source
|
||||
local Player = getPlayer(source)
|
||||
TriggerClientEvent("md-drugs:client:GetLocation", src, 'xtc', "Bring Me All The xtc You Have")
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:wholesalextc', function()
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
local price = math.random(Price['xtc'].min, Price['xtc'].max)
|
||||
for k, v in pairs(xtc) do
|
||||
local item = Player.Functions.GetItemByName(v)
|
||||
|
||||
if item and item.amount > 0 then
|
||||
local removed = Player.Functions.RemoveItem(v, item.amount)
|
||||
Player.Functions.AddMoney("cash", item.amount * price)
|
||||
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
|
||||
Log(GetName(source) .. ' Wholesaled Drugs ', 'wholesale')
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterServerEvent('md-drugs:server:RemoveBurner', function(item)
|
||||
local src = source
|
||||
local Player = getPlayer(src)
|
||||
|
||||
if item == 'coke' then
|
||||
if Player.Functions.RemoveItem('cokeburner', 1) then
|
||||
else
|
||||
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
|
||||
end
|
||||
elseif item == 'crack' then
|
||||
if Player.Functions.RemoveItem('crackburner', 1) then
|
||||
else
|
||||
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
|
||||
end
|
||||
elseif item == 'heroin' then
|
||||
if Player.Functions.RemoveItem('heroinburner', 1) then
|
||||
else
|
||||
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
|
||||
end
|
||||
elseif item == 'lsd' then
|
||||
if Player.Functions.RemoveItem('lsdburner', 1) then
|
||||
else
|
||||
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
|
||||
end
|
||||
elseif item == 'xtc' then
|
||||
if Player.Functions.RemoveItem('xtcburner', 1) then
|
||||
else
|
||||
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ local check, loc = lib.callback.await('md-drugs:client:setpress', src, v.data)
|
||||
})
|
||||
end
|
||||
end
|
||||
print(json.encode(activePresses))
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user