jesussssss
This commit is contained in:
1 parent
daa1a4f8a3
commit
3574ecef5b
32 files changed
+1639
-914
No files matched your search
+41
-4
@@ -1,6 +1,42 @@
|
||||
|
||||
local onRun = {}
|
||||
local cool = {}
|
||||
|
||||
local methLocs = {
|
||||
CookMeth = {
|
||||
{loc = vector3(1006.09, -3200.59, -38.52), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(4.79, 2.13, -0.41), rotation = vector3(0,0,0.0), gang = ""},
|
||||
},
|
||||
MethDials = {
|
||||
{loc = vector3(1007.89, -3201.17, -38.99),l = 1.0, w = 1.0, rot = 45.0, gang = ""},
|
||||
},
|
||||
MethSmash = {
|
||||
{loc = vector3(1012.04, -3194.96, -38.99), bucket = vector4(1012.86, -3194.13, -39.20, 90.00), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-3.143311, -1.666748, -1.010128), rotation = vector3(0,0,0.0), gang = ""},
|
||||
},
|
||||
BagMeth = {
|
||||
{loc = vector3(1014.25, -3194.93, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-4.9, -1.70, -1.01), rotation = vector3(0,0,0.0), gang = ""},
|
||||
},
|
||||
MethEph = { -- get ephedrine
|
||||
{loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
|
||||
},
|
||||
Methace = { -- get acetone
|
||||
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
|
||||
},
|
||||
MethHeist = {
|
||||
{loc = vector4(-1520.84, 827.72, 181.66, 184.13), ped = 'a_m_m_farmer_01', gang = ""},
|
||||
},
|
||||
StartLoc = { -- where truck spawns for lean and meth missions
|
||||
vector3(-2307.22, 434.77, 174.47),
|
||||
vector3(614.75, 1786.26, 199.39),
|
||||
vector3(-224.89, 6388.32, 31.59)
|
||||
},
|
||||
MethTele = {
|
||||
{inside = vector3(996.91, -3200.83, -36.39), outside = vector3(-2222.04, 303.99, 174.6), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
|
||||
}
|
||||
}
|
||||
|
||||
ps.registerCallback('md-drugs:server:GetMethLocs', function(source)
|
||||
return methLocs
|
||||
end)
|
||||
local function setTimeout(identifier)
|
||||
if onRun[identifier] then
|
||||
CreateThread(function()
|
||||
@@ -37,6 +73,7 @@ RegisterServerEvent('md-drugs:server:givemethingridients', function()
|
||||
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
|
||||
@@ -45,13 +82,13 @@ end)
|
||||
|
||||
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 ps.checkDistance(src, methLocs.BagMeth[num].loc, 2.5) then return end
|
||||
if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:geteph', function(num)
|
||||
local src = source
|
||||
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethEph[num].loc, 2.5) then return end
|
||||
if not ps.checkDistance(src, methLocs.MethEph[num].loc, 2.5) then return end
|
||||
if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
|
||||
if ps.addItem(src, 'ephedrine', 1) then
|
||||
ps.notify(src, 'Got Ephedrine!', "success")
|
||||
@@ -60,7 +97,7 @@ end)
|
||||
|
||||
RegisterServerEvent('md-drugs:server:getace', function(num)
|
||||
local src = source
|
||||
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethAce[num].loc, 2.5) then return end
|
||||
if not ps.checkDistance(src, methLocs.MethAce[num].loc, 2.5) then return end
|
||||
if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
|
||||
if ps.addItem(src, 'acetone', 1) then
|
||||
ps.notify(src, 'Got Acetone!', "success")
|
||||
@@ -69,7 +106,7 @@ 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
|
||||
if not ps.checkDistance(src, methLocs.CookMeth[num].loc, 2.5) then return false end
|
||||
local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
|
||||
return recipe
|
||||
end)
|
||||
|
||||
Reference in new issue
Block a user