diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua deleted file mode 100644 index 1ac344b..0000000 --- a/client/animationsandfunctions.lua +++ /dev/null @@ -1,681 +0,0 @@ ----@diagnostic disable: param-type-mismatch -local QBCore = exports['qb-core']:GetCoreObject() -local started = nil - -local function loadParticle(dict) - if not HasNamedPtfxAssetLoaded(dict) then - RequestNamedPtfxAsset(dict) - end - while not HasNamedPtfxAssetLoaded(dict) do - Wait(0) - end - SetPtfxAssetNextCall(dict) -end - -function MethCooking() -local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" -lib.requestAnimDict(animDict, 500) -dict = "scr_fbi5a" -local ped = PlayerPedId() -SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524)) -Wait(1) - -local targetPosition = GetEntityCoords(ped) -local animDuration = GetAnimDuration(animDict, animName) * 800 -FreezeEntityPosition(ped, true) -local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0) -local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) -NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) -local sacid = CreateObjectNoOffset(`bkr_prop_meth_sacid`, targetPosition, 1, 1, 0) -NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1) -local ammonia = CreateObjectNoOffset(`bkr_prop_meth_ammonia`, targetPosition, 1, 1, 0) -NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1) -NetworkStartSynchronisedScene(netScene) -Wait(animDuration) -NetworkStopSynchronisedScene(netScene) -DeleteObject(sacid) -DeleteObject(ammonia) -FreezeEntityPosition(ped, false) -loadParticle(dict) -methflare = StartParticleFxLoopedAtCoord('scr_fbi5a_flare',vector3(1005.95, -3202.09, -37.58), 0, 0, 0, 2.0, 0, 0,0) -SetParticleFxLoopedAlpha(methflare, 1.0) -Wait(20000) -StopParticleFxLooped(methflare,true) -end - - -function SmashMeth() -local ver = "" -local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02" -lib.requestAnimDict(animDict, 500) -local ped = PlayerPedId() -local targetPosition = vector3(1012.628, -3194.619, -39.589) -SetEntityCoords(ped, targetPosition) -Wait(1) -local animDuration = GetAnimDuration(animDict, animName) * 800 -FreezeEntityPosition(ped, true) -local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08) -local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) -NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) -local objects, sceneObjects = {}, { - { - hash = `w_me_hammer`, - animName = "break_weigh_"..ver.."hammer" - }, - { - hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, - animName = "break_weigh_"..ver.."tray01" - }, - { - hash = `bkr_Prop_Meth_Tray_02a`, - animName = "break_weigh_"..ver.."tray01^1" - }, - { - hash = `bkr_Prop_Meth_Tray_02a`, - animName = "break_weigh_"..ver.."tray01^2" - }, - { - hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, - animName = "break_weigh_"..ver.."tray01^3" - }, -} -for i=1, #sceneObjects, 1 do - local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true) - NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1) - objects[#objects+1] = obj -end -NetworkStartSynchronisedScene(netScene) -Wait(animDuration) -NetworkStopSynchronisedScene(netScene) -for i=1, #objects, 1 do - DeleteObject(objects[i]) -end -RemoveAnimDict(animDict) -FreezeEntityPosition(ped, false) -end - -function BagMeth() -local ver = "" - local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" - lib.requestAnimDict(animDict, 500) - local animDuration = GetAnimDuration(animDict, animName) * 1000 - local ped = PlayerPedId() - local coords = GetEntityCoords(ped) - local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08) - local scenes = { - { - { - hash = `bkr_prop_meth_bigbag_04a`, - animName = "break_weigh_"..ver.."box01" - }, - { - hash = `bkr_prop_meth_bigbag_03a`, - animName = "break_weigh_"..ver.."box01^1" - }, - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01" - } - }, - { - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^1" - }, - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^2" - }, - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^3" - } - }, - { - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^4" - }, - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^5" - }, - { - hash = `bkr_prop_meth_openbag_02`, - animName = "break_weigh_"..ver.."methbag01^6" - } - }, - { - { - hash = `bkr_prop_meth_scoop_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" - }, - { - hash = `bkr_Prop_Meth_Tray_02a`, - animName = "break_weigh_"..ver.."tray01^5" - } - } -} -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) --- Citizen.Wait(45000) -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 Tray() -local pos = GetEntityCoords(PlayerPedId(), true) -RequestAnimDict('anim@heists@box_carry@') -while (not HasAnimDictLoaded('anim@heists@box_carry@')) do -Wait(7) -end -TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) -RequestModel("bkr_prop_meth_tray_02a") -while not HasModelLoaded("bkr_prop_meth_tray_02a") do -Wait(0) -end -local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) -AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) -end - - - -function CutCoke() - local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter" - lib.requestAnimDict(animDict, 500) - local animDuration = GetAnimDuration(animDict, animName) * 1000 - local ped = PlayerPedId() - local coords = GetEntityCoords(ped) - local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00) - 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() -local ver = "" - local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" - lib.requestAnimDict(animDict, 500) - local animDuration = GetAnimDuration(animDict, animName) * 1000 - local ped = PlayerPedId() - local coords = GetEntityCoords(ped) - local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08) - 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) --- Citizen.Wait(45000) -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() - local startStamina = 30 - SetFlash(0, 0, 500, 7000, 500) - while startStamina > 0 do - Wait(1000) - startStamina = startStamina - 1 - RestorePlayerStamina(PlayerId(), 1.0) - if math.random(1, 100) < 51 then - SetFlash(0, 0, 500, 7000, 500) - ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08) - end - end - if IsPedRunning(PlayerPedId()) then - SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) - end - - startStamina = 0 -end - - -function MethBagEffect() - local startStamina = 8 - TrevorEffect() - SetRunSprintMultiplierForPlayer(PlayerId(), 1.49) - while startStamina > 0 do - Wait(1000) - if math.random(5, 100) < 10 then - RestorePlayerStamina(PlayerId(), 1.0) - end - startStamina = startStamina - 1 - if math.random(5, 100) < 51 then - TrevorEffect() - end - end - startStamina = 0 - SetRunSprintMultiplierForPlayer(PlayerId(), 1.0) -end - -function TrevorEffect() - StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0) - Wait(3000) - StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0) - Wait(3000) - StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0) - StopScreenEffect("DrugsTrevorClownsFight") - StopScreenEffect("DrugsTrevorClownsFightIn") - StopScreenEffect("DrugsTrevorClownsFightOut") -end - - -function CokeBaggyEffect() - local startStamina = 20 - local ped = PlayerPedId() - AlienEffect() - SetRunSprintMultiplierForPlayer(PlayerId(), 1.1) - while startStamina > 0 do - Wait(1000) - if math.random(1, 100) < 20 then - RestorePlayerStamina(PlayerId(), 1.0) - end - startStamina = startStamina - 1 - if math.random(1, 100) < 10 and IsPedRunning(ped) then - SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) - end - if math.random(1, 300) < 10 then - AlienEffect() - Wait(math.random(3000, 6000)) - end - end - if IsPedRunning(ped) then - SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) - end - - startStamina = 0 - SetRunSprintMultiplierForPlayer(PlayerId(), 1.0) -end - -function AlienEffect() - StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0) - Wait(math.random(5000, 8000)) - StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0) - Wait(math.random(5000, 8000)) - StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0) - StopScreenEffect("DrugsMichaelAliensFightIn") - StopScreenEffect("DrugsMichaelAliensFight") - StopScreenEffect("DrugsMichaelAliensFightOut") -end - -function SpawnCarPedChase() -local ped = GetEntityCoords(PlayerPedId()) -local stoploc = vector3(-1157.63, -3056.71, 13.94) -local start = Config.StartLoc[math.random(1,#Config.StartLoc)] -local search = false -local spawnedCar = {} -if started then -else - started = true - lib.requestModel(`pounder`, 500) - lib.requestModel("ig_priest", 500) - lib.requestModel(`cargobob3`, 500) - leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true) - driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false) - pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, 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) - exports['qb-target']:AddTargetEntity(leancar, { - options = { - { - name = 'leancar', - icon = 'fa-solid fa-car', - label = 'Steal From Car', - action = function() - local chance = math.random(1,100) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent('md-drugs:server:givelean') - started = nil - else - started = nil - end - end, 5, 8) - if chance <= 30 then - DeleteVehicle(leancar) - DeleteEntity(driver) - DeleteEntity(pilot2) - end - end, - canInteract = function() - if IsEntityDead(driver) then - return true end - end, - } - } - }) - Wait(1000) - search = true - CreateThread(function() - - while search do - Wait(5000) - if IsEntityDead(driver) == false then - loc = #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) - if loc < 25.0 then - Wait( 3 * 1000) - search = false - started = nil - heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true) - Wait(1000) - if DoesEntityExist(heli) then - SetEntityInvincible(pilot2, false) - DeleteVehicle(leancar) - DeleteEntity(driver) - SetEntityAsMissionEntity(heli) - SetPedIntoVehicle(pilot2, heli, -1) - TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0) - else - heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true) - end - end - else - started = nil - end - end - end) -end -end - -function SpawnMethCarPedChase() -local ped = GetEntityCoords(PlayerPedId()) -local stoploc = vector3(-1157.63, -3056.71, 13.94) -local start = Config.StartLoc[math.random(1,#Config.StartLoc)] -local searchmeth = false - -if startedmeth then -else - startedmeth = true - lib.requestModel(`journey`, 500) - lib.requestModel("a_m_m_hillbilly_02", 500) - lib.requestModel(`cargobob3`, 500) - methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true) - methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, true, false) - methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, 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) - exports['qb-target']:AddTargetEntity(methcar, { - options = { - { - name = 'methcar', - icon = 'fa-solid fa-car', - label = 'Steal From Car', - action = function() - local chance = math.random(1,100) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent('md-drugs:server:givemethingridients') - startedmeth = nil - else - startedmeth = nil - end - end, 5, 8) - print(chance) - if chance <= 30 then - DeleteVehicle(methcar) - DeleteEntity(methdriver) - DeleteEntity(methpilot) - end - end, - canInteract = function() - if IsEntityDead(methdriver) then - return true end - end, - } - } - }) - Wait(1000) - searchmeth = true - CreateThread(function() - - while searchmeth do - Wait(1000) - local pickuploc = GetEntityCoords(methcar) - if IsEntityDead(methdriver) == false then - loc = #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) - if loc < 25.0 then - Wait( 3 * 1000) - startedmeth = nil - methheli = CreateVehicle(`cargobob3`, pickuploc.x, pickuploc.y, pickuploc.z+4, 80, true,true) - Wait(10) - if DoesEntityExist(methheli) then - SetEntityInvincible(methpilot, false) - CreatePickUpRopeForCargobob(methheli, 1) - AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0) - DeleteEntity(methdriver) - SetEntityAsMissionEntity(methheli) - SetPedIntoVehicle(methpilot, methheli, -1) - TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0) - searchmeth = false - else - methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true) - end - end - else - startedmeth = nil - end - - end - end) -end -end - -function SetUpPeds() -local ped = GetEntityCoords(PlayerPedId()) -local CokePed = CreatePed(0, "g_m_y_famdnf_01", ped.x+3, ped.y-5, ped.z-1, 90.0, true, true) -local CokePed2 = CreatePed(0,"g_m_y_famdnf_01", ped.x+6, ped.y-10, ped.z-1, 90.0, true, true) -local CokePed3 = CreatePed(0,"g_m_y_famdnf_01", ped.x+-2, ped.y+5, ped.z-1, 90.0, true, true) -local CokePed4 = CreatePed(0,"g_m_y_famdnf_01", ped.x+8, ped.y-12, ped.z-1, 90.0, true, true) -local CokePed5 = CreatePed(0,"g_m_y_famdnf_01", ped.x+5, ped.y-2, ped.z-1, 90.0, true, true) -local CokePed6 = CreatePed(0,"g_m_y_famdnf_01", ped.x+2, ped.y-20, ped.z-1, 90.0, true, true) -local CokePed7 = CreatePed(0,"g_m_y_famdnf_01", ped.x+1, ped.y-10, ped.z-1, 90.0, true, true) -SetPedArmour(CokePed, 200) -SetPedCanSwitchWeapon(CokePed, true) -GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed2, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed2, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed3, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed3, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed4, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed4, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed5, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed5, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed6, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed6, PlayerPedId(), 0, 16) -GiveWeaponToPed(CokePed7, "weapon_pistol", 1, false, true) -TaskCombatPed(CokePed7, PlayerPedId(), 0, 16) -SetPedCombatAttributes(CokePed, 46, true) -SetPedCombatAttributes(CokePed2, 46, true) -SetPedCombatAttributes(CokePed3, 46, true) -SetPedCombatAttributes(CokePed4, 46, true) -SetPedCombatAttributes(CokePed5, 46, true) -SetPedCombatAttributes(CokePed6, 46, true) -SetPedCombatAttributes(CokePed7, 46, true) -end - diff --git a/client/cocaine.lua b/client/cocaine.lua deleted file mode 100644 index 60b7d7b..0000000 --- a/client/cocaine.lua +++ /dev/null @@ -1,177 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local CocaPlant = {} -local cuttingcoke = nil -local baggingcoke = nil -function LoadModel(hash) - hash = GetHashKey(hash) - lib.requestModel(hash, 500) -end - -RegisterNetEvent('coke:respawnCane', function(loc) - local v = GlobalState.CocaPlant[loc] - local hash = GetHashKey(v.model) - --if not HasModelLoaded(hash) then LoadModel(hash) end - if not CocaPlant[loc] then - CocaPlant[loc] = CreateObject(hash, v.location, false, true, true) - SetEntityAsMissionEntity(CocaPlant[loc], true, true) - FreezeEntityPosition(CocaPlant[loc], true) - SetEntityHeading(CocaPlant[loc], v.heading) - exports['qb-target']:AddTargetEntity(CocaPlant[loc], { - options = { { - icon = "fas fa-hand", - label = "pick Cocaine", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("coke:pickupCane", loc) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end -end) - -RegisterNetEvent('coke:removeCane', function(loc) - if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end - CocaPlant[loc] = nil -end) - -RegisterNetEvent("coke:init", function() - for k, v in pairs (GlobalState.CocaPlant) do - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not v.taken then - CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) - SetEntityAsMissionEntity(CocaPlant[k], true, true) - FreezeEntityPosition(CocaPlant[k], true) - SetEntityHeading(CocaPlant[k], v.heading) - exports['qb-target']:AddTargetEntity(CocaPlant[k], { - options = { { - icon = "fas fa-hand", - label = "pick cocaine", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("coke:pickupCane", k) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end - end -end) - -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - LoadModel('prop_plant_01a') - TriggerEvent('coke:init') - end - end) - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('prop_plant_01a') - TriggerEvent('coke:init') - end) - -AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a')) - for k, v in pairs(CocaPlant) do - if DoesEntityExist(v) then - DeleteEntity(v) SetEntityAsNoLongerNeeded(v) - end - end - end -end) - -RegisterNetEvent("md-drugs:client:makepowder") -AddEventHandler("md-drugs:client:makepowder", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) - QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:makepowder") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:cutcokeone") -AddEventHandler("md-drugs:client:cutcokeone", function() - cuttingcoke = true - CutCoke() - TriggerServerEvent("md-drugs:server:cutcokeone") - ClearPedTasks(PlayerPedId()) - cuttingcoke = nil - -end) - -RegisterNetEvent("md-drugs:client:bagcoke") -AddEventHandler("md-drugs:client:bagcoke", function() - baggingcoke = true - BagCoke() - TriggerServerEvent("md-drugs:server:bagcoke") - ClearPedTasks(PlayerPedId()) - baggingcoke = nil - -end) - -CreateThread(function() - exports['qb-target']:AddBoxZone("cutcokepowder",vector3(1093.01, -3194.8, -38.99),1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "cutcokepowder", - heading = 11.0, - debugPoly = false, - minZ = -40, - maxZ = -36, - }, { - options = { - { - type = "client", - event = "md-drugs:client:cutcokeone", - icon = "fas fa-sign-in-alt", - label = "cut up", - canInteract = function() - if cuttingcoke == nil then return true end - end - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("bagcokepowder",vector3(1090.19, -3194.8, -38.98),1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "bagcokepowder", - heading = 11.0, - debugPoly = false, - minZ = -40, - maxZ = -36, - }, { - options = { - { - type = "client", - event = "md-drugs:client:bagcoke", - icon = "fas fa-sign-in-alt", - label = "bagging", - canInteract = function() - if baggingcoke == nil then return true end - end - }, - }, - distance = 2.5 - }) -end) diff --git a/client/consumables.lua b/client/consumables.lua deleted file mode 100644 index 6f95b12..0000000 --- a/client/consumables.lua +++ /dev/null @@ -1,25 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName) - QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, { - animDict = "mp_suicide", - anim = "pill", - flags = 49, - }, {}, {}, function() - ClearPedTasks(PlayerPedId()) - TriggerEvent("evidence:client:SetStatus", "widepupils", 300) - if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then - AlienEffect() - elseif itemName == "cupoflean" or itemName == "cupofdextro" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then - CokeBaggyEffect() - else - TrevorEffect() - end - end) -end) - diff --git a/client/cornerselling.lua b/client/cornerselling.lua deleted file mode 100644 index 392ef83..0000000 --- a/client/cornerselling.lua +++ /dev/null @@ -1,305 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local cornerselling = false -local hasTarget = false -local lastPed = {} -local stealingPed = nil -local stealData = {} -local availableDrugs = {} -local currentOfferDrug = nil -local CurrentCops = 0 -local textDrawn = false -local zoneMade = false - --- Functions -local function LoadAnimDict(dict) - RequestAnimDict(dict) - while not HasAnimDictLoaded(dict) do - Wait(0) - end -end - -local function TooFarAway() - QBCore.Functions.Notify("too far from your corner homie", 'error') - LocalPlayer.state:set("inv_busy", false, true) - cornerselling = false - hasTarget = false - availableDrugs = {} -end - -local function PoliceCallCornerselling() - print"tell your devs to read the readme. it isnt hard for most people but they are dumb" -end - -local function RobberyPed() - if Config.UseTarget then - exports['qb-target']:AddTargetEntity(stealingPed, { - options = { - { - icon = 'fas fa-magnifying-glass', - label = "take back", - action = function() - local player = PlayerPedId() - TriggerEvent('animations:client:EmoteCommandStart', {'pickup'}) - Wait(2000) - ClearPedTasks(player) - TriggerServerEvent('md-drugs:server:giveStealItems', stealData.item, stealData.amount) - TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items[stealData.item], "add") - stealingPed = nil - stealData = {} - ClearPedTasks(PlayerPedId()) - exports['qb-target']:RemoveZone('stealingPed') - end, - canInteract = function(entity) - if IsEntityDead(entity) then - return true - end - end - } - }, - distance = 1.5, - }) - CreateThread(function() - while stealingPed do - local playerPed = PlayerPedId() - local pos = GetEntityCoords(playerPed) - local pedpos = GetEntityCoords(stealingPed) - local dist = #(pos - pedpos) - if dist > 100 then - stealingPed = nil - stealData = {} - exports['qb-target']:RemoveZone('stealingPed') - break - end - Wait(0) - end - end) - end -end - -local function SellToPed(ped) - hasTarget = true - - for i = 1, #lastPed, 1 do - if lastPed[i] == ped then - hasTarget = false - return - end - end - - local successChance = math.random(1, 100) - local scamChance = math.random(1, 100) - local getRobbed = math.random(1, 100) - if successChance <= QBConfig.SuccessChance then hasTarget = false return end - - local drugType = math.random(1, #availableDrugs) - local bagAmount = math.random(1, availableDrugs[drugType].amount) - if bagAmount > 15 then bagAmount = math.random(9, 15) end - - currentOfferDrug = availableDrugs[drugType] - - local ddata = QBConfig.DrugsPrice[currentOfferDrug.item] - local randomPrice = math.random(ddata.min, ddata.max) * bagAmount - if scamChance <= QBConfig.ScamChance then randomPrice = math.random(3, 10) * bagAmount end - - SetEntityAsNoLongerNeeded(ped) - ClearPedTasks(ped) - - local coords = GetEntityCoords(PlayerPedId(), true) - local pedCoords = GetEntityCoords(ped) - local pedDist = #(coords - pedCoords) - if getRobbed <= QBConfig.RobberyChance then - TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0) - else - TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0) - end - - while pedDist > 1.5 do - coords = GetEntityCoords(PlayerPedId(), true) - pedCoords = GetEntityCoords(ped) - if getRobbed <= QBConfig.RobberyChance then - TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0) - else - TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0) - end - TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0) - pedDist = #(coords - pedCoords) - Wait(100) - end - - TaskLookAtEntity(ped, PlayerPedId(), 5500.0, 2048, 3) - TaskTurnPedToFaceEntity(ped, PlayerPedId(), 5500) - TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) - - if hasTarget then - while pedDist < 3.0 and not IsPedDeadOrDying(ped) do - local coords2 = GetEntityCoords(PlayerPedId(), true) - local pedCoords2 = GetEntityCoords(ped) - local pedDist2 = #(coords2 - pedCoords2) - if getRobbed <= QBConfig.RobberyChance then - TriggerServerEvent('md-drugs:server:robCornerDrugs', drugType, bagAmount) - QBCore.Functions.Notify("You Got Robbed " .. bagAmount .. " Bags of " .. currentOfferDrug.item.. "!") - stealingPed = ped - stealData = { - item = availableDrugs[drugType].item, - drugType = drugType, - amount = bagAmount, - } - hasTarget = false - local moveto = GetEntityCoords(PlayerPedId()) - local movetoCoords = {x = moveto.x + math.random(100, 500), y = moveto.y + math.random(100, 500), z = moveto.z, } - ClearPedTasksImmediately(ped) - TaskGoStraightToCoord(ped, movetoCoords.x, movetoCoords.y, movetoCoords.z, 15.0, -1, 0.0, 0.0) - lastPed[#lastPed + 1] = ped - RobberyPed() - break - else - if pedDist2 < 1.5 and cornerselling then - if Config.UseTarget and not zoneMade then - zoneMade = true - exports['qb-target']:AddTargetEntity(ped, { - options = { - { - icon = 'fas fa-hand-holding-dollar', - label = "Sell " ..bagAmount.. " of " .. currentOfferDrug.item.. " for " .. randomPrice .. " Dollars! ", - action = function(entity) - local playerPed = PlayerPedId() - if IsPedInAnyVehicle(PlayerPedId(), false) then - QBCore.Functions.Notify("youre in a car", 'error') - hasTarget = false - SetPedKeepTask(entity, false) - SetEntityAsNoLongerNeeded(entity) - ClearPedTasksImmediately(entity) - lastPed[#lastPed + 1] = entity - - return - else - QBCore.Functions.Progressbar("cornerSelling", "selling Drugs", '5000', false, false, { - disableMovement = true, - disableCarMovement = true, - disableMouse = false, - disableCombat = false, - }, {}, {}, {}, function() - TriggerServerEvent('md-drugs:server:sellCornerDrugs', drugType, bagAmount, randomPrice) - hasTarget = false - exports["rpemotes"]:EmoteCommandStart("point", 0) - Wait(650) - ClearPedTasks(PlayerPedId()) - SetPedKeepTask(entity, false) - SetEntityAsNoLongerNeeded(entity) - ClearPedTasksImmediately(entity) - lastPed[#lastPed + 1] = entity - exports['qb-target']:RemoveZone('sellingPed') - PoliceCallCornerselling() - end) - end - end, - }, - { - icon = 'fas fa-x', - label = 'Decline offer', - action = function(entity) - QBCore.Functions.Notify("Fuck that Offer", 'error') - hasTarget = false - SetPedKeepTask(entity, false) - SetEntityAsNoLongerNeeded(entity) - ClearPedTasksImmediately(entity) - lastPed[#lastPed + 1] = entity - exports['qb-target']:RemoveZone('sellingPed') - end, - }, - }, - distance = 1.5, - }) - end - else - if Config.UseTarget then - zoneMade = false - exports['qb-target']:RemoveZone('sellingPed') - - end - hasTarget = false - SetPedKeepTask(ped, false) - SetEntityAsNoLongerNeeded(ped) - ClearPedTasksImmediately(ped) - lastPed[#lastPed + 1] = ped - break - end - end - Wait(0) - end - Wait(math.random(4000, 7000)) - end -end - -local function ToggleSelling() - if not cornerselling then - cornerselling = true - LocalPlayer.state:set("inv_busy", true, true) - QBCore.Functions.Notify("get that paper") - local startLocation = GetEntityCoords(PlayerPedId()) - CreateThread(function() - while cornerselling do - local player = PlayerPedId() - local coords = GetEntityCoords(player) - if not hasTarget then - local PlayerPeds = {} - if next(PlayerPeds) == nil then - for _, activePlayer in ipairs(GetActivePlayers()) do - local ped = GetPlayerPed(activePlayer) - PlayerPeds[#PlayerPeds + 1] = ped - end - end - local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds) - if closestDistance < 15.0 and closestPed ~= 0 and not IsPedInAnyVehicle(closestPed) and GetPedType(closestPed) ~= 28 then - SellToPed(closestPed) - end - end - local startDist = #(startLocation - coords) - if startDist > 30 then - TooFarAway() - end - Wait(0) - end - end) - else - stealingPed = nil - stealData = {} - cornerselling = false - LocalPlayer.state:set("inv_busy", false, true) - QBCore.Functions.Notify("lazy ass cant even sell drugs") - end -end - --- Events -RegisterNetEvent('md-drugs:client:cornerselling', function() - QBCore.Functions.TriggerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(result) - if CurrentCops >= QBConfig.MinimumDrugSalePolice then - if IsPedInAnyVehicle(PlayerPedId(), false) then - QBCore.Functions.Notify("youre in a car", 'error') - else - if result then - availableDrugs = result - ToggleSelling() - else - QBCore.Functions.Notify("what you gonna sell fuckin air or something?", 'error') - LocalPlayer.state:set("inv_busy", false, true) - end - end - else - QBCore.Functions.Notify("not enough pork", "error") - end - end) -end) - -RegisterNetEvent('police:SetCopCount', function(amount) - CurrentCops = amount -end) - -RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items) - availableDrugs = items - if availableDrugs == nil or #availableDrugs <= 0 then - QBCore.Functions.Notify("no Drugs", 'error') - cornerselling = false - LocalPlayer.state:set("inv_busy", false, true) - end -end) diff --git a/client/crack.lua b/client/crack.lua deleted file mode 100644 index d6633b8..0000000 --- a/client/crack.lua +++ /dev/null @@ -1,40 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -RegisterNetEvent("md-drugs:client:makecrackone") -AddEventHandler("md-drugs:client:makecrackone", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makecrackone") - ClearPedTasks(PlayerPedId()) - else - TriggerServerEvent("md-drugs:server:failcrackone") - ClearPedTasks(PlayerPedId()) - end -end, 3, 8) -- NumberOfCircles, - end) -end) - - -RegisterNetEvent("md-drugs:client:bagcrack") -AddEventHandler("md-drugs:client:bagcrack", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:bagcrack") - ClearPedTasks(PlayerPedId()) - end) -end) - diff --git a/client/deliveries.lua b/client/deliveries.lua deleted file mode 100644 index a161ede..0000000 --- a/client/deliveries.lua +++ /dev/null @@ -1,368 +0,0 @@ -QBCore = exports['qb-core']:GetCoreObject() -local currentDealer = nil -local dealerIsHome = false -local waitingDelivery = nil -local activeDelivery = nil -local deliveryTimeout = 0 -local waitingKeyPress = false -local dealerCombo = nil -local drugDeliveryZone - --- Handlers - -AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value) - if value then - QBCore.Functions.TriggerCallback('md-drugs:server:RequestConfig', function(DealerConfig) - QBConfig.Dealers = DealerConfig - end) - Wait(1000) - InitZones() - else - if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end - end -end) - --- Functions - -local function GetClosestDealer() - local ped = PlayerPedId() - local pCoords = GetEntityCoords(ped) - for k, v in pairs(QBConfig.Dealers) do - local dealerCoords = vector3(v.coords.x, v.coords.y, v.coords.z) - if #(pCoords - dealerCoords) < 2.0 then - currentDealer = k - break - end - end -end -CreateThread(function() - local dealermenu = {} - if Config.StupidassNewQbItemName then - for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do - dealermenu[#dealermenu + 1] = { - icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, - title = v.label, - event = "md-drugs:client:travellingmerchantox", - args = { - item = v.name, - cost = v.price, - info = v.info, - amount = v.amount, - } - } - - lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu}) - end - else - for k, v in pairs (QBConfig.Products) do - dealermenu[#dealermenu + 1] = { - icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, - title = v.label, - event = "md-drugs:client:travellingmerchantox", - args = { - item = v.name, - cost = v.price, - info = v.info, - amount = v.amount, - } - } - - lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu}) - end - end -end) - -local function RandomDeliveryItemOnRep() - local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"] - local availableItems = {} - for k, _ in pairs(QBConfig.DeliveryItems) do - if QBConfig.DeliveryItems[k]["minrep"] <= myRep then - availableItems[#availableItems+1] = k - end - end - return availableItems[math.random(1, #availableItems)] -end - -local function RequestDelivery() - if not waitingDelivery then - GetClosestDealer() - - local amount = math.random(1, 3) - local item = RandomDeliveryItemOnRep() - - QBCore.Functions.Notify("Currently searching for a delivery...", 'success') - if Config.NearbyDeliveries == true then - local playerPed = PlayerPedId() - local playerCoords = GetEntityCoords(playerPed) - local nearbyLocations = {} - -- Filter out the nearby locations - for _, location in ipairs(Config.DeliveryLocations) do - local distance = #(playerCoords - location.coords) - if distance <= Config.DeliveryWithin then - nearbyLocations[#nearbyLocations + 1] = location - end - end - - -- Select a random location from the nearby locations - if #nearbyLocations > 0 then - local selectedLocation = nearbyLocations[math.random(1, #nearbyLocations)] - waitingDelivery = { - ["coords"] = selectedLocation.coords, - ["locationLabel"] = selectedLocation.label, - ["amount"] = amount, - ["dealer"] = currentDealer, - ["itemData"] = Config.DeliveryItems[item], - ["item"] = item - } - else - QBCore.Functions.Notify("Nothing Close By", 'error') - - end - else - local location = math.random(1, #QBConfig.DeliveryLocations) - - waitingDelivery = { - ["coords"] = QBConfig.DeliveryLocations[location]["coords"], - ["locationLabel"] = QBConfig.DeliveryLocations[location]["label"], - ["amount"] = amount, - ["dealer"] = currentDealer, - ["itemData"] = QBConfig.DeliveryItems[item], - ["item"] = item - } - if QBConfig.Debug == true then - print(QBConfig.DeliveryLocations[location]["coords"]) - print(QBConfig.DeliveryLocations[location]["label"]) - end - end - - TriggerServerEvent('md-drugs:server:giveDeliveryItems', waitingDelivery) - SetTimeout(2000, function() - TriggerServerEvent('qb-phone:server:sendNewMail', { - sender = QBConfig.Dealers[currentDealer]["name"], - subject = "Delivery Location", - message = "Deliver This For Me", - button = { - enabled = true, - buttonEvent = "md-drugs:client:setLocation", - buttonData = waitingDelivery - } - }) - end) - else - QBCore.Functions.Notify("You Havent Even Finished The One I Told You Too", 'error') - end -end - -local function DeliveryTimer() - CreateThread(function() - while deliveryTimeout - 1 > 0 do - deliveryTimeout = deliveryTimeout - 1 - Wait(1000) - end - deliveryTimeout = 0 - end) -end - - -local function PoliceCallDeliveries() -print " Tell your devs they didnt do something and to read the readme it isnt hard" -end - -local function DeliverStuff() - if deliveryTimeout > 0 then - Wait(500) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - PoliceCallDeliveries() - QBCore.Functions.Progressbar("work_dropbox", "handing Off Package", 3500, false, true, { - disableMovement = true, - disableCarMovement = true, - disableMouse = false, - disableCombat = true, - }, {}, {}, {}, function() -- Done - TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true) - activeDelivery = nil - exports['qb-target']:RemoveZone('drugDeliveryZone') - ClearPedTasks(PlayerPedId()) - end) - else - TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false) - end - deliveryTimeout = 0 -end - -local function SetMapBlip(x, y) - SetNewWaypoint(x, y) - QBCore.Functions.Notify("Marked On Your Map", 'success'); -end - --- PolyZone specific functions - - -function InitZones() - if next(QBConfig.Dealers) == nil then return end - - for k,v in pairs(QBConfig.Dealers) do - local Ped = "g_m_y_famdnf_01" - RequestModel(Ped) - while not HasModelLoaded(Ped) do - Wait(0) - end - - testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false) - FreezeEntityPosition(testdealer, true) - SetEntityInvincible(testdealer, true) - exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, { - name = "dealer_"..k, - heading = v.heading, - minZ = v.coords.z - 1, - maxZ = v.coords.z + 1, - debugPoly = false, - }, { - options = { - { - icon = 'fas fa-user-secret', - label = "Deliver", - action = function() - RequestDelivery() - end, - canInteract = function() - GetClosestDealer() - local hours = GetClockHours() - local min = QBConfig.Dealers[currentDealer]["time"]["min"] - local max = QBConfig.Dealers[currentDealer]["time"]["max"] - if max < min then - if hours <= max then - if not waitingDelivery then - return true - end - elseif hours >= min then - if not waitingDelivery then - return true - end - end - else - if hours >= min and hours <= max then - if not waitingDelivery then - return true - end - end - end - end - }, - { - icon = 'fas fa-user-secret', - label = "Open Shop", - action = function() - lib.showContext('dealermenu') - end, - canInteract = function() - GetClosestDealer() - local hours = GetClockHours() - local min = QBConfig.Dealers[currentDealer]["time"]["min"] - local max = QBConfig.Dealers[currentDealer]["time"]["max"] - if max < min then - if hours <= max then - return true - elseif hours >= min then - return true - end - else - if hours >= min and hours <= max then - return true - end - end - end - } - }, - distance = 1.5 - }) - end - -end - --- Events - -RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData) - if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end - QBConfig.Dealers = DealerData - Wait(1000) - InitZones() -end) - -RegisterNetEvent('md-drugs:client:updateDealerItems', function(itemData, amount) - TriggerServerEvent('md-drugs:server:updateDealerItems', itemData, amount, currentDealer) -end) - -RegisterNetEvent('md-drugs:client:setDealerItems', function(itemData, amount, dealer) - QBConfig.Dealers[dealer]["products"][itemData.slot].amount = QBConfig.Dealers[dealer]["products"][itemData.slot].amount - amount -end) - -RegisterNetEvent('md-drugs:client:setLocation', function(locationData) - if activeDelivery then - SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"]) - QBCore.Functions.Notify("Already Delivering", 'error') - return - end - activeDelivery = locationData - deliveryTimeout = 300 - DeliveryTimer() - SetMapBlip(activeDelivery["coords"].x, activeDelivery["coords"].y) - local Ped = "g_m_y_famdnf_01" - RequestModel(Ped) - while not HasModelLoaded(Ped) do - Wait(0) - end - - Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false) - FreezeEntityPosition(Buyer, true) - SetEntityInvincible(Buyer, true) - if Config.UseTarget then - exports['qb-target']:AddTargetEntity(Buyer, { - options = { - { - icon = 'fas fa-user-secret', - label = "Hand Off", - action = function() - DeliverStuff() - Wait(4000) - DeleteEntity(Buyer) - waitingDelivery = nil - end, - canInteract = function() - if waitingDelivery then - return true - end - end - } - }, - distance = 1.5 - }) - end -end) - -RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData) - if type == 'perfect' then - TriggerServerEvent('qb-phone:server:sendNewMail', { - sender = QBConfig.Dealers[deliveryData["dealer"]]["name"], - subject = "Delivery", - message = "You did it" - }) - elseif type == 'bad' then - TriggerServerEvent('qb-phone:server:sendNewMail', { - sender = QBConfig.Dealers[deliveryData["dealer"]]["name"], - subject = "Delivery", - message = "You Fucked Me Over" - }) - elseif type == 'late' then - TriggerServerEvent('qb-phone:server:sendNewMail', { - sender = QBConfig.Dealers[deliveryData["dealer"]]["name"], - subject = "Delivery", - message = "Better Late Than Dead" - }) - end -end) - -RegisterCommand('checkrep', function() - local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"] - QBCore.Functions.Notify("Current Rep: "..drugrep) -end) \ No newline at end of file diff --git a/client/heroin.lua b/client/heroin.lua deleted file mode 100644 index 2794960..0000000 --- a/client/heroin.lua +++ /dev/null @@ -1,300 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local CocaPlant = {} -local PoppyPlants = {} - -function LoadModel(hash) - hash = GetHashKey(hash) - RequestModel(hash) - while not HasModelLoaded(hash) do - Wait(3000) - end -end - -local function loadParticle(dict) - if not HasNamedPtfxAssetLoaded(dict) then - RequestNamedPtfxAsset(dict) - end - while not HasNamedPtfxAssetLoaded(dict) do - Wait(0) - end - SetPtfxAssetNextCall(dict) -end - -CreateThread(function() -local Ped = "g_m_y_famdnf_01" - lib.requestModel("g_m_y_famdnf_01", 500) - labkitlocation = Config.buyheroinlabkit - heroinkitdealer = CreatePed(0, Ped,labkitlocation.x, labkitlocation.y, labkitlocation.z-1, 180.0, false, false) - FreezeEntityPosition(heroinkitdealer, true) - SetEntityInvincible(heroinkitdealer, true) - exports['qb-target']:AddTargetEntity(heroinkitdealer, { - options = { - { - type = "client", - label = "Buy Heroin Lab Kit", - icon = "fas fa-eye", - event = "md-drugs:client:buyheroinlabkit" - }, - } - - }) -end) - ----- plant spawns dont edit -RegisterNetEvent('heroin:respawnCane', function(loc) - local v = GlobalState.PoppyPlants[loc] - local hash = GetHashKey(v.model) - --if not HasModelLoaded(hash) then LoadModel(hash) end - if not PoppyPlants[loc] then - PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true) - SetEntityAsMissionEntity(PoppyPlants[loc], true, true) - FreezeEntityPosition(PoppyPlants[loc], true) - SetEntityHeading(PoppyPlants[loc], v.heading) - exports['qb-target']:AddTargetEntity(PoppyPlants[loc], { - options = { { - icon = "fas fa-hand", - label = "pick Poppies", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("heroin:pickupCane", loc) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end -end) - - - -RegisterNetEvent('heroin:removeCane', function(loc) - if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end - PoppyPlants[loc] = nil -end) - - - -RegisterNetEvent("heroin:init", function() - for k, v in pairs (GlobalState.PoppyPlants) do - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not v.taken then - PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) - SetEntityAsMissionEntity(PoppyPlants[k], true, true) - FreezeEntityPosition(PoppyPlants[k], true) - SetEntityHeading(PoppyPlants[k], v.heading) - exports['qb-target']:AddTargetEntity(PoppyPlants[k], { - options = { { - icon = "fas fa-hand", - label = "Pick Poppies", - action = function() - QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("heroin:pickupCane", k) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end - end -end) - -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - LoadModel('prop_plant_01b') - TriggerEvent('heroin:init') - end - end) - - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('prop_plant_01b') - TriggerEvent('heroin:init') - end) - - AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b')) - for k, v in pairs(PoppyPlants) do - if DoesEntityExist(v) then - DeleteEntity(v) SetEntityAsNoLongerNeeded(v) - end - end - end - DeleteObject(heroinlabkit) - DeleteObject(dirtylabkitheroin) -end) ----- plant stop end - -RegisterNetEvent("md-drugs:client:dryplant") -AddEventHandler("md-drugs:client:dryplant", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:dryplant") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:cutheroin") -AddEventHandler("md-drugs:client:cutheroin", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:cutheroin") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:buyheroinlabkit") -AddEventHandler("md-drugs:client:buyheroinlabkit", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:getheroinlabkit") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setheroinlabkit") -AddEventHandler("md-drugs:client:setheroinlabkit", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - ClearPedTasks(PlayerPedId()) - heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - SetVehicleOnGroundProperly(heroinlabkit) - exports['qb-target']:AddTargetEntity(heroinlabkit, { - options = { - { - - event = "md-drugs:client:heatliquidheroin", - icon = "fas fa-box-circle-check", - label = "Cook Heroin", - }, - { - - event = "md-drugs:client:getheroinkitback", - icon = "fas fa-box-circle-check", - label = "Pick Up", - }, - } - }) -end) - -RegisterNetEvent("md-drugs:client:heatliquidheroin") -AddEventHandler("md-drugs:client:heatliquidheroin", function() -local PedCoords = GetEntityCoords(PlayerPedId()) -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:heatliquidheroin") - ClearPedTasks(PlayerPedId()) - else - TriggerServerEvent("md-drugs:server:failheatingheroin") - ClearPedTasks(PlayerPedId()) - DeleteObject(heroinlabkit) - Wait(100) - dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - loadParticle("core") - heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) - SetParticleFxLoopedAlpha(heroinkit, 3.0) - ClearPedTasks(PlayerPedId()) - SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0) - - exports['qb-target']:AddTargetEntity(dirtylabkitheroin, { - options = { - { - - event = "md-drugs:client:cleanheroinlabkit", - icon = "fas fa-box-circle-check", - label = "Clean It", - } - } - }) - end -end, 1, 8) -- NumberOfCircles, MS -end) - - -RegisterNetEvent("md-drugs:client:cleanheroinlabkit") -AddEventHandler("md-drugs:client:cleanheroinlabkit", function() - exports["rpemotes"]:EmoteCommandStart("clean", 0) - QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:removecleaningkitheroin") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:deletedirtyheroin") -AddEventHandler("md-drugs:client:deletedirtyheroin", function() -DeleteObject(dirtylabkitheroin) -Wait(1000) -TriggerEvent("md-drugs:client:setheroinlabkit") -end) - - -RegisterNetEvent("md-drugs:client:getheroinkitback") -AddEventHandler("md-drugs:client:getheroinkitback", function() -DeleteObject(heroinlabkit) -TriggerServerEvent("md-drugs:server:getheroinlabkitback") -ClearPedTasks(PlayerPedId()) -end) - -RegisterNetEvent("md-drugs:client:fillneedle") -AddEventHandler("md-drugs:client:fillneedle", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:fillneedle") - ClearPedTasks(PlayerPedId()) - else - TriggerServerEvent("md-drugs:server:failheroin") - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, - end) -end) - - diff --git a/client/lean.lua b/client/lean.lua deleted file mode 100644 index 3419c18..0000000 --- a/client/lean.lua +++ /dev/null @@ -1,43 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -CreateThread(function() - local current = "s_m_m_doctor_01" - lib.requestModel(current, 500) - SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, false, false) - FreezeEntityPosition(SyrupLocation, true) - SetEntityInvincible(SyrupLocation, true) - exports['qb-target']:AddTargetEntity(SyrupLocation, { - options = { - { - type = "client", - label = "Get Task", - icon = "fas fa-eye", - event = "md-drugs:client:getsyruplocationtobuy" - }, - }, - distance = 2.0 - }) -end) - -RegisterNetEvent("md-drugs:client:getsyruplocationtobuy") -AddEventHandler("md-drugs:client:getsyruplocationtobuy", function() -SpawnCarPedChase() -QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success") -end) - -RegisterNetEvent('md-drugs:client:consumelean', function(itemName) - QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, {}, {}, {}, function() - ClearPedTasks(PlayerPedId()) - TriggerEvent("evidence:client:SetStatus", "widepupils", 300) - AlienEffect() - Wait(math.random(1000,5000)) - SetPedToRagdoll(PlayerPedId(), 1000,2000, 2) - - - end) -end) \ No newline at end of file diff --git a/client/lsd.lua b/client/lsd.lua deleted file mode 100644 index 1fd3a4e..0000000 --- a/client/lsd.lua +++ /dev/null @@ -1,313 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -local function loadParticle(dict) - if not HasNamedPtfxAssetLoaded(dict) then - RequestNamedPtfxAsset(dict) - end - while not HasNamedPtfxAssetLoaded(dict) do - Wait(0) - end - SetPtfxAssetNextCall(dict) -end - -CreateThread(function() -local Ped = "g_m_y_famdnf_01" - lib.requestModel(Ped, 500) - tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, 180.0, false, false) - FreezeEntityPosition(tabdealer, true) - SetEntityInvincible(tabdealer, true) - exports['qb-target']:AddTargetEntity(tabdealer, { - options = { - { - type = "client", - label = "Buy LSD Lab Kit", - icon = "fas fa-eye", - event = "md-drugs:client:buylabkit" - } - } - }) -end) - -RegisterNetEvent("md-drugs:client:getlysergic") -AddEventHandler("md-drugs:client:getlysergic", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:getlysergic") - else - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:getdiethylamide") -AddEventHandler("md-drugs:client:getdiethylamide", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - ClearPedTasks(PlayerPedId()) - if success then - TriggerServerEvent("md-drugs:server:getdiethylamide") - else - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:setlsdlabkit") -AddEventHandler("md-drugs:client:setlsdlabkit", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - PlaceObjectOnGroundProperly(labkit) - ClearPedTasks(PlayerPedId()) - exports['qb-target']:AddTargetEntity(labkit, { - options = { - { - - event = "md-drugs:client:heatliquid", - icon = "fas fa-box-circle-check", - label = "Heat Liquid", - }, - { - - event = "md-drugs:client:refinequalityacid", - icon = "fas fa-box-circle-check", - label = "Refine", - }, - { - - event = "md-drugs:client:maketabpaper", - icon = "fas fa-box-circle-check", - label = "Dab Sheets", - }, - { - - event = "md-drugs:client:getlabkitback", - icon = "fas fa-box-circle-check", - label = "Pick Up", - }, - } - }) -end) -end) - -RegisterNetEvent("md-drugs:client:getlabkitback") -AddEventHandler("md-drugs:client:getlabkitback", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - local PedCoords = GetEntityCoords(PlayerPedId()) - QBCore.Functions.Progressbar("drink_something", "Packing Up", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - DeleteObject(labkit) - TriggerServerEvent('md-drugs:server:getlabkitback') - ClearPedTasks(PlayerPedId()) - end) -end) - - -RegisterNetEvent("md-drugs:client:heatliquid") -AddEventHandler("md-drugs:client:heatliquid", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - local PedCoords = GetEntityCoords(PlayerPedId()) - dict = "scr_ie_svm_technical2" - QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:heatliquid") - ClearPedTasks(PlayerPedId()) - else - TriggerServerEvent("md-drugs:server:failheating") - ClearPedTasks(PlayerPedId()) - DeleteObject(labkit) - dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - loadParticle(dict) - exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) - PlaceObjectOnGroundProperly(dirtylabkit) - SetParticleFxLoopedAlpha(exitPtfx, 3.0) - ClearPedTasks(PlayerPedId()) - exports['qb-target']:AddTargetEntity(dirtylabkit, { - options = { - { - - event = "md-drugs:client:cleanlabkit", - icon = "fas fa-box-circle-check", - label = "Clean It", - }, - } - }) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:cleanlabkit") -AddEventHandler("md-drugs:client:cleanlabkit", function() - exports["rpemotes"]:EmoteCommandStart("clean", 0) - QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:removecleaningkit") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:resetlsdkit") -AddEventHandler("md-drugs:client:resetlsdkit", function() -DeleteObject(dirtylabkit) -TriggerEvent("md-drugs:client:setlsdlabkit") -end) - -RegisterNetEvent("md-drugs:client:refinequalityacid") -AddEventHandler("md-drugs:client:refinequalityacid", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:refinequalityacid") - else - TriggerServerEvent("md-drugs:server:failrefinequality") - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:maketabpaper") -AddEventHandler("md-drugs:client:maketabpaper", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:maketabpaper") - else - TriggerServerEvent("md-drugs:server:failtabs") - end -end, 3, 8) -- NumberOfCircles, - end) -end) - - -RegisterNetEvent("md-drugs:client:cutsheet") -AddEventHandler("md-drugs:client:cutsheet", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:buytabs") -AddEventHandler("md-drugs:client:buytabs", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:gettabpaper") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:buylabkit") -AddEventHandler("md-drugs:client:buylabkit", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:getlabkit") - ClearPedTasks(PlayerPedId()) - end) -end) - - -RegisterNetEvent('md-drugs:client:taketabs', function(itemName) - QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, { - animDict = "mp_suicide", - anim = "pill", - flags = 49, - }, {}, {}, function() -- Done - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - TriggerEvent("evidence:client:SetStatus", "widepupils", 300) - if itemName == "smiley_tabs" or itemName == "wildcherry_tabs" or itemName == "yinyang_tabs" then - AlienEffect() - elseif itemName == "pineapple_tabs" then - EcstasyEffect() - elseif itemName == "bart_tabs" then - TrevorEffect() - else - TrevorEffect() - Wait(15000) - EcstasyEffect() - end - end, function() -- Cancel - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - QBCore.Functions.Notify("Canceled", "error") - end) -end) diff --git a/client/mescaline.lua b/client/mescaline.lua deleted file mode 100644 index f08e41c..0000000 --- a/client/mescaline.lua +++ /dev/null @@ -1,175 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local Mescaline = {} -local hallucinate = nil - -function LoadModel(hash) - hash = GetHashKey(hash) - RequestModel(hash) - while not HasModelLoaded(hash) do - Wait(3000) - end -end - -local function loadParticle(dict) - if not HasNamedPtfxAssetLoaded(dict) then - RequestNamedPtfxAsset(dict) - end - while not HasNamedPtfxAssetLoaded(dict) do - Wait(0) - end - SetPtfxAssetNextCall(dict) -end - - ----- plant spawns dont edit -RegisterNetEvent('Mescaline:respawnCane', function(loc) - local v = GlobalState.Mescaline[loc] - local hash = GetHashKey(v.model) - --if not HasModelLoaded(hash) then LoadModel(hash) end - if not Mescaline[loc] then - Mescaline[loc] = CreateObject(hash, v.location, false, true, true) - SetEntityAsMissionEntity(Mescaline[loc], true, true) - FreezeEntityPosition(Mescaline[loc], true) - SetEntityHeading(Mescaline[loc], v.heading) - exports['qb-target']:AddTargetEntity(Mescaline[loc], { - options = { { - icon = "fas fa-hand", - label = "pick Cactus", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking Cactus", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("Mescaline:pickupCane", loc) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end -end) - - - -RegisterNetEvent('Mescaline:removeCane', function(loc) - if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end - Mescaline[loc] = nil -end) - - - -RegisterNetEvent("Mescaline:init", function() - for k, v in pairs (GlobalState.Mescaline) do - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not v.taken then - Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) - SetEntityAsMissionEntity(Mescaline[k], true, true) - FreezeEntityPosition(Mescaline[k], true) - SetEntityHeading(Mescaline[k], v.heading) - exports['qb-target']:AddTargetEntity(Mescaline[k], { - options = { { - icon = "fas fa-hand", - label = "Pick Mescaline", - action = function() - QBCore.Functions.Progressbar("pick_cane", "Picking Mescaline", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("Mescaline:pickupCane", k) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end - end -end) - -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - LoadModel('prop_cactus_03') - TriggerEvent('Mescaline:init') - end - end) - - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('prop_cactus_03') - TriggerEvent('Mescaline:init') - end) - - AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03')) - for k, v in pairs(Mescaline) do - if DoesEntityExist(v) then - DeleteEntity(v) SetEntityAsNoLongerNeeded(v) - end - end - end -end) - - -RegisterNetEvent("md-drugs:client:drymescaline") -AddEventHandler("md-drugs:client:drymescaline", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:drymescaline") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:takemescaline") -AddEventHandler("md-drugs:client:takemescaline", function() -local chance = math.random(1,100) -local chance2 = math.random(1,100) - QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - if chance <= Config.Badtrip then - AlienEffect() - clone = ClonePed(PlayerPedId(), false, false, true) - SetEntityAsMissionEntity(clone) - SetEntityVisible(clone, true) - SetPedRelationshipGroupHash(clone) - SetPedAccuracy(clone) - SetPedArmour(clone) - SetPedCanSwitchWeapon(clone, true) - SetPedFleeAttributes(clone, false) - if chance2 <= 99 then - GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true) - TaskCombatPed(clone, PlayerPedId(), 0, 16) - SetPedCombatAttributes(clone, 46, true) - Wait(1000 * 30) - DeleteEntity(clone) - else - GiveWeaponToPed(clone, "weapon_rpg", 1, false, true) - TaskCombatPed(clone, PlayerPedId(), 0, 16) - SetPedCombatAttributes(clone, 46, true) - Wait(1000 * 30) - DeleteEntity(clone) - end - else - AlienEffect() - end - end) -end) diff --git a/client/meth.lua b/client/meth.lua deleted file mode 100644 index a457235..0000000 --- a/client/meth.lua +++ /dev/null @@ -1,239 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local amonia = nil -local tray = nil -local heated = nil - - -CreateThread(function() - BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject() - BikerMethLab.Style.Set(BikerMethLab.Style.upgrade) - BikerMethLab.Security.Set(BikerMethLab.Security.upgrade) - BikerMethLab.Details.Enable(BikerMethLab.Details.production, true) - RefreshInterior(BikerMethLab.interiorId) -end) - -CreateThread(function() -exports['qb-target']:AddBoxZone("methteleout",Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "methteleout", - heading = 11.0, - debugPoly = false, - minZ = Config.MethTeleIn.z-2, - maxZ = Config.MethTeleIn.z+2, - }, { - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Enter Building", - action = function() - SetEntityCoords(PlayerPedId(),Config.MethTeleOut) - end, - - }, - }, - distance = 2.5 - }) -exports['qb-target']:AddBoxZone("methtelein",Config.MethTeleOut,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "methtelein", - heading = 11.0, - debugPoly = false, - minZ = Config.MethTeleOut.z-2, - maxZ = Config.MethTeleOut.z+2, - }, { - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Exit Building", - action = function() - SetEntityCoords(PlayerPedId(),Config.MethTeleIn) - end, - - }, - }, - distance = 2.5 - }) -exports['qb-target']:AddBoxZone("maze",vector3(-95.55, -806.73, 44.04),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "maze", - heading = 11.0, - debugPoly = false, - minZ = 44-2, - maxZ = 44+2, - }, { - options = { - { - name = 'die', - icon = "fas fa-sign-in-alt", - label = "dont click this", - action = function() - SetEntityCoords(PlayerPedId(),vector3(-75.36, -837.24, 318.93)) - end, - - }, - }, - distance = 2.5 - }) - local itemreqcook = {"ephedrine", "acetone"} -exports['qb-target']:AddBoxZone("ingridientsmeth",vector3(1005.7, -3201.28, -39.55),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "ingridientsmeth", - heading = 11.0, - debugPoly = false, - minZ = -39-2, - maxZ = -39+2, - }, { - options = { - { - name = 'methcook', - icon = "fas fa-sign-in-alt", - label = "Cook Meth", - item = itemreqcook, - action = function() - if amonia == nil then - amonia = true - TriggerServerEvent("md-drugs:server:startcook") - MethCooking() - exports['qb-target']:AddBoxZone("adjustdials",vector3(1007.89, -3201.17, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "adjustdials", - heading = 11.0, - debugPoly = false, - minZ = -39-2, - maxZ = -39+2, - }, { - options = { - { - name = 'adjustdials', - icon = "fas fa-sign-in-alt", - label = "Adjust Dials", - distance = 5, - action = function() - if amonia == true then - exports['ps-ui']:Circle(function(success) - if success then - QBCore.Functions.Notify("Increasing Heat", "success") - ClearPedTasks(PlayerPedId()) - heated = true - exports['qb-target']:RemoveZone("adjustdials") - else - AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) - ClearPedTasks(PlayerPedId()) - amonia = nil - exports['qb-target']:RemoveZone("adjustdials") - end - end, 2, 8) -- NumberOfCircles, - else - end - end, - }, - }, - }) - - else - QBCore.Functions.Notify("Theres Stuff Inside", "error") - end - end, - canInteract = function() - if amonia == nil then - return true - end - end, - }, - { - name = 'grabtray', - icon = "fas fa-sign-in-alt", - label = "Grab Tray", - distance = 5, - action = function() - if amonia then - local pos = GetEntityCoords(PlayerPedId(), true) - RequestAnimDict('anim@heists@box_carry@') - while (not HasAnimDictLoaded('anim@heists@box_carry@')) do - Wait(7) - end - TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) - RequestModel("bkr_prop_meth_tray_02a") - while not HasModelLoaded("bkr_prop_meth_tray_02a") do - Wait(0) - end - local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) - AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) - tray = true - exports['qb-target']:AddBoxZone("boxmeth",vector3(1012.04, -3194.96, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "boxmeth", - heading = 11.0, - debugPoly = false, - minZ = -38-2, - maxZ = -38+2, - }, { - options = { - { - name = 'boxmeth', - icon = "fas fa-sign-in-alt", - label = "Box Up Meth", - distance = 5, - action = function() - if tray then - tray = false - DeleteObject(trays) - local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) - SetEntityHeading(bucket, 90.0) - SmashMeth() - exports['qb-target']:RemoveZone("boxmeth") - exports['qb-target']:AddTargetEntity(bucket, { - options = { - { - name = 'bucket', - icon = 'fa-solid fa-car', - label = 'Bag Meth', - action = function() - DeleteObject(bucket) - amonia = nil - heated = nil - tray = nil - BagMeth() - TriggerServerEvent('md-drugs:server:getmeth') - end, - - } - }, - }) - end - end, - canInteract = function() - if tray then return true end - end, - }, - }, - }) - end - end, - canInteract = function() - if heated and amonia and tray == nil then return true end - - end, - }, - }, - distance = 2.5 - }) -end) - -CreateThread(function() -local current = "g_m_y_famdnf_01" - lib.requestModel(current, 1000) - local CurrentLocation = Config.MethHeistStart - methdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false) - FreezeEntityPosition(methdealer, true) - SetEntityHeading(methdealer,220.0) - SetEntityInvincible(methdealer, true) - exports['qb-target']:AddTargetEntity(methdealer, { - options = { - { - label = "Get Mission", - icon = "fas fa-eye", - action = function() - SpawnMethCarPedChase() - QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success") - end, - }, - } - }) -end) diff --git a/client/oxyruns.lua b/client/oxyruns.lua deleted file mode 100644 index 12f5b63..0000000 --- a/client/oxyruns.lua +++ /dev/null @@ -1,136 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -local deliveryBlip = nil -local PZone = nil -local listen = false -local carryPackage = nil - - -RegisterNetEvent("md-drugs:client:getoxytruck") -AddEventHandler("md-drugs:client:getoxytruck", function() -if TriggerServerEvent('md-drugs:server:payfortruck') then -end -end) - -function PolicecallOxy() -print "Tell Your Dev They Didn't Follow The Readme" -end - - -RegisterNetEvent("md-drugs:Client:getoxylocation", function() - local coords = Config.truckspawn - local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model - lib.requestModel(ModelHash, 500) - local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false) - SetEntityHeading(oxycar, coords.w) - exports[Config.Fuel]:SetFuel(oxycar, 100.0) - TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar)) - TriggerEvent('QBCore:Notify', 'Your truck is here', 'success') - TriggerEvent("md-drugs:client:getoxylocationroute") - SetVehicleEngineOn(oxycar, true, true) - exports['qb-target']:AddTargetEntity(oxycar, { - options = { - { - event = "md-drugs:client:getfromtrunk", - icon = "fas fa-box-circle-check", - label = "Get Package", - }, - } - }) -end) - - -RegisterNetEvent("md-drugs:client:getoxylocationroute") -AddEventHandler("md-drugs:client:getoxylocationroute", function() - Wait(100) - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if CurrentLocation ~= nil then - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - oxyzone = lib.zones.sphere({ - coords = CurrentLocation, - radius = 2, - onEnter = function() - RemoveBlip(deliveryBlip) - end, - }) - end - if unlucky <= Config.PoliceAlertOxy then - PolicecallOxy() - end - local current = "g_m_y_famdnf_01" - lib.requestModel(current, 500) - oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false) - SetEntityHeading(oxybuyer, 180) - FreezeEntityPosition(oxybuyer, true) - SetEntityInvincible(oxybuyer, true) - exports['qb-target']:AddTargetEntity(oxybuyer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - event = "md-drugs:client:giveoxybox" - }, - } - }) -end) - - - -RegisterNetEvent("md-drugs:client:getfromtrunk") -AddEventHandler("md-drugs:client:getfromtrunk", function() - if carryPackage then - QBCore.Functions.Notify("You Cant Carry More Than One", "error") - else - local pos = GetEntityCoords(PlayerPedId(), true) - RequestAnimDict('anim@heists@box_carry@') - while (not HasAnimDictLoaded('anim@heists@box_carry@')) do - Wait(7) - end - TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) - RequestModel("hei_prop_drug_statue_box_big") - while not HasModelLoaded("hei_prop_drug_statue_box_big") do - Wait(0) - end - 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) - -RegisterNetEvent("md-drugs:client:giveoxybox") -AddEventHandler("md-drugs:client:giveoxybox", function() - if carryPackage then - QBCore.Functions.Progressbar("drink_something", "handing over oxy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:giveoxybox") - ClearPedTasks(PlayerPedId()) - DeleteEntity(oxybuyer) - DetachEntity(carryPackage, true, true) - DeleteObject(carryPackage) - carryPackage = nil - end) - else - QBCore.Functions.Notify("cant be empty handed idiot", "error") - end -end) - diff --git a/client/pharma.lua b/client/pharma.lua deleted file mode 100644 index 5796b51..0000000 --- a/client/pharma.lua +++ /dev/null @@ -1,157 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -RegisterCommand('prescriptionpad', function() -if QBCore.Functions.GetPlayerData().job.name == Config.PharmaJob then - lib.registerContext({ - id = 'prescriptionpad', - title = "Prescription Pad", - options = { - { - title = 'Give Vicodin', - description = 'Give Vicodin ', - icon = 'fa-solid fa-file-prescription', - event = 'md-drugs:client:givevicodinprescription', - }, - { - title = 'Give Adderal', - description = 'Give Adderal ', - icon = 'fa-solid fa-file-prescription', - event = 'md-drugs:client:giveadderalprescription', - }, - { - title = 'Give Morphine', - description = 'Give Morphine ', - icon = 'fa-solid fa-file-prescription', - event = 'md-drugs:client:givemorphineprescription', - - }, - { - title = 'Give Xanax', - description = 'Give Vicodin ', - icon = 'fa-solid fa-file-prescription', - event = 'md-drugs:client:givexanaxprescription', - }, - } - }) -lib.showContext('prescriptionpad') -else -QBCore.Functions.Notify("Youre Not A Medical Person", "error") -end -end) - - -RegisterNetEvent("md-drugs:client:givevicodinprescription") -AddEventHandler("md-drugs:client:givevicodinprescription", function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:givevicodinprescription") - ClearPedTasks(PlayerPedId()) - end) -end) -RegisterNetEvent("md-drugs:client:giveadderalprescription") -AddEventHandler("md-drugs:client:giveadderalprescription", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:giveadderalprescription") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:givemorphineprescription") -AddEventHandler("md-drugs:client:givemorphineprescription", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:givemorphineprescription") - ClearPedTasks(PlayerPedId()) - end) -end) -RegisterNetEvent("md-drugs:client:givexanaxprescription") -AddEventHandler("md-drugs:client:givexanaxprescription", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:givexanaxprescription") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:fillprescription") -AddEventHandler("md-drugs:client:fillprescription", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:fillprescription") - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:openingvicodin") -AddEventHandler("md-drugs:client:openingvicodin", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - end) -end) - - -RegisterNetEvent('md-drugs:client:takepharma', function(itemName) - QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, { - animDict = "mp_suicide", - anim = "pill", - flags = 49, - }, {}, {}, function() -- Done - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - - if itemName == "vicodin" then - exports['ps-buffs']:AddHealthBuff(10000, 20) - elseif itemName == "adderal" then - exports['ps-buffs']:StaminaBuffEffect(5000, 1.3) - elseif itemName == "xanax" then - exports['ps-buffs']:AddStressBuff(10000, 25) - else - exports['ps-buffs']:AddHealthBuff(10000, 40) - end - end, function() -- Cancel - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - QBCore.Functions.Notify("Canceled", "error") - end) -end) diff --git a/client/shrooms.lua b/client/shrooms.lua deleted file mode 100644 index 0a73fe4..0000000 --- a/client/shrooms.lua +++ /dev/null @@ -1,126 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local shrooms = {} - - -function LoadModel(hash) - hash = GetHashKey(hash) - RequestModel(hash) - while not HasModelLoaded(hash) do - Wait(3000) - end -end - -RegisterNetEvent('shrooms:respawnCane', function(loc) - local v = GlobalState.shrooms[loc] - local hash = GetHashKey(v.model) - --if not HasModelLoaded(hash) then LoadModel(hash) end - if not shrooms[loc] then - shrooms[loc] = CreateObject(hash, v.location, false, true, true) - SetEntityAsMissionEntity(shrooms[loc], true, true) - FreezeEntityPosition(shrooms[loc], true) - SetEntityHeading(shrooms[loc], v.heading) - exports['qb-target']:AddTargetEntity(shrooms[loc], { - options = { { - icon = "fas fa-hand", - label = "pick shrooms", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("shrooms:pickupCane", loc) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end -end) -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - Wait(3000) - LoadModel('mushroom') - TriggerEvent('shrooms:init') - end - end) - -AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - SetModelAsNoLongerNeeded(GetHashKey('mushroom')) - for k, v in pairs(shrooms) do - if DoesEntityExist(v) then - DeleteEntity(v) SetEntityAsNoLongerNeeded(v) - end - end - end -end) - -RegisterNetEvent('shrooms:removeCane', function(loc) - if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end - shrooms[loc] = nil -end) - - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('mushroom') - TriggerEvent('shrooms:init') - end) - - - RegisterNetEvent("shrooms:init", function() - for k, v in pairs (GlobalState.shrooms) do - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not v.taken then - shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) - SetEntityAsMissionEntity(shrooms[k], true, true) - FreezeEntityPosition(shrooms[k], true) - SetEntityHeading(shrooms[k], v.heading) - exports['qb-target']:AddTargetEntity(shrooms[k], { - options = { { - icon = "fas fa-hand", - label = "Pick shrooms", - action = function() - QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("shrooms:pickupCane", k) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end - } - }, - distance = 3.0 - }) - end - end -end) - - -RegisterNetEvent('md-drugs:client:takeshrooms', function() - QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, { - animDict = "mp_suicide", - anim = "pill", - flags = 49, - }, {}, {}, function() -- Done - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - TriggerEvent("evidence:client:SetStatus", "widepupils", 300) - EcstasyEffect() - -- exports["qb-smallresources"]:DoAcid(240000) - end, function() -- Cancel - StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) - QBCore.Functions.Notify("Canceled", "error") - end) -end) diff --git a/client/target.lua b/client/target.lua deleted file mode 100644 index 1d7e49a..0000000 --- a/client/target.lua +++ /dev/null @@ -1,724 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -CreateThread(function() -if Config.oxtarget then - coketelein = exports.ox_target:addBoxZone({ - coords = Config.CokeTeleIn, - size = vec(1,1,3), - rotation = 0, - debug = false, - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Enter Building", - distance = 5, - onSelect = function() - DoScreenFadeOut(500) - Wait(1000) - SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z) - Wait(1000) - DoScreenFadeIn(500) - end, - - }, - }, -}) - coketeleout = exports.ox_target:addBoxZone({ - coords = Config.CokeTeleOut, - size = vec(1,1,3), - rotation = 0, - debug = false, - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Exit Building", - distance = 5, - onSelect = function() - DoScreenFadeOut(500) - Wait(500) - SetEntityCoords(PlayerPedId(),Config.CokeTeleIn) - Wait(500) - DoScreenFadeIn(500) - end, - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = vector3(1093.01, -3194.8, -38.99), - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:cutcokeone", - icon = "fas fa-sign-in-alt", - label = "cut up", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = vector3(1090.19, -3194.8, -38.98), - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:bagcoke", - icon = "fas fa-sign-in-alt", - label = "bagging", - - }, - }, - }) - ------------- lsd - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.lysergicacid, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:getlysergic", - icon = "fas fa-sign-in-alt", - label = "stealing", - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.diethylamide, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:getdiethylamide", - icon = "fas fa-sign-in-alt", - label = "stealing", - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.gettabs, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:buytabs", - icon = "fas fa-sign-in-alt", - label = "Buy Tabs", - - }, - }, - }) - ------ heroin - - ------- crack - - ------- pharma - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.FillPrescription, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:fillprescription", - icon = "fas fa-sign-in-alt", - label = "Fill Prescription", - }, - }, - }) - -------- oxy runs - exports.ox_target:addBoxZone({ - coords = Config.Payfortruck, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - event = "md-drugs:client:getoxytruck", - icon = "fas fa-sign-in-alt", - label = "Pay For Truck", - }, - } - }) - ------------ mescaline - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.isosafrole, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:stealisosafrole", - icon = 'fas fa-sign-in-alt', - label = 'Steal Isosafrole', - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.mdp2p, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:stealmdp2p", - icon = 'fas fa-eye', - label = 'Steal mdp2p', - }, - }, - }) - - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.buypress, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:buypress", - icon = 'fas fa-eye', - label = 'Buy Press', - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.stamp, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:stampwhite", - icon = 'fas fa-eye', - label = 'Make White Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampred", - icon = 'fas fa-eye', - label = 'Make Red Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stamporange", - icon = 'fas fa-eye', - label = 'Make Orange Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampblue", - icon = 'fas fa-eye', - label = 'Make Blue Stamped Pills', - }, - }, - }) - if Config.Crafting then - else - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.makecrack, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makecrackone", - icon = "fas fa-sign-in-alt", - label = "cook some crack", - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.bagcrack, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:bagcrack", - icon = "fas fa-sign-in-alt", - label = "bag some crack", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = vector3(1087.16, -3195.46, -38.99), - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makepowder", - icon = "fas fa-sign-in-alt", - label = "chop it up", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.dryplant, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:dryplant", - icon = "fas fa-sign-in-alt", - label = "Dry out", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.cutheroinone, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:cutheroin", - icon = "fas fa-sign-in-alt", - label = "Cut Heroin", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.fillneedle, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:fillneedle", - icon = "fas fa-sign-in-alt", - label = "Fill Needles", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.DryOut, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:drymescaline", - icon = "fas fa-sign-in-alt", - label = "Dry Out", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.rawxtcloc, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makingrawxtc", - icon = 'fas fa-eye', - label = 'Make Raw XTC', - }, - }, - }) - end -else - - exports['qb-target']:AddBoxZone("coketelein",Config.CokeTeleIn,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "coketelein", - heading = 156.0, - debugPoly = false, - minZ = Config.CokeTeleIn.z-2, - maxZ = Config.CokeTeleIn.z+2, - }, { - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Enter Building", - action = function() - DoScreenFadeOut(500) - Wait(500) - SetEntityCoords(PlayerPedId(),Config.CokeTeleOut) - Wait(500) - DoScreenFadeIn(500) - end, - - }, - }, - }) - exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "CokeTeleOut", - heading = 156.0, - debugPoly = false, - minZ = Config.CokeTeleOut.z-2, - maxZ = Config.CokeTeleOut.z+2, -}, { - options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Exit Building", - action = function() - DoScreenFadeOut(500) - Wait(500) - SetEntityCoords(PlayerPedId(),Config.CokeTeleIn) - Wait(500) - DoScreenFadeIn(500) - end, - - }, - }, - }) - ----- LSD - exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "getlysergic", - heading = 156.0, - debugPoly = false, - minZ = Config.lysergicacid.z-2, - maxZ = Config.lysergicacid.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:getlysergic", - icon = "fas fa-sign-in-alt", - label = "stealing", - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("getdiethylamide",Config.diethylamide,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "getdiethylamide", - heading = 156.0, - debugPoly = false, - minZ = Config.diethylamide.z-2, - maxZ = Config.diethylamide.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:getdiethylamide", - icon = "fas fa-sign-in-alt", - label = "stealing", - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("buylabkit2",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "buylabkit2", - heading = 156.0, - debugPoly = false, - minZ = Config.gettabs.z-2, - maxZ = Config.gettabs.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:buytabs", - icon = "fas fa-sign-in-alt", - label = "Buy Tabs", - - }, - }, - distance = 2.5 - }) - - exports['qb-target']:AddBoxZone("pharmapresc",Config.FillPrescription,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "pharmapresc", - heading = 156.0, - debugPoly = false, - minZ = Config.FillPrescription.z-2, - maxZ = Config.FillPrescription.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:fillprescription", - icon = "fas fa-sign-in-alt", - label = "Fill Prescription", - - }, - }, - distance = 2.5 - }) - -------------- oxy run - exports['qb-target']:AddBoxZone("getoxytruck",Config.Payfortruck,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "getoxytruck", - heading = 11.0, - debugPoly = false, - minZ = Config.Payfortruck.z-2, - maxZ = Config.Payfortruck.z+2, - }, { - options = { - { - event = "md-drugs:client:getoxytruck", - icon = "fas fa-sign-in-alt", - label = "Pay For Truck", - }, - } - }) - --------------------------------------- XTC - exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stealisosafrole2", - heading = 156.0, - debugPoly = false, - minZ = Config.isosafrole.z-2, - maxZ = Config.isosafrole.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stealisosafrole", - icon = 'fas fa-sign-in-alt', - label = 'Steal Isosafrole', - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stealmdp2p", - heading = 156.0, - debugPoly = false, - minZ = Config.mdp2p.z-2, - maxZ = Config.mdp2p.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stealmdp2p", - icon = 'fas fa-eye', - label = 'Steal mdp2p', - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "buypress", - heading = 156.0, - debugPoly = false, - minZ = Config.buypress.z-2, - maxZ = Config.buypress.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:buypress", - icon = 'fas fa-eye', - label = 'Buy Press', - }, - }, - distance = 2.5 - }) - - exports['qb-target']:AddBoxZone("stampwhite",Config.stamp,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stampwhite", - heading = 156.0, - debugPoly = false, - minZ = Config.stamp.z-2, - maxZ = Config.stamp.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stampwhite", - icon = 'fas fa-eye', - label = 'Make White Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampred", - icon = 'fas fa-eye', - label = 'Make Red Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stamporange", - icon = 'fas fa-eye', - label = 'Make Orange Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampblue", - icon = 'fas fa-eye', - label = 'Make Blue Stamped Pills', - }, - }, - distance = 2.5 - }) - if Config.Crafting then - else - exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "makepowder", - heading = 156.0, - debugPoly = false, - minZ = Config.MakePowder.z-2, - maxZ = Config.MakePowder.z+2, -}, { - options = { - { - type = "client", - event = "md-drugs:client:makepowder", - icon = "fas fa-sign-in-alt", - label = "chop it up", - - }, - }, - }) - exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "dryplant", - heading = 156.0, - debugPoly = false, - minZ = Config.dryplant.z-2, - maxZ = Config.dryplant.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:dryplant", - icon = "fas fa-sign-in-alt", - label = "Dry out", - - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("cutheroin",Config.cutheroinone,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "cutheroin", - heading = 156.0, - debugPoly = false, - minZ = Config.cutheroinone.z-2, - maxZ = Config.cutheroinone.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:cutheroin", - icon = "fas fa-sign-in-alt", - label = "Cut Heroin", - - }, - }, - distance = 2.5 - }) - - exports['qb-target']:AddBoxZone("fillneedle",Config.fillneedle,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "fillneedle", - heading = 156.0, - debugPoly = false, - minZ = Config.fillneedle.z-2, - maxZ = Config.fillneedle.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:fillneedle", - icon = "fas fa-sign-in-alt", - label = "Fill Needles", - - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("crackmakeone",Config.makecrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "crackmakeone", - heading = 156.0, - debugPoly = false, - minZ = Config.makecrack.z-2, - maxZ = Config.makecrack.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:makecrackone", - icon = "fas fa-sign-in-alt", - label = "cook some crack", - - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("bagcrack",Config.bagcrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "bagcrack", - heading = 156.0, - debugPoly = false, - minZ = Config.bagcrack.z-2, - maxZ = Config.bagcrack.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:bagcrack", - icon = "fas fa-sign-in-alt", - label = "Bag some crack", - - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("drymescaline",Config.DryOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "drymescaline", - heading = 11.0, - debugPoly = false, - minZ = Config.DryOut.z-2, - maxZ = Config.DryOut.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:drymescaline", - icon = "fas fa-sign-in-alt", - label = "Dry Out", - - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "makerawxtc", - heading = 156.0, - debugPoly = false, - minZ = Config.rawxtcloc.z-2, - maxZ = Config.rawxtcloc.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:makingrawxtc", - icon = 'fas fa-eye', - label = 'Make Raw XTC', - }, - }, - distance = 2.5 - }) - end -end -end) diff --git a/client/travellingmerchant.lua b/client/travellingmerchant.lua deleted file mode 100644 index 7382414..0000000 --- a/client/travellingmerchant.lua +++ /dev/null @@ -1,99 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -CreateThread(function() -local current = "g_m_y_famdnf_01" - lib.requestModel(current, timeout) - local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)] - travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false) - FreezeEntityPosition(travellingmerchant, true) - SetEntityInvincible(travellingmerchant, true) - if Config.OxInv then - if Config.oxtarget then - options = { - { - label = "Travelling Merchant", - icon = "fas fa-eye", - onSelect = function() - lib.showContext('travellingmerchant') - end, - }, - } - exports.ox_target:addLocalEntity(travellingmerchant, options) - else - exports['qb-target']:AddTargetEntity(travellingmerchant, { - options = { - { - label = "Travelling Merchant", - icon = "fas fa-eye", - action = function() - lib.showContext('travellingmerchant') - end, - }, - } - }) - end - else - if Config.oxtarget then - options = { - { - label = "Travelling Merchant", - icon = "fas fa-eye", - onSelect = function() - TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items) - end, - }, - } - exports.ox_target:addLocalEntity(travellingmerchant, options) - else - exports['qb-target']:AddTargetEntity(travellingmerchant, { - options = { - { - label = "Travelling Merchant", - icon = "fas fa-eye", - action = function() - TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items) - end, - }, - } - }) - end - end -end) - -CreateThread(function() -local ShopMenu = {} - -for k, v in pairs (Config.Items.items) do - ShopMenu[#ShopMenu + 1] = { - icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[v.name].image, - header = v.label, - title = v.label, - event = "md-drugs:client:travellingmerchantox", - args = { - item = v.name, - cost = v.price, - amount = v.amount, - } - } - - lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu}) -end -end) - - -RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data) local dialog - local price = data.cost - local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price - local max = data.amount - local dialog = exports.ox_lib:inputDialog(data.item .."!", { - { type = 'select', label = "Payment Type", default = "cash", - options = { - { value = "cash"}, - { value = "bank"}, - } - }, - { type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 }, - }) - if data.cost == "Free" then data.cost = 0 end - TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost ) -end) diff --git a/client/weed.lua b/client/weed.lua deleted file mode 100644 index 97528bc..0000000 --- a/client/weed.lua +++ /dev/null @@ -1,602 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() -local WeedPlant = {} -local exploded = nil -function LoadModel(hash) - hash = GetHashKey(hash) - RequestModel(hash) - while not HasModelLoaded(hash) do - Wait(3000) - end -end - -RegisterNetEvent('weed:respawnCane', function(loc) - local v = GlobalState.WeedPlant[loc] - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not WeedPlant[loc] then - WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) - SetEntityAsMissionEntity(WeedPlant[loc], true, true) - FreezeEntityPosition(WeedPlant[loc], true) - SetEntityHeading(WeedPlant[loc], v.heading) - exports['qb-target']:AddTargetEntity(WeedPlant[loc], { - options = { - { - icon = "fas fa-hand", - label = "Pick Weed", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("weed:pickupCane", loc) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - } - } - }) - end -end) - -RegisterNetEvent('weed:removeCane', function(loc) - if DoesEntityExist(WeedPlant[loc]) then DeleteEntity(WeedPlant[loc]) end - WeedPlant[loc] = nil -end) - -RegisterNetEvent("weed:init", function() - for k, v in pairs (GlobalState.WeedPlant) do - local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end - if not v.taken then - WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) - SetEntityAsMissionEntity(WeedPlant[k], true, true) - FreezeEntityPosition(WeedPlant[k], true) - SetEntityHeading(WeedPlant[k], v.heading) - exports['qb-target']:AddTargetEntity(WeedPlant[k], { - options = { - { - icon = "fas fa-hand", - label = "Pick Weed", - action = function() - QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, { - disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, - { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, - {}, {}, function() - TriggerServerEvent("weed:pickupCane", k) - ClearPedTasks(PlayerPedId()) - end, function() -- Cancel - ClearPedTasks(PlayerPedId()) - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - } - } - }) - end - end -end) - -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - LoadModel('bkr_prop_weed_lrg_01b') - TriggerEvent('weed:init') - end - end) - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('bkr_prop_weed_lrg_01b') - TriggerEvent('weed:init') - end) - -AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b')) - for k, v in pairs(WeedPlant) do - if DoesEntityExist(v) then - DeleteEntity(v) SetEntityAsNoLongerNeeded(v) - end - end - end -end) - -CreateThread(function() - - -for k, v in pairs (Config.WeedDry) do - -exports['qb-target']:AddBoxZone("weeddry"..k,v,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "ingridientsmeth"..k, - heading = 11.0, - debugPoly = false, - minZ = v.z-2, - maxZ = v.z+2, - }, { -options = { - { - name = 'dryweed', - icon = "fas fa-sign-in-alt", - label = "Dry Weed", - distance = 1, - items = "wetcannabis", - action = function() - if drying then - QBCore.Functions.Notify("Already Drying One Out", "error") - else - local loc = GetEntityCoords(PlayerPedId()) - local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false) - drying = true - FreezeEntityPosition(weedplant, true) - QBCore.Functions.Notify("Wait A little Bit To Dry", "success") - Wait(math.random(1000,5000)) - QBCore.Functions.Notify("Take Down The Weed", "success") - exports['qb-target']:AddTargetEntity(weedplant, { - options = { - { - icon = "fas fa-sign-in-alt", - label = "Pick Up Weed", - action = function() - DeleteEntity(weedplant) - drying = false - TriggerServerEvent('md-drugs:server:dryoutweed') - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - } - } - }) - end - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - }, -}) -end -exports['qb-target']:AddBoxZone("teleinweed",Config.Telein,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "teleinweed", - heading = 11.0, - debugPoly = false, - minZ = Config.Telein.z-2, - maxZ = Config.Telein.z+2, - }, { -options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Enter Building", - distance = 5, - action = function() - SetEntityCoords(PlayerPedId(),Config.Teleout) - - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - - }, - }, -}) -exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "teleinweedout", - heading = 11.0, - debugPoly = false, - minZ = Config.Teleout.z-2, - maxZ = Config.Teleout.z+2, - }, { -options = { - { - name = 'teleout', - icon = "fas fa-sign-in-alt", - label = "Exit Building", - distance = 5, - action = function() - SetEntityCoords(PlayerPedId(),Config.Telein) - - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - - }, - }, -}) -if Config.Crafting then -else -exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "MakeButter", - heading = 11.0, - debugPoly = false, - minZ = Config.MakeButter.z-2, - maxZ = Config.MakeButter.z+2, - }, { -options = { - { - name = 'butter', - icon = "fas fa-sign-in-alt", - label = "Make Butter", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Canna Butter", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebutter") - ClearPedTasks(PlayerPedId()) - else - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - { - name = 'makebrownies', - icon = "fas fa-sign-in-alt", - label = "Make Brownies", - item = "cannabutter", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Special Brownies", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebrownies") - ClearPedTasks(PlayerPedId()) - else - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - { - name = 'makecookies', - icon = "fas fa-sign-in-alt", - label = "Make Cookies", - item = "cannabutter", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Special Cookies", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makecookies") - ClearPedTasks(PlayerPedId()) - else - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - { - name = 'makechocolate', - icon = "fas fa-sign-in-alt", - label = "Make Chocolate", - item = "cannabutter", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Special Chocolate", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makechocolate") - ClearPedTasks(PlayerPedId()) - else - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - { - name = 'makemuffin', - icon = "fas fa-sign-in-alt", - label = "Make Muffin", - item = "cannabutter", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Special Muffin", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makemuffin") - ClearPedTasks(PlayerPedId()) - else - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if Config.Joblock then - if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then - return true end - else - return true end end, - }, - }, -}) -end -exports['qb-target']:AddBoxZone("makeoil",Config.MakeOil,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "makeoil", - heading = 11.0, - debugPoly = false, - minZ = Config.MakeOil.z-2, - maxZ = Config.MakeOil.z+2, - }, { -options = { - { - name = 'Oil', - icon = "fas fa-sign-in-alt", - label = "Make Oil", - action = function() - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Wax Oil", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeoil") - ClearPedTasks(PlayerPedId()) - else - local explosion = math.random(1,100) - local loc = GetEntityCoords(PlayerPedId()) - if explosion <= 99 then - AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true) - exploded = true - QBCore.Functions.Notify("Stove Is Too Hot Wait 30 Seconds To Cool Down", "error") - Wait(1000 * 30) - exploded = nil - end - ClearPedTasks(PlayerPedId()) - end - end, 3, 8) -- NumberOfCircles, - end) - end, - canInteract = function() - if exploded == nil then return true end - end, - }, - }, -}) -end) - -CreateThread(function() - BikerWeedFarm = exports['bob74_ipl']:GetBikerWeedFarmObject() - BikerWeedFarm.Style.Set(BikerWeedFarm.Style.upgrade) - BikerWeedFarm.Security.Set(BikerWeedFarm.Security.upgrade) - BikerWeedFarm.Details.Enable(BikerWeedFarm.Details.chairs, true) - BikerWeedFarm.Details.Enable({BikerWeedFarm.Details.production, BikerWeedFarm.Details.chairs, BikerWeedFarm.Details.drying}, true) - BikerWeedFarm.Plant1.Clear(false) - BikerWeedFarm.Plant2.Clear(false) - BikerWeedFarm.Plant3.Clear(false) - BikerWeedFarm.Plant4.Clear(false) - BikerWeedFarm.Plant5.Clear(false) - BikerWeedFarm.Plant6.Clear(false) - BikerWeedFarm.Plant7.Clear(false) - BikerWeedFarm.Plant8.Clear(false) - BikerWeedFarm.Plant9.Clear(false) - RefreshInterior(BikerWeedFarm.interiorId) - stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false) - SetEntityHeading(stove, 270.00) - FreezeEntityPosition(stove, true) - stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false) - SetEntityHeading(stove2, 90.00) - FreezeEntityPosition(stove2, true) -end) - -RegisterNetEvent('md-drugs:client:bluntwraps', function(args) - lib.registerContext({ - id = 'bluntroll', - title = 'Blunt Types', - menu = 'bluntroll', - options = { - { - title = 'Roll Blunt', - description = 'Roll A Regular Blunt', - icon = 'check', - serverEvent = 'md-drugs:server:rollblunt', - }, - { - title = 'Dip Blunt Wrap In Lean', - description = 'Roll A Lean Blunt', - icon = 'check', - serverEvent = 'md-drugs:server:rollleanblunt', - }, - { - title = 'Dip Blunt Wrap In Dextro', - description = 'Roll A Dextro Blunt', - icon = 'check', - serverEvent = 'md-drugs:server:rolldextroblunt', - }, - { - title = 'Roll A Chewy Blunt', - description = 'Roll A Chewy Blunt', - icon = 'check', - serverEvent = 'md-drugs:server:rollchewyblunt', - }, - }, - }) - - lib.showContext('bluntroll') -end) - -RegisterNetEvent("md-drugs:client:rollanim", function() -exports["rpemotes"]:EmoteCommandStart('uncuff', 0) -Wait(4000) -exports["rpemotes"]:EmoteCancel(forceCancel) -end) - - - -RegisterNetEvent("md-drugs:client:dodabs", function() -exports["rpemotes"]:EmoteCommandStart('bong2', 0) -AlienEffect() -end) - -RegisterNetEvent("md-drugs:client:edibles", function() - QBCore.Functions.Progressbar("use_lsd", "Eating Edibles", 1750, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - }, { - animDict = "mp_suicide", - anim = "pill", - flags = 49, - }, {}, {}, function() -AlienEffect() -ClearPedTasks(PlayerPedId()) -end) -end) - -CreateThread(function() -local WeedShop = {} -local current = "u_m_m_jesus_01" -lib.requestModel(current, timeout) -local CurrentLocation = vector3(1030.46, -3203.63, -38.2) - WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false) - FreezeEntityPosition(WeedGuy, true) - SetEntityInvincible(WeedGuy, true) - SetEntityHeading(WeedGuy, 270.0) - exports['qb-target']:AddTargetEntity(WeedGuy, { - options = { - { - label = "Weed Shop", - icon = "fas fa-eye", - action = function() - lib.showContext('WeedShop') - end, - - }, - } - - }) -for k, v in pairs (Config.Weed.items) do - WeedShop[#WeedShop + 1] = { - icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[v.name].image, - header = v.label, - title = v.label, - event = "md-drugs:client:WeedShop", - args = { - item = v.name, - cost = v.price, - amount = v.amount, - } - } - - lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop}) -end - -end) - -RegisterNetEvent("md-drugs:client:WeedShop", function(data) - local price = data.cost - local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price - local max = data.amount - local dialog = exports.ox_lib:inputDialog(data.item .."!", { - { type = 'select', label = "Payment Type", default = "cash", - options = { - { value = "cash"}, - { value = "bank"}, - } - }, - { type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 }, - }) - if data.cost == "Free" then data.cost = 0 end - TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost ) -end) - -RegisterNetEvent('md-drugs:client:smokeblunts', function(itemName) - exports["rpemotes"]:EmoteCommandStart('smoke', 0) - TriggerEvent("evidence:client:SetStatus", "widepupils", 300) - Wait(1000) - if itemName == "blunts" then - AlienEffect() - elseif itemName == "leanblunts" or itemName == "dextroblunts" then - EcstasyEffect() - else - TrevorEffect() - end -end) \ No newline at end of file diff --git a/client/wholesale.lua b/client/wholesale.lua deleted file mode 100644 index da24538..0000000 --- a/client/wholesale.lua +++ /dev/null @@ -1,456 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -local deliveryBlip = nil -function PoliceCallWholesale() -print " tell your devs they didnt do something" -end - -RegisterNetEvent("md-drugs:client:getloccoke") -AddEventHandler("md-drugs:client:getloccoke", function() - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if unlucky <= Config.AlertPoliceWholesale then - PoliceCallWholesale() - end - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cokesell", debugPoly = false }) - druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end) - lib.requestModel("g_m_y_famdnf_01", 500) - local current = "g_m_y_famdnf_01" - drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) - FreezeEntityPosition(drugdealer, true) - SetEntityInvincible(drugdealer, true) - exports['qb-target']:AddTargetEntity(drugdealer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - action = function() - local luck = math.random(1,100) - local ped = GetEntityCoords(PlayerPedId()) - if luck <= Config.SuccessfulChance then - TriggerEvent("md-drugs:client:successsalecoke") - else - - TriggerEvent("md-drugs:client:setupcoke") - Wait(3000) - SetUpPeds() - - end - end, - }, - }, - distance = 2.0 - }) - - -end) - - - -RegisterNetEvent("md-drugs:client:successsalecoke") -AddEventHandler("md-drugs:client:successsalecoke", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:wholesalecoke") - Citizen.Wait(4000) - - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setupcoke") -AddEventHandler("md-drugs:client:setupcoke", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - Citizen.Wait(4000) - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) -----------heroin -RegisterNetEvent("md-drugs:client:getloccrack") -AddEventHandler("md-drugs:client:getloccrack", function() - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if unlucky <= Config.AlertPoliceWholesale then - PoliceCallWholesale() - end - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cracksell", debugPoly = false }) - druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end) - lib.requestModel("g_m_y_famdnf_01", 500) - local current = "g_m_y_famdnf_01" - drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) - FreezeEntityPosition(drugdealer, true) - SetEntityInvincible(drugdealer, true) - exports['qb-target']:AddTargetEntity(drugdealer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - action = function() - local luck = math.random(1,100) - local ped = GetEntityCoords(PlayerPedId()) - if luck <= Config.SuccessfulChance then - TriggerEvent("md-drugs:client:successsalecrack") - else - - TriggerEvent("md-drugs:client:setupcrack") - Wait(3000) - SetUpPeds() - - end - end, - }, - }, - distance = 2.0 - }) - - -end) - - - -RegisterNetEvent("md-drugs:client:successsalecrack") -AddEventHandler("md-drugs:client:successsalecrack", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:wholesalecrack") - Citizen.Wait(4000) - - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setupcrack") -AddEventHandler("md-drugs:client:setupcrack", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - Citizen.Wait(4000) - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) ------------------------------ heroin -RegisterNetEvent("md-drugs:client:getlocheroin") -AddEventHandler("md-drugs:client:getlocheroin", function() - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if unlucky <= Config.AlertPoliceWholesale then - PoliceCallWholesale() - end - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "heroinsell", debugPoly = false }) - druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end) - lib.requestModel("g_m_y_famdnf_01", 500) - local current = "g_m_y_famdnf_01" - drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) - FreezeEntityPosition(drugdealer, true) - SetEntityInvincible(drugdealer, true) - exports['qb-target']:AddTargetEntity(drugdealer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - action = function() - local luck = math.random(1,100) - local ped = GetEntityCoords(PlayerPedId()) - if luck <= Config.SuccessfulChance then - TriggerEvent("md-drugs:client:successsaleheroin") - else - - TriggerEvent("md-drugs:client:setupheroin") - Wait(3000) - SetUpPeds() - - end - end, - }, - }, - distance = 2.0 - }) - - - -end) - - - -RegisterNetEvent("md-drugs:client:successsaleheroin") -AddEventHandler("md-drugs:client:successsaleheroin", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:wholesaleheroin") - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setupheroin") -AddEventHandler("md-drugs:client:setupheroin", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) ---------------------------- lsd -RegisterNetEvent("md-drugs:client:getloclsd") -AddEventHandler("md-drugs:client:getloclsd", function() - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if unlucky <= Config.AlertPoliceWholesale then - PoliceCallWholesale() - end - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "lsdsell", debugPoly = false }) - druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end) - lib.requestModel("g_m_y_famdnf_01", 500) - local current = "g_m_y_famdnf_01" - drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) - FreezeEntityPosition(drugdealer, true) - SetEntityInvincible(drugdealer, true) - exports['qb-target']:AddTargetEntity(drugdealer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - action = function() - local luck = math.random(1,100) - local ped = GetEntityCoords(PlayerPedId()) - if luck <= Config.SuccessfulChance then - TriggerEvent("md-drugs:client:successsalelsd") - else - - TriggerEvent("md-drugs:client:setuplsd") - Wait(3000) - SetUpPeds() - end - end, - }, - }, - distance = 2.0 - }) - - - -end) - - -RegisterNetEvent("md-drugs:client:successsalelsd") -AddEventHandler("md-drugs:client:successsalelsd", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:wholesalelsd") - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setuplsd") -AddEventHandler("md-drugs:client:setuplsd", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) -------------------------- xtc -RegisterNetEvent("md-drugs:client:getlocxtc") -AddEventHandler("md-drugs:client:getlocxtc", function() - local unlucky = math.random(1,100) - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] - local unluck = math.random(1,100) - if deliveryBlip ~= nil then - RemoveBlip(deliveryBlip) - end - if unlucky <= Config.AlertPoliceWholesale then - PoliceCallWholesale() - end - deliveryBlip = AddBlipForCoord(CurrentLocation) - SetBlipSprite(deliveryBlip, 1) - SetBlipDisplay(deliveryBlip, 2) - SetBlipScale(deliveryBlip, 1.0) - SetBlipAsShortRange(deliveryBlip, false) - SetBlipColour(deliveryBlip, 27) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName("drug Meet") - EndTextCommandSetBlipName(deliveryBlip) - SetBlipRoute(deliveryBlip, true) - druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "xtcsell", debugPoly = false }) - druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end) - lib.requestModel("g_m_y_famdnf_01", 500) - local current = "g_m_y_famdnf_01" - drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) - FreezeEntityPosition(drugdealer, true) - SetEntityInvincible(drugdealer, true) - exports['qb-target']:AddTargetEntity(drugdealer, { - options = { - { - type = "client", - label = "Talk To Buyer", - icon = "fas fa-eye", - action = function() - local luck = math.random(1,100) - local ped = GetEntityCoords(PlayerPedId()) - if luck <= Config.SuccessfulChance then - TriggerEvent("md-drugs:client:successsalextc") - else - - TriggerEvent("md-drugs:client:setupxtc") - Wait(3000) - SetUpPeds() - - end - end, - }, - }, - distance = 2.0 - }) - - - -end) - - -RegisterNetEvent("md-drugs:client:successsalextc") -AddEventHandler("md-drugs:client:successsalextc", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - TriggerServerEvent("md-drugs:server:wholesalextc") - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) - -RegisterNetEvent("md-drugs:client:setupxtc") -AddEventHandler("md-drugs:client:setupxtc", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) -QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - ClearPedTasks(PlayerPedId()) - - DeleteEntity(drugdealer) - ClearPedTasks(PlayerPedId()) - end) -end) diff --git a/client/xtc.lua b/client/xtc.lua deleted file mode 100644 index df46eff..0000000 --- a/client/xtc.lua +++ /dev/null @@ -1,915 +0,0 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -RegisterNetEvent("md-drugs:client:setpressquad") -AddEventHandler("md-drugs:client:setpressquad", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - Wait(4000) - ClearPedTasks(PlayerPedId()) - quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - PlaceObjectOnGroundProperly(quadpress) - if Config.Crafting then - exports['qb-target']:AddTargetEntity(quadpress, { - options = { - { - event = "md-drugs:client:craftingmenu", - icon = 'fas fa-eye', - label = 'Press Pills', - craft = Config.Craft.quadpress, - - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(quadpress) then - TriggerServerEvent("md-drugs:server:getquadpressback") - end - end - }, - } - }) - else - exports['qb-target']:AddTargetEntity(quadpress, { - options = { - { - event = "md-drugs:client:makextcquad", - icon = 'fas fa-eye', - label = 'Make White quad Stack', - - }, - { - event = "md-drugs:client:makeredxtcquad", - icon = 'fas fa-eye', - label = 'Make Red quad Stack', - - }, - { - event = "md-drugs:client:makeorangextcquad", - icon = 'fas fa-eye', - label = 'Make orange quad Stack', - }, - { - event = "md-drugs:client:makebluextcquad", - icon = 'fas fa-eye', - label = 'Make blue quad Stack', - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(quadpress) then - TriggerServerEvent("md-drugs:server:getquadpressback") - end - end - }, - } - }) -end -end) - -RegisterNetEvent("md-drugs:client:setpresstriple") -AddEventHandler("md-drugs:client:setpresstriple", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - Wait(4000) - ClearPedTasks(PlayerPedId()) - triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - PlaceObjectOnGroundProperly(triplepress) - if Config.Crafting then - exports['qb-target']:AddTargetEntity(triplepress, { - options = { - { - event = "md-drugs:client:craftingmenu", - icon = 'fas fa-eye', - label = 'Press Pills', - craft = Config.Craft.triplepress, - - }, - { - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(triplepress) then - TriggerServerEvent("md-drugs:server:gettriplepressback") - end - end - }, - } - }) - else - exports['qb-target']:AddTargetEntity(triplepress, { - options = { - { - event = "md-drugs:client:makextctriple", - icon = 'fas fa-eye', - label = 'Make White triple Stack', - }, - { - event = "md-drugs:client:makeredxtctriple", - icon = 'fas fa-eye', - label = 'Make Red triple Stack', - }, - { - event = "md-drugs:client:makeorangextctriple", - icon = 'fas fa-eye', - label = 'Make orange triple Stack', - }, - { - event = "md-drugs:client:makebluextctriple", - icon = 'fas fa-eye', - label = 'Make blue triple Stack', - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(triplepress) then - TriggerServerEvent("md-drugs:server:gettriplepressback") - end - end - }, - } - }) - end -end) - -RegisterNetEvent("md-drugs:client:setpressdual") -AddEventHandler("md-drugs:client:setpressdual", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - Wait(4000) - ClearPedTasks(PlayerPedId()) - dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - PlaceObjectOnGroundProperly(dualpress) - if Config.Crafting then - exports['qb-target']:AddTargetEntity(dualpress, { - options = { - { - event = "md-drugs:client:craftingmenu", - icon = 'fas fa-eye', - label = 'Press Pills', - craft = Config.Craft.dualpress, - - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(dualpress) then - TriggerServerEvent("md-drugs:server:getdualpressback") - end - end - }, - } - }) - else - exports['qb-target']:AddTargetEntity(dualpress, { - options = { - { - event = "md-drugs:client:makextcdual", - icon = 'fas fa-eye', - label = 'Make White dual Stack', - - }, - { - event = "md-drugs:client:makeredxtcdual", - icon = 'fas fa-eye', - label = 'Make Red dual Stack', - - }, - { - event = "md-drugs:client:makeorangextcdual", - icon = 'fas fa-eye', - label = 'Make orange dual Stack', - - }, - { - event = "md-drugs:client:makebluextcdual", - icon = 'fas fa-eye', - label = 'Make blue dual Stack', - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(dualpress) then - TriggerServerEvent("md-drugs:server:getdualpressback") - end - end - }, - } - }) -end -end) - -RegisterNetEvent("md-drugs:client:setpresssingle") -AddEventHandler("md-drugs:client:setpresssingle", function() -local PedCoords = GetEntityCoords(PlayerPedId()) - exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - Wait(4000) - ClearPedTasks(PlayerPedId()) - singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) - PlaceObjectOnGroundProperly(singlepress) - if Config.Crafting then - exports['qb-target']:AddTargetEntity(singlepress, { - options = { - { - event = "md-drugs:client:craftingmenu", - icon = 'fas fa-eye', - label = 'Press Pills', - craft = Config.Craft.singlepress, - - }, - { - event = "md-drugs:client:getsinglepressback", - icon = "fas fa-eye", - label = "Pick Up", - }, - } - }) - else - exports['qb-target']:AddTargetEntity(singlepress, { - options = { - { - event = "md-drugs:client:makextcsingle", - icon = 'fas fa-eye', - label = 'Make White Single Stack', - - }, - { - event = "md-drugs:client:makeredxtcsingle", - icon = 'fas fa-eye', - label = 'Make Red Single Stack', - - }, - { - event = "md-drugs:client:makeorangextcsingle", - icon = 'fas fa-eye', - label = 'Make orange Single Stack', - - }, - { - event = "md-drugs:client:makebluextcsingle", - icon = 'fas fa-eye', - label = 'Make blue Single Stack', - - }, - { - - icon = "fas fa-eye", - label = "Pick Up", - action = function() - if DeleteObject(singlepress) then - TriggerServerEvent("md-drugs:server:getsinglepressback") - end - end - }, - } - }) -end -end) - -RegisterNetEvent("md-drugs:client:getsinglepressback") -AddEventHandler("md-drugs:client:getsinglepressback", function() -DeleteObject(singlepress) -TriggerServerEvent("md-drugs:server:getsinglepressback") -ClearPedTasks(PlayerPedId()) -end) - -RegisterNetEvent("md-drugs:client:getdualpressback") -AddEventHandler("md-drugs:client:getdualpressback", function() -DeleteObject(dualpress) -TriggerServerEvent("md-drugs:server:getdualpressback") -ClearPedTasks(PlayerPedId()) -end) - -RegisterNetEvent("md-drugs:client:gettriplepressback") -AddEventHandler("md-drugs:client:gettriplepressback", function() -DeleteObject(triplepress) -TriggerServerEvent("md-drugs:server:gettriplepressback") -ClearPedTasks(PlayerPedId()) -end) - -RegisterNetEvent("md-drugs:client:getquadpressback") -AddEventHandler("md-drugs:client:getquadpressback", function() -DeleteObject(quadpress) -TriggerServerEvent("md-drugs:server:getquadpressback") -ClearPedTasks(PlayerPedId()) -end) - -RegisterNetEvent("md-drugs:client:stealisosafrole") -AddEventHandler("md-drugs:client:stealisosafrole", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stealisosafrole") - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:stealmdp2p") -AddEventHandler("md-drugs:client:stealmdp2p", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stealmdp2p") - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makingrawxtc") -AddEventHandler("md-drugs:client:makingrawxtc", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makingrawxtc") - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) ----------------------------- unstamped just xtc -RegisterNetEvent("md-drugs:client:makextcsingle") -AddEventHandler("md-drugs:client:makextcsingle", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makextcsingle") - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - ClearPedTasks(PlayerPedId()) - end -end, 4, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makextcdual") -AddEventHandler("md-drugs:client:makextcdual", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makextcdual") - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 3, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makextctriple") -AddEventHandler("md-drugs:client:makextctriple", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makextctriple") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makextcquad") -AddEventHandler("md-drugs:client:makextcquad", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makextcquad") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) -------------------------------------------------- -RegisterNetEvent("md-drugs:client:makeredxtcsingle") -AddEventHandler("md-drugs:client:makeredxtcsingle", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeredxtcsingle") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 4, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeredxtcdual") -AddEventHandler("md-drugs:client:makeredxtcdual", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeredxtcdual") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 3, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeredxtctriple") -AddEventHandler("md-drugs:client:makeredxtctriple", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeredxtctriple") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeredxtcquad") -AddEventHandler("md-drugs:client:makeredxtcquad", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeredxtcquad") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) ---------------------------------------------------------------- making orange unstamped -RegisterNetEvent("md-drugs:client:makeorangextcsingle") -AddEventHandler("md-drugs:client:makeorangextcsingle", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeorangextcsingle") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 4, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeorangextcdual") -AddEventHandler("md-drugs:client:makeorangextcdual", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeorangextcdual") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 3, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeorangextctriple") -AddEventHandler("md-drugs:client:makeorangextctriple", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeorangextctriple") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makeorangextcquad") -AddEventHandler("md-drugs:client:makeorangextcquad", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makeorangextcquad") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) ---------------------------------------- blue unstamped -RegisterNetEvent("md-drugs:client:makebluextcsingle") -AddEventHandler("md-drugs:client:makebluextcsingle", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebluextcsingle") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 4, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makebluextcdual") -AddEventHandler("md-drugs:client:makebluextcdual", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebluextcdual") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 3, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makebluextctriple") -AddEventHandler("md-drugs:client:makebluextctriple", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebluextctriple") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:makebluextcquad") -AddEventHandler("md-drugs:client:makebluextcquad", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:makebluextcquad") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 1, 8) -- NumberOfCircles, MS - end) -end) ------------------------------------------------------------------- Stamping -RegisterNetEvent("md-drugs:client:stampwhite") -AddEventHandler("md-drugs:client:stampwhite", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stampwhite") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:stampred") -AddEventHandler("md-drugs:client:stampred", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stampred") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:stamporange") -AddEventHandler("md-drugs:client:stamporange", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stamporange") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:stampblue") -AddEventHandler("md-drugs:client:stampblue", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - exports['ps-ui']:Circle(function(success) - if success then - TriggerServerEvent("md-drugs:server:stampblue") - - ClearPedTasks(PlayerPedId()) - else - QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") - - ClearPedTasks(PlayerPedId()) - end -end, 2, 8) -- NumberOfCircles, MS - end) -end) - -RegisterNetEvent("md-drugs:client:getsinglepress") -AddEventHandler("md-drugs:client:getsinglepress", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:buypress") - ClearPedTasks(PlayerPedId()) - - end) -end) -RegisterNetEvent("md-drugs:client:exchangepresses") -AddEventHandler("md-drugs:client:exchangepresses", function() -exports["rpemotes"]:EmoteCommandStart("uncuff", 0) - QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, { - disableMovement = false, - disableCarMovement = false, - disableMouse = false, - disableCombat = true, - disableInventory = true, - }, {}, {}, {}, function()-- Done - TriggerServerEvent("md-drugs:server:upgradepress") - ClearPedTasks(PlayerPedId()) - - end) -end) -RegisterNetEvent("md-drugs:client:buypress") -AddEventHandler("md-drugs:client:buypress", function() - lib.registerContext({ - id = 'buypresses', - title = 'Purchase Presses', - options = { - - { - title = 'Single Press', - description = 'Buy a single press for 20k', - icon = "fa-solid fa-wallet", - event = 'md-drugs:client:getsinglepress', - }, - { - title = 'Exchange Single For Dual', - description = '20 of each unstamped single stack pill and your single press ', - icon = "fa-solid fa-wallet", - event = 'md-drugs:client:exchangepresses', - }, - { - title = 'Exchange Dual For Triple', - description = '50 of each unstamped dual stack pill and your dual press ', - icon = "fa-solid fa-wallet", - event = 'md-drugs:client:exchangepresses', - }, - { - title = 'Exchange Triple For Quad', - description = '150 of each unstamped Triple stack pill and your triple press ', - icon = "fa-solid fa-wallet", - event = 'md-drugs:client:exchangepresses', - } - } - }) - lib.showContext('buypresses') -end) - -