removed core export: fixed bugs

This commit is contained in:
Mustache Dom committed 2024-12-12 15:26:48 -08:00
1 parent a07118d0cb
commit 3043ecd924
24 files changed
+39 -41

No files matched your search

-2
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local started = nil local started = nil
local function loadParticle(dict) local function loadParticle(dict)
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {} local CocaPlant = {}
local cuttingcoke = nil local cuttingcoke = nil
local baggingcoke = nil local baggingcoke = nil
-2
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item) RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
TriggerServerEvent('md-drugs:server:removeconsum', item) TriggerServerEvent('md-drugs:server:removeconsum', item)
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local sell = false local sell = false
local sold = false local sold = false
local targbusy = false local targbusy = false
-2
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:makecrackone", function(data) RegisterNetEvent("md-drugs:client:makecrackone", function(data)
if not ItemCheck('bakingsoda') then return end if not ItemCheck('bakingsoda') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local isActive = false local isActive = false
local dealer = {} local dealer = {}
+23 -6
View File
@@ -258,12 +258,21 @@ end
function ItemCheck(item) function ItemCheck(item)
if GetResourceState('ox_inventory') == 'started' then if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
else else
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
end
end end
function hasItem(item)
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false end
else
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(item) then return true else return false end
end
end end
function ItemCheckMulti(item) function ItemCheckMulti(item)
@@ -663,4 +672,12 @@ RegisterCommand('DrugRep', function()
} }
}) })
lib.showContext('DrugRep') lib.showContext('DrugRep')
end, false) end, false)
function getJobType()
return QBCore.Functions.GetPlayerData().job.type
end
function getJobName()
return QBCore.Functions.GetPlayerData().job.name
end
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local PoppyPlants = {} local PoppyPlants = {}
local herointable = false local herointable = false
-2
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function() RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
Notify(Lang.Lean.marked, "success") Notify(Lang.Lean.marked, "success")
SpawnCarPedChase() SpawnCarPedChase()
+1 -2
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local tableout = false local tableout = false
local function createLabKit(coord, head) local function createLabKit(coord, head)
@@ -101,7 +100,7 @@ RegisterNetEvent("md-drugs:client:buytabs", function(data)
end) end)
RegisterNetEvent("md-drugs:client:buylabkit", function() RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end if hasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlabkit") TriggerServerEvent("md-drugs:server:getlabkit")
end) end)
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local Mescaline = {} local Mescaline = {}
local function pick(loc) local function pick(loc)
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local amonia = nil local amonia = nil
local tray = nil local tray = nil
local heated = nil local heated = nil
+1 -2
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local carryPackage = nil local carryPackage = nil
RegisterNetEvent("md-drugs:client:GetOxyCar", function() RegisterNetEvent("md-drugs:client:GetOxyCar", function()
@@ -9,7 +8,7 @@ RegisterNetEvent("md-drugs:client:GetOxyCar", function()
local loc = loca.singleSpot.truckspawn local loc = loca.singleSpot.truckspawn
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false) local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0) exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar)) TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
Notify(Lang.oxy.truck, 'success') Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute") TriggerEvent("md-drugs:client:getoxylocationroute")
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil ) AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
+1 -1
View File
@@ -1,4 +1,4 @@
local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function() CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false) local config = lib.callback.await('md-drugs:server:getLocs', false)
local num = lib.callback.await('md-drugs:server:GetMerchant', false) local num = lib.callback.await('md-drugs:server:GetMerchant', false)
+1 -2
View File
@@ -1,7 +1,6 @@
local QBCore = exports['qb-core']:GetCoreObject()
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op) lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
if not QBCore.Functions.GetPlayerData().job.type == 'ems' then return end if getJobType() ~= 'ems' then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{ local input = lib.inputDialog('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data}, {type = 'select', label = 'Player Name', options = data},
{type = 'select', label = 'Prescription', options = op}}) {type = 'select', label = 'Prescription', options = op}})
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local shrooms = {} local shrooms = {}
local function LoadModels(hash) local function LoadModels(hash)
-2
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local icon = "fa solid fa-eye"
CreateThread(function() CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false) local config = lib.callback.await('md-drugs:server:getLocs', false)
+1 -2
View File
@@ -1,10 +1,9 @@
local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {} local WeedPlant = {}
local exploded, drying = false, false local exploded, drying = false, false
local function hasJob() local function hasJob()
if Config.Joblock then if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then if getJobName() == Config.weedjob then
return true else return false end return true else return false end
else else
return true end return true end
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local miss = false local miss = false
RegisterNetEvent("md-drugs:client:GetLocation", function(drug) RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
-1
View File
@@ -1,4 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local xtcpress = false local xtcpress = false
RegisterNetEvent("md-drugs:client:setpress", function(type) RegisterNetEvent("md-drugs:client:setpress", function(type)
+2 -1
View File
@@ -48,6 +48,7 @@ local src = source
end) end)
RegisterServerEvent("heroin:pickupCane", function(loc) RegisterServerEvent("heroin:pickupCane", function(loc)
if CheckDist(source, h[loc].location) then return end
if not h[loc].taken then if not h[loc].taken then
h[loc].taken = true h[loc].taken = true
GlobalState.PoppyPlants = h GlobalState.PoppyPlants = h
@@ -103,7 +104,7 @@ RegisterServerEvent('md-drugs:server:getheroinlabkit', function()
local Player = getPlayer(src) local Player = getPlayer(src)
if not checkLoc(source, 'singleSpot', 'buyheroinlabkit') then return end if not checkLoc(source, 'singleSpot', 'buyheroinlabkit') then return end
local has = Player.Functions.GetItemByName('heroinlabkit') local has = Player.Functions.GetItemByName('heroinlabkit')
if has then Notifys(src, 'You Already Have A Heroin Lab Kit', 'error') return end if has then Notifys(src, Lang.Heroin.haskit, 'error') return end
if Player.Functions.RemoveMoney('cash', prices.heroinlabkitprice) then if Player.Functions.RemoveMoney('cash', prices.heroinlabkitprice) then
AddItem(src, 'heroinlabkit', 1) AddItem(src, 'heroinlabkit', 1)
else else
+2 -2
View File
@@ -54,13 +54,13 @@ function WeedCooldown(loc)
end end
RegisterNetEvent("weed:pickupCane", function(loc) RegisterNetEvent("weed:pickupCane", function(loc)
local src = source if CheckDist(source, weedPlant[loc].location) then return end
if not weedPlant[loc].taken then if not weedPlant[loc].taken then
weedPlant[loc].taken = true weedPlant[loc].taken = true
GlobalState.WeedPlant = weedPlant GlobalState.WeedPlant = weedPlant
TriggerClientEvent("weed:removeCane", -1, loc) TriggerClientEvent("weed:removeCane", -1, loc)
WeedCooldown(loc) WeedCooldown(loc)
AddItem(src, 'wetcannabis', 1) AddItem(source, 'wetcannabis', 1)
Log(GetName(source) .. ' Picked Weed With a distance of ' .. dist(source, weedPlant[loc].location) .. ' vectors', 'weed') Log(GetName(source) .. ' Picked Weed With a distance of ' .. dist(source, weedPlant[loc].location) .. ' vectors', 'weed')
end end
end) end)
+2 -2
View File
@@ -19,10 +19,10 @@ for k, v in pairs (burners) do
QBCore.Functions.CreateUseableItem(k, function(source, item) QBCore.Functions.CreateUseableItem(k, function(source, item)
local src = source local src = source
local Player = getPlayer(src) local Player = getPlayer(src)
if getCops() < Config.PoliceCount then return Notifys(src, 'Nobody Answered, Try Again Later', 'error') end if getCops() < Config.PoliceCount then return Notifys(src, Lang.Wholesale.na, 'error') end
for m, d in pairs (active) do for m, d in pairs (active) do
if d.cid == Player.PlayerData.citizenid then if d.cid == Player.PlayerData.citizenid then
return Notifys(src, 'You Already Have A Delivery To Make', 'error' ) return Notifys(src, Lang.Wholesale.al, 'error' )
end end
end end
local tab = '' local tab = ''
+5 -2
View File
@@ -173,7 +173,8 @@ Lang.Heroin = {
novial = "How Can You Make Heroin Vials Without Heroin Idiot", novial = "How Can You Make Heroin Vials Without Heroin Idiot",
fail = 'You Over Heated Them Idiot', fail = 'You Over Heated Them Idiot',
fill = 'Filled The Syringe', fill = 'Filled The Syringe',
nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin' nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin',
haskit = 'You Already Have A Heroin Lab Kit'
} }
Lang.Lean = { Lang.Lean = {
marked = ' Car Has Been Marked On Your Map', marked = ' Car Has Been Marked On Your Map',
@@ -289,5 +290,7 @@ Lang.xtc = {
} }
Lang.Wholesale = { Lang.Wholesale = {
al = 'Already Called Someone!' al = 'You Already Have A Delivery To Make',
na = 'No One Answered, Try Again Later',
} }