fuckin christ

This commit is contained in:
Mustache Dom committed 2025-07-18 01:19:12 -07:00
1 parent 314f7381d1
commit daa1a4f8a3
12 files changed
+425 -384

No files matched your search

+6
View File
@@ -89,9 +89,15 @@ local Target = {
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 = ""},
},
SyrupVendor = {
{ped = 'a_m_m_farmer_01', loc = vector4(365.21, -578.77, 39.30, 347.23), l = 1.0, w = 1.0, rot = 347.23, gang = ""},
},
OxyPayForTruck = {
{loc = vector3(1437.64, -1491.91, 63.62), truckSpawn = vector4(1450.87, -1482.13, 63.22, 69.95), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
singleSpot = {
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
+35 -9
View File
@@ -1,6 +1,6 @@
local onRun = {}
local cool = {}
local function setTimeout(identifier)
if onRun[identifier] then
CreateThread(function()
@@ -10,6 +10,19 @@ local function setTimeout(identifier)
end
end
local function coolDown(identifier)
if cool[identifier] then
return false
else
cool[identifier] = true
CreateThread(function()
Wait(3500)
cool[identifier] = nil
end)
return true
end
end
RegisterServerEvent('md-drugs:server:givemethingridients', function()
local src = source
local amount = math.random(1,5)
@@ -38,17 +51,19 @@ end)
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
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.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")
end
end)
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')
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.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")
end
end)
@@ -56,6 +71,17 @@ 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)
end)
ps.registerCallback('md-drugs:server:registerMeth', function(source)
local identifier = ps.getIdentifier(source)
if not identifier then return false end
if onRun[identifier] then
return false
else
onRun[identifier] = 0
setTimeout(identifier)
return true
end
end)
+32 -23
View File
@@ -1,17 +1,17 @@
QBCore = exports['qb-core']:GetCoreObject()
local prices = {
payfortruck = 500,
hotchance = 30,
itemChance = 20,
}
ps.registerCallback('md-drugs:server:payfortruck', function()
local onRoute = {}
ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
local Player = getPlayer(src)
if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then
--Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
onRoute[src] = true
ps.notify(src, ps.lang('oxy.paid') .. prices.payfortruck, "success")
return true
else
ps.notify(src, Lang.oxy.broke, "error")
ps.notify(src, ps.lang('oxy.broke'), "error")
return false
end
end)
@@ -19,29 +19,38 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
local Player = getPlayer(src)
local chance = math.random(1,100)
local cash = 200
if not onRoute[src] then
ps.notify(src, ps.lang('oxy.notonroute'), "error")
return
end
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.oxylocations[onRoute[src]], 3.5) then
ps.notify(src, ps.lang('oxy.toofar'), "error")
return
end
local cash = math.random(50, 200)
local itemchance = math.random(1,100)
local itemList = {
{item = 'oxy', amount = 2},
{item = 'houselockpick', amount = 1},
}
local item = itemList[math.random(1, #itemList)]
if chance <= prices.hotchance then
ps.notify(src, Lang.oxy.hot, "error")
Player.Functions.AddMoney("cash", cash * 0.5)
if itemchance <= prices.itemChance then
AddItem(src, item.item, item.amount)
end
else
ps.notify(Lang.oxy.next, "success")
TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
Player.Functions.AddMoney("cash", cash)
if itemchance <= prices.itemChance then
AddItem(src, item.item, item.amount)
end
ps.addMoney(src,"cash", cash)
if itemchance <= prices.itemChance then
ps.addItem(src, item.item, item.amount)
end
end)
ps.registerCallback('md-drugs:server:getRoute', function(source)
if not onRoute[source] then return false end
local giveLocation = math.random(1, 10)
if giveLocation == 10 then
onRoute[source] = nil
return false
else
onRoute[source] = math.random(1, #GlobalState.MDDrugsLocs.oxylocations)
return GlobalState.MDDrugsLocs.oxylocations[onRoute[source]]
end
end)
+45 -53
View File
@@ -1,75 +1,67 @@
local QBCore = exports['qb-core']:GetCoreObject()
local function GetJob(source)
local function GetJob(source)
local src = source
local Player = getPlayer(src)
if Player.PlayerData.job.type == 'ems' then
return true
else
ps.notify(src, 'You Must Be EMS To Do This', 'error')
return false
end
return ps.getJobType(src) == 'ems'
end
CUI('prescription_pad', function(source, item)
ps.createUseable('prescription_pad', function(source, item)
local src = source
local near = {}
if GetJob(src) then
for k, v in pairs (QBCore.Functions.GetQBPlayers()) do
local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
local tname = GetName(v.PlayerData.source)
local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source)
local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
if dist < 5.0 then
table.insert(near, {label = tname, value = targ.PlayerData.citizenid})
end
end
local options = { {label = 'Vicodin', value = 'vicodin_prescription'}, {label = 'Adderal', value = 'adderal_prescription'}, {label = 'Morphine', value = 'morphine_prescription'},{label = 'Xanax', value = 'xanax_prescription'}}
if GetJob(src) then
local near = ps.getNearbyPlayers(src, 5.0)
local options = {
{label = 'Vicodin', value = 'vicodin_prescription'},
{label = 'Adderal', value = 'adderal_prescription'},
{label = 'Morphine', value = 'morphine_prescription'},
{label = 'Xanax', value = 'xanax_prescription'}
}
local data = ps.callback('md-drugs:client:prescriptionpad', src, near, options)
if type(data) == 'table' then
local give = QBCore.Functions.GetPlayerByCitizenId(data.who)
for i = 1, #options do
if data.what == options[i].value then
AddItem(give.PlayerData.source, data.what, 1)
end
end
end
if not data then return ps.notify(src, ps.lang('Pharma.cancel'), "error") end
ps.addItem(ps.getSource(data.who), data.what, 1)
end
end)
local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'}
for m, d in pairs (pharmabottle) do
CUI(d, function(source, item)
local src = source
local Player = getPlayer(src)
local check = ps.callback("md-drugs:client:unbottle", src)
if check then
local get = {
['vicodinbottle'] = 'vicodin',
['adderalbottle'] = 'adderal',
['morphinebottle'] = 'morphine',
['xanaxbottle'] = 'xanax'
}
for k, v in pairs (get) do
if d == k then
RemoveItem(src, d, 1)
AddItem(src, v, math.random(10,30))
ps.notify(src,Lang.Pharma.unbottle, "success")
--Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
ps.createUseable(d, function(source, item)
local src = source
local check = ps.callback("md-drugs:client:unbottle", src)
if check then
local get = {
['vicodinbottle'] = 'vicodin',
['adderalbottle'] = 'adderal',
['morphinebottle'] = 'morphine',
['xanaxbottle'] = 'xanax'
}
for k, v in pairs (get) do
if d == k then
ps.removeItem(src, d, 1)
ps.addItem(src, v, math.random(10,30))
ps.notify(src,ps.lang('Pharma.unbottle'), "success")
--Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
end
end
end
end
end)
end)
end
RegisterServerEvent('md-drugs:server:fillprescription', function()
RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source
local Player = getPlayer(src)
local pres = {vicodin_prescription = 'vicodinbottle', adderal_prescription = 'adderalbottle', morphine_prescription = 'morphinebottle', xanax_prescription = 'xanaxbottle'}
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.FillPrescription[num].loc, 3.5) then
return ps.notify(src, ps.lang('Pharma.toofar'), "error")
end
local pres = {
vicodin_prescription = 'vicodinbottle',
adderal_prescription = 'adderalbottle',
morphine_prescription = 'morphinebottle',
xanax_prescription = 'xanaxbottle'
}
for k, v in pairs (pres) do
if Player.Functions.GetItemByName(k) then
RemoveItem(src, k, 1 )
AddItem(src,v, 1)
if ps.hasItem(src, k, 1) then
ps.removeItem(src, k, 1)
ps.addItem(src, v, 1)
break
end
end