made makeMenu function, moved all stores from config to server/travellingmerchant.lua

This commit is contained in:
Mustache Dom committed 2024-10-24 19:45:39 -07:00
1 parent e9f722a140
commit dbed6b3c47
15 files changed
+239 -316

No files matched your search

+12 -12
View File
@@ -1,14 +1,14 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:startcook', function()
local src = source
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()
local src = source
local src = source
local chance = math.random(1,100)
local amount = math.random(1,5)
if chance <= 50 then
@@ -30,18 +30,18 @@ end)
RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source
if CheckDist(src, Config.MethEph[num]['loc']) then return end
if AddItem(src, 'ephedrine', 1) then
Notifys(src, 'Got Ephedrine!', "success")
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Ephedrine', 'Meth')
end
if CheckDist(src, Config.MethEph[num]['loc']) then return end
if AddItem(src, 'ephedrine', 1) then
Notifys(src, 'Got Ephedrine!', "success")
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Ephedrine', 'Meth')
end
end)
RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source
if CheckDist(src, Config.Methace[num]['loc']) then return end
if AddItem(src, 'acetone', 1) then
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
Notifys(src, 'Got Acetone!', "success")
end
if CheckDist(src, Config.Methace[num]['loc']) then return end
if AddItem(src, 'acetone', 1) then
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
Notifys(src, 'Got Acetone!', "success")
end
end)