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
+420 -379

No files matched your search

-221
View File
@@ -1,121 +1,5 @@
local started = nil local started = nil
function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
},
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
CreateThread(function()
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
end)
function BagCoke(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
{ hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
},
{
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
{ hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
}
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
function EcstasyEffect() function EcstasyEffect()
local startStamina = 50 local startStamina = 50
SetFlash(0, 0, 500, 20000, 500) SetFlash(0, 0, 500, 20000, 500)
@@ -204,111 +88,6 @@ function AlienEffect()
StopScreenEffect("DrugsMichaelAliensFightOut") StopScreenEffect("DrugsMichaelAliensFightOut")
end end
local hit = 0
function SpawnCarPedChase()
ps.debug("SpawnCarPedChase")
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
if started then
ps.notify(Lang.lean.act,'error')
else
started = true
ps.requestModel("pounder", Config.RequestModelTime)
ps.requestModel("ig_priest", Config.RequestModelTime)
ps.requestModel("cargobob3", Config.RequestModelTime)
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(pilot2, true)
SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leancar)
AddBlipForEntity(leancar)
SetPedIntoVehicle(driver, leancar, -1)
SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(driver, true)
repeat
Wait(1000)
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
RemoveBlip(leancar)
if GetEntityHealth(driver) == 0 then
ps.entityTarget(leancar, {
{
name = 'leancar',
icon = 'fa-solid fa-car',
label = Lang.targets.lean.st,
action = function()
hit = hit + 1
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givelean')
started = nil
if math.random(1,100) <= 30 or hit == 4 then
hit = 0
DeleteVehicle(leancar)
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end
}
})
else
DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
end
end
end
function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local config = ps.callback('md-drugs:server:getLocs', false)
local start = config.StartLoc[math.random(1,#config.StartLoc)]
local startedmeth = false
if startedmeth then
ps.notify(Lang.meth.act,'error')
else
startedmeth = true
ps.requestModel("journey", Config.RequestModelTime)
ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
ps.requestModel("cargobob3", Config.RequestModelTime)
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar)
AddBlipForEntity(methcar)
SetPedIntoVehicle(methdriver, methcar, -1)
SetPedFleeAttributes(methdriver,false)
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(methdriver, true)
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
if GetEntityHealth(methdriver) == 0 then
AddSingleModel(methcar,{
name = 'methcar',
icon = 'fa-solid fa-car',
label = Lang.targets.meth.stealfromcar,
action = function()
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = false
if math.random(1,100) <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end,
}, nil )
else
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end
end
function SetUpPeds() function SetUpPeds()
AddRelationshipGroup('setups') AddRelationshipGroup('setups')
local ped = GetEntityCoords(PlayerPedId()) local ped = GetEntityCoords(PlayerPedId())
+116
View File
@@ -2,6 +2,115 @@
local cuttingcoke = nil local cuttingcoke = nil
local baggingcoke = nil local baggingcoke = nil
local function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
},
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
local function BagCoke(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
{ hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
},
{
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
{ hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
}
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, { ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{ {
@@ -55,3 +164,10 @@ for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
} }
}) })
end end
CreateThread(function()
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
end)
+1 -1
View File
@@ -76,7 +76,7 @@ local function checkItems()
return true return true
end end
function Cornersell() local function Cornersell()
if inZone then sell = false return end if inZone then sell = false return end
if not sell then if not sell then
+3 -1
View File
@@ -2,11 +2,13 @@
local started = false local started = false
local hit = 0 local hit = 0
function SpawnCarPedChase() local function SpawnCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94) local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)] local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
if started then ps.notify(Lang.lean.act,'error') return end if started then ps.notify(Lang.lean.act,'error') return end
started = true started = true
ps.callback('md-drugs:server:RegisterLean') ps.callback('md-drugs:server:RegisterLean')
ps.requestModel("pounder", Config.RequestModelTime) ps.requestModel("pounder", Config.RequestModelTime)
ps.requestModel("ig_priest", Config.RequestModelTime) ps.requestModel("ig_priest", Config.RequestModelTime)
+80
View File
@@ -3,6 +3,86 @@ local tray = false
local heated = false local heated = false
local active = false local active = false
local trays = nil local trays = nil
--- meth heist
local startedmeth = false
local function SpawnMethCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
if startedmeth then
ps.notify(ps.lang('meth.act'),'error')
else
startedmeth = true
ps.callback('md-drugs:server:RegisterMeth')
ps.requestModel("journey", Config.RequestModelTime)
ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
ps.requestModel("cargobob3", Config.RequestModelTime)
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar)
AddBlipForEntity(methcar)
SetPedIntoVehicle(methdriver, methcar, -1)
SetPedFleeAttributes(methdriver,false)
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(methdriver, true)
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
if GetEntityHealth(methdriver) == 0 then
ps.entityTarget(methcar, {
{
name = 'methcar',
icon = 'fa-solid fa-car',
label = Lang.targets.meth.stealfromcar,
action = function()
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = false
if math.random(1,100) <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end,
}
})
else
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end
end
local peds = {}
for k, v in pairs (GlobalState.MDDrugsLocs.MethHeist) do
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
Freeze(peds[k], true, v.loc.w)
ps.entityTarget(peds[k], {
{
name = 'methheist'..k,
icon = 'fa-solid fa-user-secret',
label = ps.lang('targets.meth.heist'),
action = function()
if startedmeth then ps.notify(ps.lang('meth.act'),'error') return end
SpawnMethCarPedChase()
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
end
---- start animation shit ---- start animation shit
local function loadParticle(dict) local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then if not HasNamedPtfxAssetLoaded(dict) then
+82 -66
View File
@@ -1,74 +1,90 @@
local carryPackage = nil local carryPackage = nil
local onMission = false
RegisterNetEvent("md-drugs:client:GetOxyCar", function() local function getRoute()
lib.requestModel("burrito3", Config.RequestModelTime) local Route = ps.callback('md-drugs:server:getRoute')
local paid = ps.callback('md-drugs:server:payfortruck', false) if not Route then
if not paid then return end ps.notify(ps.lang('oxy.done'), "success")
local loca = ps.callback('md-drugs:server:getLocs', false) onMission = false
local loc = loca.singleSpot.truckspawn return false
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false) end
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
ps.notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute")
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
end)
RegisterNetEvent("md-drugs:client:getoxylocationroute", function() SetNewWaypoint(Route.x, Route.y)
local config = ps.callback('md-drugs:server:getLocs', false) ps.requestModel('g_m_y_famdnf_01', Config.RequestModelTime)
local loc = config.oxylocations[math.random(#config.oxylocations)] local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
if loc ~= nil then Freeze(oxybuyer, true, Route.w)
SetNewWaypoint(loc.x, loc.y) local timeOut = 300
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.RequestModelTime) repeat
local oxybuyer = CreatePed(0, current,loc.x,loc.y,loc.z-1, loc.w, false, false) Wait(1000)
Freeze(oxybuyer, true, loc.w) timeOut = timeOut - 1
repeat until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x,loc.y,loc.z)) < 5.0 PoliceCall(Config.PoliceAlertOxy)
PoliceCall(Config.PoliceAlertOxy) ps.entityTarget(oxybuyer,{
AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign", {
action = function() label = ps.lang('targets.oxy.talk'),
if carryPackage then icon = "fa-solid fa-dollar-sign",
if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end action = function()
TriggerServerEvent("md-drugs:server:giveoxybox") if carryPackage then
DeleteEntity(oxybuyer) if not ps.progressbar(ps.lang('oxy.hand'), 4000, 'uncuff') then return end
DetachEntity(carryPackage, true, true) TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteObject(carryPackage) DeleteEntity(oxybuyer)
carryPackage = nil DetachEntity(carryPackage, true, true)
else DeleteObject(carryPackage)
ps.notify(Lang.oxy.empty, "error") carryPackage = nil
getRoute()
else
ps.notify(ps.lang('oxy.empty'), "error")
end
end end
end}, oxybuyer) }
end })
end) end
for k, v in pairs(GlobalState.MDDrugsLocs.OxyPayForTruck) do
ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-truck-fast',
label = ps.lang('targets.oxy.buytruck'),
action = function()
ps.requestModel("burrito3", Config.RequestModelTime)
RegisterNetEvent("md-drugs:client:getfromtrunk", function() local paid = ps.callback('md-drugs:server:payfortruck', false)
if carryPackage then if not paid then return end
ps.notify(Lang.oxy.cantcarry, "error") local oxycar = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
else
local pos = GetEntityCoords(PlayerPedId(), true)
lib.requestAnimDict('anim@heists@box_carry@')
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
lib.RequestModel("hei_prop_drug_statue_box_big")
local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
carryPackage = object
end
end)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
ps.notify(ps.lang('oxy.truck'), 'success')
onMission = true
getRoute()
RegisterNetEvent("md-drugs:client:giveoxybox", function(data) ps.entityTarget(oxycar, {
if carryPackage then {
if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end icon = "fa-solid fa-box",
TriggerServerEvent("md-drugs:server:giveoxybox") label = ps.lang('targets.oxy.pack'),
DeleteEntity(data.ped) action = function()
DetachEntity(carryPackage, true, true) if carryPackage then
DeleteObject(carryPackage) ps.notify(ps.lang('oxy.cantcarry'), "error")
carryPackage = nil else
else local pos = GetEntityCoords(PlayerPedId(), true)
ps.notify(Lang.oxy.empty, "error") ps.requestAnim('anim@heists@box_carry@')
end TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
end) ps.requestModel("hei_prop_drug_statue_box_big")
carryPackage = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
end
end,
}
})
end,
canInteract = function()
if onMission then
return false
end
return true
end
}
})
end
+22 -7
View File
@@ -1,20 +1,35 @@
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op) ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
if ps.getJobType() ~= 'ems' then return end if ps.getJobType() ~= 'ems' then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{ local input = exports.ps_lib:input('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data}, {type = 'select', title = 'Player Name', options = data},
{type = 'select', label = 'Prescription', options = op}}) {type = 'select', title = 'Prescription', options = op}
})
if not input[1] then return end if not input[1] then return end
if not ps.progressbar(Lang.Pharma.write, 4000, 'notepad') then return end if not ps.progressbar(ps.lang('Pharma.write'), 4000, 'notepad') then return end
return {who = input[1], what = input[2]} return {who = input[1], what = input[2]}
end) end)
RegisterNetEvent("md-drugs:client:fillprescription", function(data) RegisterNetEvent("md-drugs:client:fillprescription", function(data)
if not ps.progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data) TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end) end)
ps.registerCallback("md-drugs:client:unbottle", function() ps.registerCallback("md-drugs:client:unbottle", function()
if not ps.progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end if not ps.progressbar(ps.lang('Pharma.open'), 4000, 'uncuff') then return end
return true return true
end) end)
for k, v in pairs (GlobalState.MDDrugsLocs.FillPrescription) do
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-capsules',
label = ps.lang('Pharma.fillprescription'),
action = function()
if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", k)
end
}
})
end
+6
View File
@@ -89,9 +89,15 @@ local Target = {
Methace = { -- get acetone Methace = { -- get acetone
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {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 = { 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 = ""}, {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 = { singleSpot = {
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke 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 CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
+33 -7
View File
@@ -1,6 +1,6 @@
local onRun = {} local onRun = {}
local cool = {}
local function setTimeout(identifier) local function setTimeout(identifier)
if onRun[identifier] then if onRun[identifier] then
CreateThread(function() CreateThread(function()
@@ -10,6 +10,19 @@ local function setTimeout(identifier)
end end
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() RegisterServerEvent('md-drugs:server:givemethingridients', function()
local src = source local src = source
local amount = math.random(1,5) local amount = math.random(1,5)
@@ -38,17 +51,19 @@ end)
RegisterServerEvent('md-drugs:server:geteph', function(num) RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source local src = source
if not checkLoc(src, 'MethEph', num) then return end if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethEph[num].loc, 2.5) then return end
if AddItem(src, 'ephedrine', 1) then 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") ps.notify(src, 'Got Ephedrine!', "success")
end end
end) end)
RegisterServerEvent('md-drugs:server:getace', function(num) RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source local src = source
if not checkLoc(src, 'Methace', num) then return end if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethAce[num].loc, 2.5) then return end
if AddItem(src, 'acetone', 1) then if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
--Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth') if ps.addItem(src, 'acetone', 1) then
ps.notify(src, 'Got Acetone!', "success")
end end
end) end)
@@ -56,6 +71,17 @@ ps.registerCallback('md-drugs:server:startcook', function(source, num)
local src = source local src = source
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end
local recipe = GetRecipe(src, 'meth', 'cook', 'heat') local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
ps.debug(recipe)
return 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 = { local prices = {
payfortruck = 500, payfortruck = 500,
hotchance = 30, hotchance = 30,
itemChance = 20, itemChance = 20,
} }
ps.registerCallback('md-drugs:server:payfortruck', function() local onRoute = {}
ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source local src = source
local Player = getPlayer(src) if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then onRoute[src] = true
--Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy') ps.notify(src, ps.lang('oxy.paid') .. prices.payfortruck, "success")
return true return true
else else
ps.notify(src, Lang.oxy.broke, "error") ps.notify(src, ps.lang('oxy.broke'), "error")
return false return false
end end
end) end)
@@ -19,29 +19,38 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function() RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source local src = source
local Player = getPlayer(src) if not onRoute[src] then
local chance = math.random(1,100) ps.notify(src, ps.lang('oxy.notonroute'), "error")
local cash = 200 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 itemchance = math.random(1,100)
local itemList = { local itemList = {
{item = 'oxy', amount = 2}, {item = 'oxy', amount = 2},
{item = 'houselockpick', amount = 1}, {item = 'houselockpick', amount = 1},
} }
local item = itemList[math.random(1, #itemList)] local item = itemList[math.random(1, #itemList)]
if chance <= prices.hotchance then ps.addMoney(src,"cash", cash)
ps.notify(src, Lang.oxy.hot, "error") if itemchance <= prices.itemChance then
Player.Functions.AddMoney("cash", cash * 0.5) ps.addItem(src, item.item, item.amount)
if itemchance <= prices.itemChance then end
AddItem(src, item.item, item.amount) end)
end
else ps.registerCallback('md-drugs:server:getRoute', function(source)
ps.notify(Lang.oxy.next, "success") if not onRoute[source] then return false end
TriggerClientEvent("md-drugs:client:getoxylocationroute", src) local giveLocation = math.random(1, 10)
Player.Functions.AddMoney("cash", cash) if giveLocation == 10 then
if itemchance <= prices.itemChance then onRoute[source] = nil
AddItem(src, item.item, item.amount) return false
end else
onRoute[source] = math.random(1, #GlobalState.MDDrugsLocs.oxylocations)
return GlobalState.MDDrugsLocs.oxylocations[onRoute[source]]
end end
end) end)
+43 -51
View File
@@ -2,74 +2,66 @@ local QBCore = exports['qb-core']:GetCoreObject()
local function GetJob(source) local function GetJob(source)
local src = source local src = source
local Player = getPlayer(src) return ps.getJobType(src) == 'ems'
if Player.PlayerData.job.type == 'ems' then
return true
else
ps.notify(src, 'You Must Be EMS To Do This', 'error')
return false
end
end end
CUI('prescription_pad', function(source, item) ps.createUseable('prescription_pad', function(source, item)
local src = source local src = source
local near = {} local near = {}
if GetJob(src) then if GetJob(src) then
for k, v in pairs (QBCore.Functions.GetQBPlayers()) do local near = ps.getNearbyPlayers(src, 5.0)
local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
local tname = GetName(v.PlayerData.source) local options = {
local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source) {label = 'Vicodin', value = 'vicodin_prescription'},
local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped)) {label = 'Adderal', value = 'adderal_prescription'},
if dist < 5.0 then {label = 'Morphine', value = 'morphine_prescription'},
table.insert(near, {label = tname, value = targ.PlayerData.citizenid}) {label = 'Xanax', value = 'xanax_prescription'}
end }
end
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) local data = ps.callback('md-drugs:client:prescriptionpad', src, near, options)
if type(data) == 'table' then if not data then return ps.notify(src, ps.lang('Pharma.cancel'), "error") end
local give = QBCore.Functions.GetPlayerByCitizenId(data.who) ps.addItem(ps.getSource(data.who), data.what, 1)
for i = 1, #options do
if data.what == options[i].value then
AddItem(give.PlayerData.source, data.what, 1)
end
end
end
end end
end) end)
local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'} local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'}
for m, d in pairs (pharmabottle) do for m, d in pairs (pharmabottle) do
CUI(d, function(source, item) ps.createUseable(d, function(source, item)
local src = source local src = source
local Player = getPlayer(src) local check = ps.callback("md-drugs:client:unbottle", src)
local check = ps.callback("md-drugs:client:unbottle", src) if check then
if check then local get = {
local get = { ['vicodinbottle'] = 'vicodin',
['vicodinbottle'] = 'vicodin', ['adderalbottle'] = 'adderal',
['adderalbottle'] = 'adderal', ['morphinebottle'] = 'morphine',
['morphinebottle'] = 'morphine', ['xanaxbottle'] = 'xanax'
['xanaxbottle'] = 'xanax' }
} for k, v in pairs (get) do
for k, v in pairs (get) do if d == k then
if d == k then ps.removeItem(src, d, 1)
RemoveItem(src, d, 1) ps.addItem(src, v, math.random(10,30))
AddItem(src, v, math.random(10,30)) ps.notify(src,ps.lang('Pharma.unbottle'), "success")
ps.notify(src,Lang.Pharma.unbottle, "success") --Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
--Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma') end
end end
end end
end end)
end)
end end
RegisterServerEvent('md-drugs:server:fillprescription', function() RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source local src = source
local Player = getPlayer(src) if not ps.checkDistance(src, GlobalState.MDDrugsLocs.FillPrescription[num].loc, 3.5) then
local pres = {vicodin_prescription = 'vicodinbottle', adderal_prescription = 'adderalbottle', morphine_prescription = 'morphinebottle', xanax_prescription = 'xanaxbottle'} 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 for k, v in pairs (pres) do
if Player.Functions.GetItemByName(k) then if ps.hasItem(src, k, 1) then
RemoveItem(src, k, 1 ) ps.removeItem(src, k, 1)
AddItem(src,v, 1) ps.addItem(src, v, 1)
break break
end end
end end
+2 -2
View File
@@ -61,8 +61,8 @@ Config.Drugs = {
lsd = true, lsd = true,
mescaline = true, mescaline = true,
meth = true, meth = true,
oxyruns = false, oxyruns = true,
pharma = false, pharma = true,
shrooms = true, shrooms = true,
weed = true, weed = true,
wholesale = false, wholesale = false,