- holy fuck a lot
This commit is contained in:
1 parent
94c6458037
commit
2fd900ec22
33 files changed
+680
-910
No files matched your search
+37
-19
@@ -1,28 +1,38 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
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")
|
||||
end)
|
||||
local onRun = {}
|
||||
|
||||
local function setTimeout(identifier)
|
||||
if onRun[identifier] then
|
||||
CreateThread(function()
|
||||
Wait(10 * 60 * 1000)
|
||||
onRun[identifier] = nil
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterServerEvent('md-drugs:server:givemethingridients', function()
|
||||
local src = source
|
||||
local chance = math.random(1,100)
|
||||
local src = source
|
||||
local amount = math.random(1,5)
|
||||
if chance <= 50 then
|
||||
if AddItem(src,'ephedrine', amount) then
|
||||
Log(GetName(src) .. ' Got ' .. amount .. ' Of Ephedrine', 'Meth')
|
||||
end
|
||||
if not onRun[ps.getIdentifier(src)] then return ps.notify(src, Lang.lean.err, "error") end
|
||||
onRun[ps.getIdentifier(src)] = onRun[ps.getIdentifier(src)] + 1
|
||||
if math.random(1,100) <= 50 then
|
||||
ps.addItem(src, "ephedrine", amount)
|
||||
else
|
||||
if AddItem(src, 'acetone', amount) then
|
||||
Log(GetName(src) .. ' Got ' .. amount .. ' Of Acetone', 'Meth')
|
||||
end
|
||||
end
|
||||
ps.addItem(src, "acetone", amount)
|
||||
end
|
||||
if onRun[ps.getIdentifier(src)] >= 4 then
|
||||
onRun[ps.getIdentifier(src)] = nil
|
||||
end
|
||||
end)
|
||||
RegisterServerEvent('md-drugs:server:startcook', function(num)
|
||||
local src = source
|
||||
if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
|
||||
ps.notify(src, "Adding Things To The Mix", "success")
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:getmeth', function()
|
||||
RegisterServerEvent('md-drugs:server:getmeth', function(num)
|
||||
local src = source
|
||||
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BagMeth[num].loc, 2.5) then return end
|
||||
if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
|
||||
end)
|
||||
|
||||
@@ -30,7 +40,7 @@ RegisterServerEvent('md-drugs:server:geteph', function(num)
|
||||
local src = source
|
||||
if not checkLoc(src, 'MethEph', num) then return end
|
||||
if AddItem(src, 'ephedrine', 1) then
|
||||
Notifys(src, 'Got Ephedrine!', "success")
|
||||
ps.notify(src, 'Got Ephedrine!', "success")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -38,6 +48,14 @@ RegisterServerEvent('md-drugs:server:getace', function(num)
|
||||
local src = source
|
||||
if not checkLoc(src, 'Methace', num) then return end
|
||||
if AddItem(src, 'acetone', 1) then
|
||||
Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
|
||||
--Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
|
||||
end
|
||||
end)
|
||||
|
||||
ps.registerCallback('md-drugs:server:startcook', function(source, num)
|
||||
local src = source
|
||||
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end
|
||||
local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
|
||||
ps.debug(recipe)
|
||||
return recipe
|
||||
end)
|
||||
Reference in new issue
Block a user