162 Commits
Author SHA1 Message Date
Mustache Dom 009b0a4f4a Update cocaine.lua 2024-09-23 05:07:59 -07:00
Mustache Dom ed5221f318 Update cocaine.lua 2024-09-22 11:21:27 -07:00
Mustache Dom d7c06ac006 Update cocaine.lua 2024-09-17 13:01:46 -07:00
Mustache Dom 4db34e5f50 Update cocaine.lua 2024-09-17 13:01:17 -07:00
Mustache Dom a8633c2884 Update cocaine.lua 2024-08-29 12:17:22 -07:00
Mustache Dom 3981e92b3c Update cocaine.lua 2024-08-29 11:36:48 -07:00
Mustache Dom 8baa05a5ea Update ox_inventory.txt 2024-08-28 20:07:13 -07:00
Mustache Dom 3eb4cd35dc Update cocaine.lua 2024-08-28 16:57:22 -07:00
Mustache Dom bf40a0e864 Update cocaine.lua 2024-08-28 16:56:08 -07:00
Mustache Dom 07fb3caf24 Update cocaine.lua 2024-08-26 15:51:04 -07:00
Mustache Dom e07ab23761 Update cocaine.lua 2024-08-26 15:50:15 -07:00
Mustache Dom c9f4e8114b Update cocaine.lua 2024-08-26 15:49:35 -07:00
Mustache Dom 7e2b23b9bd Update weed.lua 2024-08-05 19:30:47 -07:00
Mustache Dom 4d5bb1fa86 Update weed.lua 2024-08-05 19:02:41 -07:00
Mustache Dom fd7cb1d201 Update weed.lua 2024-08-01 14:05:19 -07:00
Mustache Dom 60f3f6aa75 Update shrooms.lua 2024-08-01 14:04:34 -07:00
Mustache Dom 7bffb7b3b5 Update mescaline.lua 2024-08-01 14:04:09 -07:00
Mustache Dom ba89fd2aaf Update heroin.lua 2024-08-01 14:03:46 -07:00
Mustache Dom 2523e0a596 Update cocaine.lua 2024-08-01 14:03:17 -07:00
Mustache Dom cd7a6fb8bd Update weed.lua 2024-07-27 11:05:50 -07:00
Mustache Dom d1c8cc6b96 Update functions.lua 2024-07-21 21:51:57 -07:00
Mustache Dom de028bffc9 Add files via upload 2024-07-21 21:45:19 -07:00
Mustache Dom 48d5c6928a Add files via upload 2024-07-21 21:45:06 -07:00
Mustache Dom 1070a3d1a8 Update weed.lua 2024-07-21 19:30:20 -07:00
Mustache Dom 1af114dd24 Update cornerselling.lua 2024-07-20 10:59:02 -07:00
Mustache Dom 5c8076c651 Update functions.lua 2024-07-19 13:48:14 -07:00
Mustache Dom 84e890b232 Update patchnotes.txt 2024-07-19 10:29:34 -07:00
Mustache Dom 0790590c3b Update cornerselling.lua 2024-07-19 10:28:34 -07:00
Mustache Dom ff87eb3f61 Update fxmanifest.lua 2024-07-19 10:28:18 -07:00
Mustache Dom 45192684da Update version.txt 2024-07-19 10:27:25 -07:00
Mustache Dom e4e7450d7a Update readme.md 2024-07-19 01:57:14 -07:00
Mustache Dom 5b2e87412f Update readme.md 2024-07-19 00:11:11 -07:00
Mustache Dom ea665fe8fc Merge pull request #48 from iplayer1337fivem/patch-1
Create danish.lua
2024-07-17 11:05:58 -07:00
ARottenberger 99c2f2d212 Create danish.lua 2024-07-17 09:33:25 +02:00
Mustache Dom 9f0c556636 Update patchnotes.txt 2024-07-17 00:16:23 -07:00
Mustache Dom 07c6a9be94 Update fxmanifest.lua 2024-07-17 00:15:41 -07:00
Mustache Dom 2b18444fd9 Update version.txt 2024-07-16 18:40:10 -07:00
Mustache Dom 322c1e3905 Update functions.lua 2024-07-16 18:09:00 -07:00
Mustache Dom 3d124f124f Update readme.md 2024-07-16 14:43:05 -07:00
Mustache Dom 14963167be Update functions.lua 2024-07-16 14:36:52 -07:00
Mustache Dom 495379ef0c Update functions.lua 2024-07-16 14:34:08 -07:00
Mustache Dom 5116260203 Update functions.lua 2024-07-16 14:32:04 -07:00
Mustache Dom b20b1cec4c Update readme.md 2024-07-16 14:26:58 -07:00
Mustache Dom 13d9ce8ea7 Update readme.md 2024-07-16 14:26:24 -07:00
Mustache Dom 6209b7c82e Update readme.md 2024-07-16 14:23:49 -07:00
Mustache Dom c2b92c4944 Update readme.md 2024-07-16 14:23:16 -07:00
Mustache Dom d78cce3b10 Update readme.md 2024-07-16 14:22:19 -07:00
Mustache Dom 1f9f8b3dfd Update readme.md 2024-07-16 14:21:36 -07:00
Mustache Dom 1ed514bfb7 Update readme.md 2024-07-16 14:18:33 -07:00
Mustache Dom 24b94ccc82 Update readme.md 2024-07-16 14:17:52 -07:00
Mustache Dom f2b26ac889 Update readme.md 2024-07-16 14:17:27 -07:00
Mustache Dom 3d144cae58 Added integration for Fivemerr
if you want to use the logs go to line 3 of server/functions.lua and turn to true, then inside of your server.cfg add this 

```
set fivemerrLogs "API_KEY"
```
obviously replace the API_KEY with your api key
2024-07-16 14:14:48 -07:00
Mustache Dom 7aa929670e Update ox_inventory.txt 2024-07-11 23:32:45 -07:00
Mustache Dom 19ca790456 Update patchnotes.txt 2024-07-11 22:13:14 -07:00
Mustache Dom 8b9b05ef95 Update readme.md 2024-07-11 17:58:10 -07:00
Mustache Dom c710826c14 Update readme.md 2024-07-11 17:52:33 -07:00
Mustache Dom 3eff5ab23f Update fxmanifest.lua 2024-07-11 17:47:18 -07:00
Mustache Dom 6e77e15f6e Update version.txt 2024-07-11 17:47:05 -07:00
Mustache Dom cdf13e5108 Update weed.lua 2024-07-11 17:46:33 -07:00
Mustache Dom 971168c9b6 Update travellingmerchant.lua 2024-07-11 17:45:55 -07:00
Mustache Dom 6554b253d9 Update shrooms.lua 2024-07-11 17:45:21 -07:00
Mustache Dom 323d12ad31 Update oxyruns.lua 2024-07-11 17:44:48 -07:00
Mustache Dom c4f3320d96 Update meth.lua 2024-07-11 17:44:08 -07:00
Mustache Dom cf41e75bb1 Update mescaline.lua 2024-07-11 17:43:41 -07:00
Mustache Dom 0ce4e27a60 Update lsd.lua 2024-07-11 17:42:50 -07:00
Mustache Dom 192e8c9d64 Update lean.lua 2024-07-11 17:42:05 -07:00
Mustache Dom 62ee319c12 Update heroin.lua 2024-07-11 17:41:52 -07:00
Mustache Dom 856ec769a5 Update deliveries.lua 2024-07-11 17:41:05 -07:00
Mustache Dom 6aea184058 Update cocaine.lua 2024-07-11 17:40:27 -07:00
Mustache Dom b6b4776ab2 added a lot
moved some functions around, added better ox inv options so no longer requires items in qb-core 
changed call backs to oxlib callbacks
cried twice
added new func
2024-07-11 17:39:58 -07:00
Mustache Dom 5448eabd87 Update functions.lua 2024-07-10 16:21:34 -07:00
Mustache Dom 661d5148b7 Update consumables.lua 2024-07-09 17:07:20 -07:00
Mustache Dom c3f318e3b4 Update weed.lua 2024-07-07 14:21:03 -07:00
Mustache Dom 2412f2b58e Update ox_inventory.txt 2024-07-06 15:25:57 -07:00
Mustache Dom 1301fca83a Update deliveries.lua 2024-07-06 15:25:13 -07:00
Mustache Dom 20b89b2324 Update weed.lua 2024-07-06 15:24:18 -07:00
Mustache Dom 35b0d69332 Update travellingmerchant.lua 2024-07-06 15:23:25 -07:00
Mustache Dom e21b4e11d5 Update functions.lua 2024-07-06 15:22:39 -07:00
Mustache Dom 8690348917 Update functions.lua 2024-07-06 15:19:20 -07:00
Mustache Dom 26e5f29343 Merge pull request #46 from HavekHD/main
Clean up readme and add ox_inventory items
2024-07-06 15:19:00 -07:00
HavekHD 66414de241 Merge installation items into one items_install folder. Added ox_inventory item names. Cleaned up readme to match new folders 2024-07-04 00:27:02 -05:00
Mustache Dom c7192ff2e2 Update functions.lua 2024-06-30 17:35:26 -07:00
Mustache Dom 22b054b681 Update patchnotes.txt 2024-06-30 17:19:45 -07:00
Mustache Dom 089f543d1b Update version.txt 2024-06-30 17:16:49 -07:00
Mustache Dom 3e2a0ad6c7 Update fxmanifest.lua 2024-06-30 17:16:32 -07:00
Mustache Dom ccfdb2ddcd Update fxmanifest.lua 2024-06-30 17:16:10 -07:00
Mustache Dom fed8cf2804 Update functions.lua 2024-06-29 18:59:36 -07:00
Mustache Dom 930c1e5518 Update functions.lua 2024-06-29 13:18:27 -07:00
Mustache Dom 4d9b613823 Update readme.md 2024-06-28 14:13:27 -07:00
Mustache Dom 0f7698f4df Update readme.md 2024-06-22 14:49:46 -07:00
Mustache Dom 2ba13f91f3 Update patchnotes.txt 2024-06-20 18:48:11 -07:00
Mustache Dom 315c96b3c9 Update version.txt 2024-06-20 18:47:06 -07:00
Mustache Dom 66ee2d2652 Update functions.lua 2024-06-20 18:46:51 -07:00
Mustache Dom 4d4c45d99e Update functions.lua 2024-06-20 18:42:52 -07:00
Mustache Dom f8bb79b640 Update deliveries.lua 2024-06-19 10:54:06 -07:00
Mustache Dom 10aa94e876 Update deliveries.lua 2024-06-18 12:23:47 -07:00
Mustache Dom 15aa6f6ecb Update deliveries.lua 2024-06-18 12:22:53 -07:00
Mustache Dom 1ed82e4675 Update functions.lua 2024-06-16 12:03:20 -07:00
Mustache Dom 222d5051d2 Update functions.lua 2024-06-13 22:12:37 -07:00
Mustache Dom 99e8afe653 Update functions.lua 2024-06-03 19:51:30 -07:00
Mustache Dom 9472271377 Update xtc.lua 2024-05-25 21:46:14 -07:00
Mustache Dom dacabc74fc Update xtc.lua 2024-05-25 21:18:04 -07:00
Mustache Dom 1afd23f63f Update xtc.lua 2024-05-25 20:54:20 -07:00
Mustache Dom 2494cbc06d Update readme.md 2024-05-18 14:08:25 -07:00
Mustache Dom dea70fab75 Update readme.md 2024-05-18 14:07:58 -07:00
Mustache Dom a420e8da7e Update readme.md 2024-05-18 14:07:24 -07:00
Mustache Dom 6bcdb88420 Update readme.md 2024-05-18 14:02:46 -07:00
Mustache Dom df702096ad Update readme.md 2024-05-18 14:01:26 -07:00
Mustache Dom d98e85d098 Delete v2tov3readme.md 2024-05-18 13:55:29 -07:00
Mustache Dom 0dabc3f1d0 Update patchnotes.txt 2024-05-18 13:53:51 -07:00
Mustache Dom cf5ed55d29 Update weed.lua 2024-05-18 13:53:01 -07:00
Mustache Dom cb07be424c Update patchnotes.txt 2024-05-18 13:44:23 -07:00
Mustache Dom 9d76824013 Update fxmanifest.lua 2024-05-18 13:40:22 -07:00
Mustache Dom 0f99ac0baf Update version.txt 2024-05-18 13:40:04 -07:00
Mustache Dom f9beb11ddc Update weed.lua 2024-05-18 13:38:53 -07:00
Mustache Dom 8bb07e7452 Update travellingmerchant.lua 2024-05-18 13:38:24 -07:00
Mustache Dom e5cf612a29 updated img population to auto do it 2024-05-18 13:37:53 -07:00
Mustache Dom a015846e78 Update config.lua 2024-05-18 13:36:48 -07:00
Mustache Dom 5a7e10c33f Update functions.lua 2024-05-18 13:36:22 -07:00
Mustache Dom 34d21c3618 added autocheck for what inventory youre using to populate imgs 2024-05-18 13:35:51 -07:00
Mustache Dom e23e8c23ab Update pharma.lua 2024-05-18 13:18:25 -07:00
Mustache Dom 8155ace51e Update wholesale.lua 2024-05-18 03:40:10 -07:00
Mustache Dom 679d140ae7 Update pharma.lua 2024-05-17 18:30:24 -07:00
Mustache Dom 992b5d7b26 Update pharma.lua 2024-05-17 18:27:56 -07:00
Mustache Dom ab8510e302 Update meth.lua 2024-05-14 11:35:28 -07:00
Mustache Dom 48824f099f Create patchnotes.txt 2024-05-13 13:44:22 -07:00
Mustache Dom 7bd55bf1e7 Update version.txt 2024-05-13 13:43:15 -07:00
Mustache Dom 3725ea1121 Update fxmanifest.lua 2024-05-13 13:42:56 -07:00
Mustache Dom 029db21ca3 Update config.lua 2024-05-13 13:42:36 -07:00
Mustache Dom b682a9310d Update functions.lua 2024-05-13 13:42:10 -07:00
Mustache Dom 3549e4afaa Update cocaine.lua 2024-05-13 00:13:16 -07:00
Mustache Dom 1e06afa926 Update functions.lua 2024-05-12 00:22:09 -07:00
Mustache Dom 598e16965e Update functions.lua 2024-05-11 17:10:56 -07:00
Mustache Dom 1b7e1be9b3 Update fxmanifest.lua 2024-05-09 01:20:33 -07:00
Mustache Dom 5ffa6e9519 Update readme.md 2024-05-09 01:15:25 -07:00
Mustache Dom f7d41ddbdc Update version.txt 2024-05-08 19:28:40 -07:00
Mustache Dom 3d197eae62 Update meth.lua 2024-05-08 17:34:53 -07:00
Mustache Dom 0b020bba2e Update meth.lua 2024-05-08 17:32:57 -07:00
Mustache Dom 40ea6dbf45 Add files via upload 2024-05-08 17:22:12 -07:00
Mustache Dom 9cbf5ffeb3 Update weed.lua 2024-05-07 13:12:03 -07:00
Mustache Dom 71b8d039b8 Update weed.lua 2024-05-07 04:46:04 -07:00
Mustache Dom e80c027647 Update shrooms.lua 2024-05-07 04:27:53 -07:00
Mustache Dom f48435cd61 Update version.txt 2024-05-04 12:31:39 -07:00
Mustache Dom 722963ed38 Add files via upload 2024-05-04 12:19:38 -07:00
Mustache Dom c0a0e4271e Update heroin.lua 2024-05-04 11:57:34 -07:00
Mustache Dom b9b3899e65 Update lsd.lua 2024-05-04 11:40:08 -07:00
Mustache Dom 40022048b0 Update functions.lua 2024-05-04 11:33:12 -07:00
Mustache Dom af152ee0a3 Update cornerselling.lua 2024-05-04 11:32:31 -07:00
Mustache Dom 1d7ffc938c Update cornerselling.lua 2024-05-04 10:56:00 -07:00
Mustache Dom b1eff50bc5 Update config.lua 2024-05-03 18:35:43 -07:00
Mustache Dom 3abc9c5a6a Check logic 2024-05-03 11:30:37 -07:00
Mustache Dom 5de4d32401 Check logic 2024-05-03 11:16:46 -07:00
Mustache Dom a8db1ff11d Update functions.lua 2024-05-03 00:00:39 -07:00
Mustache Dom bc83756701 Update functions.lua 2024-05-02 20:39:27 -07:00
Mustache Dom 02ac830805 Update functions.lua 2024-05-02 20:38:23 -07:00
Mustache Dom 4fef77316d Update config.lua 2024-05-02 20:05:59 -07:00
Mustache Dom 62d53b573c Update config.lua 2024-05-02 20:03:04 -07:00
Mustache Dom 00a45563ae added qs-email support 2024-05-02 20:00:54 -07:00
Mustache Dom b6c06b2ce5 Update meth.lua 2024-05-02 18:48:26 -07:00
Mustache Dom 753ac03799 Add files via upload 2024-05-02 18:36:32 -07:00
Mustache Dom e69ff1948b Add files via upload 2024-05-02 18:34:49 -07:00
Mustache Dom f9709311af Add files via upload 2024-05-02 18:34:14 -07:00
253 changed files with 7695 additions and 7842 deletions

No files matched your search

+170 -144
View File
@@ -1,4 +1,4 @@
---@diagnostic disable: param-type-mismatch
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local started = nil local started = nil
@@ -12,14 +12,15 @@ local function loadParticle(dict)
SetPtfxAssetNextCall(dict) SetPtfxAssetNextCall(dict)
end end
function MethCooking() function MethCooking()
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
lib.requestAnimDict(animDict, 500) lib.requestAnimDict(animDict, 500)
dict = "scr_fbi5a" dict = "scr_ornate_heist"
local ped = PlayerPedId() local ped = PlayerPedId()
SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524)) SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524))
Wait(1) Wait(1)
local targetPosition = GetEntityCoords(ped) local targetPosition = GetEntityCoords(ped)
local animDuration = GetAnimDuration(animDict, animName) * 800 local animDuration = GetAnimDuration(animDict, animName) * 800
FreezeEntityPosition(ped, true) FreezeEntityPosition(ped, true)
@@ -36,11 +37,16 @@ NetworkStopSynchronisedScene(netScene)
DeleteObject(sacid) DeleteObject(sacid)
DeleteObject(ammonia) DeleteObject(ammonia)
FreezeEntityPosition(ped, false) FreezeEntityPosition(ped, false)
loadParticle(dict) lib.requestModel('hei_prop_heist_thermite', 2000)
methflare = StartParticleFxLoopedAtCoord('scr_fbi5a_flare',vector3(1005.95, -3202.09, -37.58), 0, 0, 0, 2.0, 0, 0,0) loadParticle('scr_ornate_heist')
SetParticleFxLoopedAlpha(methflare, 1.0)
Wait(20000) local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
StopParticleFxLooped(methflare,true) FreezeEntityPosition(thermite, true)
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
Wait(1000)
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
Wait(math.random(10000, 20000))
StopParticleFxLooped(therm, true)
end end
@@ -384,8 +390,8 @@ FreezeEntityPosition(ped, false)
end end
function EcstasyEffect() function EcstasyEffect()
local startStamina = 30 local startStamina = 50
SetFlash(0, 0, 500, 7000, 500) SetFlash(0, 0, 500, 20000, 500)
while startStamina > 0 do while startStamina > 0 do
Wait(1000) Wait(1000)
startStamina = startStamina - 1 startStamina = startStamina - 1
@@ -404,7 +410,7 @@ end
function MethBagEffect() function MethBagEffect()
local startStamina = 8 local startStamina = 30
TrevorEffect() TrevorEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49) SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
while startStamina > 0 do while startStamina > 0 do
@@ -475,17 +481,15 @@ function SpawnCarPedChase()
local ped = GetEntityCoords(PlayerPedId()) local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94) local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)] local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
local search = false if started then -- checks if active
local spawnedCar = {}
if started then
else else
started = true started = true
lib.requestModel(`pounder`, Config.requestModelTime) lib.requestModel(`pounder`, Config.RequestModelTime)
lib.requestModel("ig_priest", Config.requestModelTime) lib.requestModel("ig_priest", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.requestModelTime) lib.requestModel(`cargobob3`, Config.RequestModelTime)
leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true) local 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) local 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) local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
FreezeEntityPosition(pilot2, true) FreezeEntityPosition(pilot2, true)
SetEntityInvincible(pilot2, true) SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leancar) SetEntityAsMissionEntity(leancar)
@@ -493,84 +497,87 @@ else
SetPedIntoVehicle(driver, leancar, -1) SetPedIntoVehicle(driver, leancar, -1)
SetPedFleeAttributes(driver,false) SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0) TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(driver, true) SetPedKeepTask(driver, true) -- everything above is ped/ veh spawn
exports['qb-target']:AddTargetEntity(leancar, { repeat -- repeats Wait(1000) only until
options = { Wait(1000)
{ until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0 -- either the distance is within 20 OR the driver is dead
name = 'leancar', if GetEntityHealth(driver) == 0 then -- once one of those thing ends, the loop breaks and carries on from here
icon = 'fa-solid fa-car', if Config.oxtarget then
label = 'Steal From Car', local options = {
action = function() {
local chance = math.random(1,100) name = 'leancar',
exports['ps-ui']:Circle(function(success) icon = 'fa-solid fa-car',
if success then label = 'Steal From Car',
TriggerServerEvent('md-drugs:server:givelean') onSelect = function()
started = nil if not minigame(2,8) then return end
else TriggerServerEvent('md-drugs:server:givelean')
started = nil started = nil
end if math.random(1,100) <= 30 then
end, 5, 8) DeleteVehicle(leancar)
if chance <= 30 then DeleteEntity(driver)
DeleteVehicle(leancar) DeleteEntity(pilot2)
DeleteEntity(driver) end
DeleteEntity(pilot2) end,
end }
end, }
canInteract = function() exports.ox_target:addLocalEntity(leancar, options)
if IsEntityDead(driver) then else
return true end exports['qb-target']:AddTargetEntity(leancar, {
end, options = {
} {
} name = 'leancar',
}) icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
if not minigame(2,8) then return end
TriggerServerEvent('md-drugs:server:givelean')
started = nil
if math.random(1,100) <= 30 then
DeleteVehicle(leancar)
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end,
}
}
})
end
else
repeat -- this second loop is to spawn the helicopter when the truck is in distance
Wait(1000)
until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0
Wait( 3 * 1000)
local heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000) Wait(1000)
search = true if DoesEntityExist(heli) then
CreateThread(function() SetEntityInvincible(pilot2, false)
DeleteVehicle(leancar)
while search do DeleteEntity(driver)
Wait(5000) SetEntityAsMissionEntity(heli)
if IsEntityDead(driver) == false then SetPedIntoVehicle(pilot2, heli, -1)
loc = #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
if loc < 25.0 then else
Wait( 3 * 1000) heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
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
end end
end end
function SpawnMethCarPedChase() function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId()) local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94) local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)] local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
local searchmeth = false local startedmeth = false
if startedmeth then if startedmeth then
else else
startedmeth = true startedmeth = true
lib.requestModel(`journey`, Config.requestModelTime) lib.requestModel(`journey`, Config.RequestModelTime)
lib.requestModel("a_m_m_hillbilly_02", Config.requestModelTime) lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.requestModelTime) lib.requestModel(`cargobob3`, Config.RequestModelTime)
methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true) local 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) local 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) local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
FreezeEntityPosition(methpilot, true) FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true) SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar) SetEntityAsMissionEntity(methcar)
@@ -579,69 +586,69 @@ else
SetPedFleeAttributes(methdriver,false) SetPedFleeAttributes(methdriver,false)
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0) TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(methdriver, true) SetPedKeepTask(methdriver, true)
exports['qb-target']:AddTargetEntity(methcar, { repeat
options = { Wait(1000)
{ until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
name = 'methcar', if GetEntityHealth(methdriver) == 0 then
icon = 'fa-solid fa-car', if Config.oxtarget then
label = 'Steal From Car', local options = {
action = function() {
local chance = math.random(1,100) name = 'methcar',
exports['ps-ui']:Circle(function(success) icon = 'fa-solid fa-car',
if success then label = 'Steal From Car',
TriggerServerEvent('md-drugs:server:givemethingridients') onSelect = function()
startedmeth = nil if not minigame(2,8) then return end
else TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = nil startedmeth = nil
end if math.random(1,100) <= 30 then
end, 5, 8) DeleteVehicle(methcar)
print(chance)
if chance <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver) DeleteEntity(methdriver)
DeleteEntity(methpilot) DeleteEntity(methpilot)
end end
end,
canInteract = function()
if IsEntityDead(methdriver) then
return true end
end, end,
} }
} }
}) exports.ox_target:addLocalEntity(methcar, options)
else
exports['qb-target']:AddTargetEntity(methcar, {
options = {
{
name = 'methcar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
if not minigame(2,8) then return end
TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = nil
if math.random(1,100) <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end,
}
}
})
end
else
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0
Wait( 3 * 1000)
local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000) Wait(1000)
searchmeth = true if DoesEntityExist(methheli) then
CreateThread(function() SetEntityInvincible(methpilot, false)
CreatePickUpRopeForCargobob(methheli, 1)
while searchmeth do AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0)
Wait(1000) DeleteEntity(methdriver)
local pickuploc = GetEntityCoords(methcar) SetEntityAsMissionEntity(methheli)
if IsEntityDead(methdriver) == false then SetPedIntoVehicle(methpilot, methheli, -1)
loc = #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
if loc < 25.0 then else
Wait( 3 * 1000) methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
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
end end
end end
@@ -654,6 +661,11 @@ local CokePed4 = CreatePed(0,"g_m_y_famdnf_01", ped.x+8, ped.y-12, ped.z-1, 90.0
local CokePed5 = CreatePed(0,"g_m_y_famdnf_01", ped.x+5, ped.y-2, 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 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) local CokePed7 = CreatePed(0,"g_m_y_famdnf_01", ped.x+1, ped.y-10, ped.z-1, 90.0, true, true)
AddRelationshipGroup('setups')
local peds = {CokePed, CokePed2,CokePed3, CokePed4, CokePed5,CokePed6, CokePed7}
for k, v in pairs (ped) do
SetPedRelationshipGroupDefaultHash(v, 'setups')
end
SetPedArmour(CokePed, 200) SetPedArmour(CokePed, 200)
SetPedCanSwitchWeapon(CokePed, true) SetPedCanSwitchWeapon(CokePed, true)
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true) GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
@@ -679,3 +691,17 @@ SetPedCombatAttributes(CokePed6, 46, true)
SetPedCombatAttributes(CokePed7, 46, true) SetPedCombatAttributes(CokePed7, 46, true)
end end
RegisterCommand('DrugRep', function()
if not Config.TierSystem then return end
lib.registerContext({
id = 'DrugRep',
title = 'Drug Reputation',
options = {
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..QBCore.Functions.GetPlayerData().metadata.coke},
{icon = "fa-solid fa-syringe", title = 'Heroin: '..QBCore.Functions.GetPlayerData().metadata.heroin},
{icon = "fa-solid fa-vial", title = 'LSD: '..QBCore.Functions.GetPlayerData().metadata.lsd},
{icon = "fa-solid fa-plug", title = 'Dealer: '..QBCore.Functions.GetPlayerData().metadata.dealerrep},
}
})
lib.showContext('DrugRep')
end, false)
+114 -107
View File
@@ -2,39 +2,43 @@ local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {} local CocaPlant = {}
local cuttingcoke = nil local cuttingcoke = nil
local baggingcoke = nil local baggingcoke = nil
function LoadModel(hash)
hash = GetHashKey(hash) local function pick(loc)
lib.requestModel(hash, Config.requestModelTime) if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
end end
RegisterNetEvent('coke:respawnCane', function(loc) RegisterNetEvent('coke:respawnCane', function(loc)
local v = GlobalState.CocaPlant[loc] local v = GlobalState.CocaPlant[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not CocaPlant[loc] then if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true) CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(CocaPlant[loc], true, true) Freeze(CocaPlant[loc], true, v.heading)
FreezeEntityPosition(CocaPlant[loc], true) local options = {
SetEntityHeading(CocaPlant[loc], v.heading) {
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
options = { {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "pick Cocaine", label = "pick Cocaine",
action = function() action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, { if not pick(loc) then return end
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 end
} }
}, }
distance = 3.0 local optionsox = {
}) {
icon = "fas fa-hand",
label = "pick Cocaine",
distance = 2.5,
onSelect = function()
if not pick(loc) then return end
end
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(CocaPlant[loc], optionsox)
else
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {options = options, distance = 2.5})
end
end end
end) end)
@@ -49,30 +53,33 @@ RegisterNetEvent("coke:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(CocaPlant[k], true, true) Freeze(CocaPlant[k], true, v.heading)
FreezeEntityPosition(CocaPlant[k], true) local options = {
SetEntityHeading(CocaPlant[k], v.heading) {
exports['qb-target']:AddTargetEntity(CocaPlant[k], { icon = "fas fa-hand",
options = { { label = "pick Cocaine",
icon = "fas fa-hand", action = function()
label = "pick cocaine", if not pick(k) then return end
action = function() end
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, }, local optionsox = {
{}, {}, function() {
TriggerServerEvent("coke:pickupCane", k) icon = "fas fa-hand",
ClearPedTasks(PlayerPedId()) label = "pick Cocaine",
end, function() -- Cancel distance = 2.5,
ClearPedTasks(PlayerPedId()) onSelect = function()
end) if not pick(k) then return end
end end
} }
}, }
distance = 3.0 if Config.oxtarget then
}) exports.ox_target:addLocalEntity(CocaPlant[k], optionsox)
else
exports['qb-target']:AddTargetEntity(CocaPlant[k], {options = options, distance = 2.5})
end end
end end
end
end) end)
AddEventHandler('onResourceStart', function(resource) AddEventHandler('onResourceStart', function(resource)
@@ -98,82 +105,82 @@ AddEventHandler('onResourceStop', function(resourceName)
end end
end) end)
RegisterNetEvent("md-drugs:client:makepowder") RegisterNetEvent("md-drugs:client:makepowder", function(data)
AddEventHandler("md-drugs:client:makepowder", function() if not ItemCheck('coca_leaf') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, { TriggerServerEvent("md-drugs:server:makepowder", data.data)
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:makepowder")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:cutcokeone") RegisterNetEvent("md-drugs:client:cutcokeone", function()
AddEventHandler("md-drugs:client:cutcokeone", function() if not ItemCheck('bakingsoda') then return end
cuttingcoke = true cuttingcoke = true
CutCoke() if Config.FancyCokeAnims then
CutCoke()
else
if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
end
TriggerServerEvent("md-drugs:server:cutcokeone") TriggerServerEvent("md-drugs:server:cutcokeone")
ClearPedTasks(PlayerPedId())
cuttingcoke = nil cuttingcoke = nil
end) end)
RegisterNetEvent("md-drugs:client:bagcoke") RegisterNetEvent("md-drugs:client:bagcoke", function()
AddEventHandler("md-drugs:client:bagcoke", function() if not ItemCheck('empty_weed_bag') then return end
baggingcoke = true baggingcoke = true
BagCoke() if Config.FancyCokeAnims then
BagCoke()
else
if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
end
TriggerServerEvent("md-drugs:server:bagcoke") TriggerServerEvent("md-drugs:server:bagcoke")
ClearPedTasks(PlayerPedId())
baggingcoke = nil baggingcoke = nil
end) end)
CreateThread(function() CreateThread(function()
local cut = vector3(1093.01, -3194.8, -39.99) local options = {
local bagg = vector3(1090.70, -3195.91, -39.99) { type = "client", event = "md-drugs:client:cutcokeone", icon = "fas fa-sign-in-alt", label = "cut up", canInteract = function()
exports['qb-target']:AddBoxZone("cutcokepowder",vector3(cut.x, cut.y, cut.z),1.5, 1.75, { -- 963.37, -2122.95, 31.47 if cuttingcoke == nil and baggingcoke == nil then return true end
name = "cutcokepowder", end
heading = 11.0, },
debugPoly = false, }
minZ = cut.z-1, local options2 = {
maxZ = cut.z+1, { type = "client", event = "md-drugs:client:bagcoke", icon = "fas fa-sign-in-alt", label = "bagging", canInteract = function()
}, { if baggingcoke == nil and cuttingcoke == nil then return true end end }, }
options = { if Config.oxtarget then
{ exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options})
type = "client", exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options2})
event = "md-drugs:client:cutcokeone", else
icon = "fas fa-sign-in-alt", exports['qb-target']:AddBoxZone("cutcokepowder",vector3(1093.17, -3195.74, -39.19 -1),1.5, 1.75, {name = "cutcokepowder", minZ = -40.0,maxZ = -38.0,}, { options = options, distance = 2.0 })
label = "cut up", exports['qb-target']:AddBoxZone("bagcokepowder",vector3(1090.29, -3195.66, -39.13 - 1),1.5, 1.75, {name = "bagcokepowder", minZ = -40, maxZ = -38,}, {options = options2, distance = 2.0})
canInteract = function() end
if cuttingcoke == nil and baggingcoke == nil then return true end if Config.FancyCokeAnims == false then
end for k, v in pairs (Config.CuttingCoke) do
}, if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
}, local options = {
distance = 2.5 { type = "client", event = "md-drugs:client:cutcokeone", icon = "fas fa-sign-in-alt", label = "Cut Coke", data = k, distance = 2.0,
}) canInteract = function()
exports['qb-target']:AddBoxZone("bagcokepowder",vector3(bagg.x, bagg.y, bagg.z),1.5, 1.75, { -- 963.37, -2122.95, 31.47 if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
name = "bagcokepowder", },
heading = 11.0, }
debugPoly = false, if Config.oxtarget then
minZ = bagg.z-1, exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
maxZ = bagg.z+1, else
}, { exports['qb-target']:AddBoxZone("cutcoke"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="cutcoke"..k, heading = 156.0,minZ = v.loc.z-1, maxZ = v.loc.z+1, }, {options = options, distance = 1.5})
options = { end
{ end
type = "client", for k, v in pairs (Config.BaggingCoke) do
event = "md-drugs:client:bagcoke", if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
icon = "fas fa-sign-in-alt", local options = {
label = "bagging", { type = "client", event = "md-drugs:client:bagcoke", icon = "fas fa-sign-in-alt", label = "Bag Coke", data = k, distance = 2.0,
canInteract = function() canInteract = function()
if baggingcoke == nil and cuttingcoke == nil then return true end if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
end },
}, }
}, if Config.oxtarget then
distance = 2.5 exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
}) else
exports['qb-target']:AddBoxZone("bagcoke"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="bagcoke"..k, heading = 156.0,minZ = v.loc.z-1, maxZ = v.loc.z+1, }, {options = options, distance = 1.5})
end
end
end
end) end)
+13 -21
View File
@@ -1,25 +1,17 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName) RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, statval, item)
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
disableMovement = false, TriggerServerEvent('md-drugs:server:removeconsum', item)
disableCarMovement = false, if status == "armor" then
disableMouse = false, TriggerServerEvent('hospital:server:SetArmor', statval)
disableCombat = true, TriggerServerEvent('consumables:server:useArmor')
}, { SetPedArmour(PlayerPedId(), statval)
animDict = "mp_suicide", else
anim = "pill", TriggerServerEvent('md-drugs:server:updatestatus', status, statval)
flags = 49, end
}, {}, {}, function() TriggerEvent('evidence:client:SetStatus', 'widepupils', 200)
ClearPedTasks(PlayerPedId()) if effect == "alien" then AlienEffect() elseif effect == "ecstacy" then EcstasyEffect() elseif effect == "meth" then MethBagEffect() elseif effect == "coke" then CokeBaggyEffect() elseif effect == "trevor" then TrevorEffect() else end
TriggerEvent("evidence:client:SetStatus", "widepupils", 300) if status == nil then return end
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) end)
+131 -294
View File
@@ -1,308 +1,145 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local cornerselling = false local sell = 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 function Cornersell()
local function LoadAnimDict(dict) local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
RequestAnimDict(dict) if targ == nil then return end
while not HasAnimDictLoaded(dict) do if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 then return end
Wait(0) local sold = false
end TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
end repeat
Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
lib.requestAnimDict("rcmme_tracey1")
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
FreezeEntityPosition(targ, true)
local item, amount = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
if item == 'nothing' then Notify(' You Aint Got Shit', 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end
local bagAmount = math.random(1, amount)
if bagAmount > 15 then bagAmount = math.random(1,15) end
local table = QBConfig.DrugsPrice[item]
local price = math.random(table['min'], table['max'] ) * bagAmount
local targbusy = false
local options = {
{ label = 'Sell ' .. bagAmount .. ' Of ' .. GetLabel(item) .. ' For $' .. price .. '!', icon = "fas fa-eye",
onSelect = function()
PoliceCall(20)
targbusy = true
if IsPedInAnyVehicle(PlayerPedId(), true) then
Notify('STRANGER DANGER, I WONT GET IN THE CAR WITH YOU', 'error')
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
sell = false
return end
if not progressbar('Selling ' .. GetLabel(item) .. '!', 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, bagAmount, price)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
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, end,
canInteract = function(entity) canInteract = function()
if IsEntityDead(entity) then if not targbusy then return true end end,
return true distance = 2.0
end },
end { label = 'Deny Price', icon = "fas fa-eye",
} onSelect = function()
}, PoliceCall(20)
distance = 1.5, targbusy = true
}) if not progressbar('Telling This Dumbass To Leave!', 4000, 'argue5') then return end
CreateThread(function() FreezeEntityPosition(targ, false)
while stealingPed do ClearPedTasks(targ)
local playerPed = PlayerPedId() Wait(10000)
local pos = GetEntityCoords(playerPed) DeletePed(targ)
local pedpos = GetEntityCoords(stealingPed) targbusy = false
local dist = #(pos - pedpos) sold = true
if dist > 100 then end,
stealingPed = nil canInteract = function()
stealData = {} if not targbusy then return true end end,
exports['qb-target']:RemoveZone('stealingPed') distance = 2.0
break },
end }
Wait(0) local optionsqb = {
end { label = 'Sell ' .. bagAmount .. ' Of ' .. GetLabel(item) .. ' For $' .. price .. '!', icon = "fas fa-eye",
end) action = function()
end PoliceCall(20)
end targbusy = true
if IsPedInAnyVehicle(PlayerPedId(), true) then
Notify('STRANGER DANGER, I WONT GET IN THE CAR WITH YOU', 'error')
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
sell = false
return end
if not progressbar('Selling ' .. GetLabel(item) .. '!', 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, bagAmount, price)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
local function SellToPed(ped) end,
hasTarget = true canInteract = function()
if not targbusy then return true end end,
for i = 1, #lastPed, 1 do distance = 2.0
if lastPed[i] == ped then },
hasTarget = false { label = 'Deny Price', icon = "fas fa-eye",
return action = function()
end PoliceCall(20)
end targbusy = true
if not progressbar('Telling This Dumbass To Leave!', 4000, 'argue5') then return end
local successChance = math.random(1, 100) FreezeEntityPosition(targ, false)
local scamChance = math.random(1, 100) ClearPedTasks(targ)
local getRobbed = math.random(1, 100) Wait(10000)
if successChance <= QBConfig.SuccessChance then hasTarget = false return end DeletePed(targ)
targbusy = false
local drugType = math.random(1, #availableDrugs) sold = true
local bagAmount = math.random(1, availableDrugs[drugType].amount) end,
if bagAmount > 15 then bagAmount = math.random(9, 15) end canInteract = function()
if not targbusy then return true end end,
currentOfferDrug = availableDrugs[drugType] distance = 2.0
},
local ddata = QBConfig.DrugsPrice[currentOfferDrug.item] }
local randomPrice = math.random(ddata.min, ddata.max) * bagAmount if Config.oxtarget then
if scamChance <= QBConfig.ScamChance then randomPrice = math.random(3, 10) * bagAmount end exports.ox_target:addLocalEntity(targ, options)
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 else
if pedDist2 < 1.5 and cornerselling then exports['qb-target']:AddTargetEntity(targ, { options = optionsqb, distance = 2.0})
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
TriggerEvent('animations:client:EmoteCommandStart', {'point'})
Wait(650)
ClearPedTasks(PlayerPedId())
SetPedKeepTask(entity, false)
SetEntityAsNoLongerNeeded(entity)
ClearPedTasksImmediately(entity)
lastPed[#lastPed + 1] = entity
exports['qb-target']:RemoveZone('sellingPed')
PoliceCallCornerselling()
end)
end
end,
canInteract = function()
if IsEntityDead(ped) == false then return true 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 end
Wait(0) repeat
end Wait(1000)
Wait(math.random(4000, 7000)) until sold
end if sold then sold = false return true end
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() RegisterNetEvent('md-drugs:client:cornerselling', function()
QBCore.Functions.TriggerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(result) if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
if CurrentCops >= QBConfig.MinimumDrugSalePolice then local item, amount = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
if IsPedInAnyVehicle(PlayerPedId(), false) then if item ~= 'nothing' then
QBCore.Functions.Notify("youre in a car", 'error') if sell then
else Notify('Lazy Ass Cant Even Sell Drugs', 'error')
if result then sell = false
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 else
QBCore.Functions.Notify("not enough pork", "error") sell = true
Notify('Go Make That Paper', 'success')
repeat
Wait(1000)
if not Cornersell() then end
until sell == false
end end
end) else
end) Notify('You Cant Sell Air', 'error')
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
end) end)
+11 -33
View File
@@ -1,40 +1,18 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:makecrackone")
AddEventHandler("md-drugs:client:makecrackone", function() RegisterNetEvent("md-drugs:client:makecrackone", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('bakingsoda') then return end
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, { if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
disableMovement = false, if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makecrackone", data.data)
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) end)
RegisterNetEvent("md-drugs:client:bagcrack")
AddEventHandler("md-drugs:client:bagcrack", function() RegisterNetEvent("md-drugs:client:bagcrack", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('empty_weed_bag') then return end
QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, { if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:bagcrack", data.data)
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcrack")
ClearPedTasks(PlayerPedId())
end)
end) end)
+32 -44
View File
@@ -1,4 +1,4 @@
QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local currentDealer = nil local currentDealer = nil
local dealerIsHome = false local dealerIsHome = false
local waitingDelivery = nil local waitingDelivery = nil
@@ -18,7 +18,7 @@ AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
Wait(1000) Wait(1000)
InitZones() InitZones()
else else
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end if dealerCombo then dealerCombo:destroy() end
end end
end) end)
@@ -41,14 +41,16 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function()
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = { dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, icon = GetImage(v.name),
title = v.label, title = GetLabel(v.name),
description = v.price,
event = "md-drugs:client:travellingmerchantox", event = "md-drugs:client:travellingmerchantox",
args = { args = {
item = v.name, item = v.name,
cost = v.price, cost = v.price,
info = v.info,
amount = v.amount, amount = v.amount,
table = QBConfig.ProductsStupidNameRewrite,
num = k,
} }
} }
@@ -59,14 +61,16 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function()
for k, v in pairs (QBConfig.Products) do for k, v in pairs (QBConfig.Products) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = { dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, icon = GetImage(v.name),
title = v.label, title = GetLabel(v.name),
description = v.price,
event = "md-drugs:client:travellingmerchantox", event = "md-drugs:client:travellingmerchantox",
args = { args = {
item = v.name, item = v.name,
cost = v.price, cost = v.price,
info = v.info,
amount = v.amount, amount = v.amount,
table = QBConfig.Products,
num = k,
} }
} }
@@ -94,7 +98,7 @@ local function RequestDelivery()
local amount = math.random(1, 3) local amount = math.random(1, 3)
local item = RandomDeliveryItemOnRep() local item = RandomDeliveryItemOnRep()
QBCore.Functions.Notify("Currently searching for a delivery...", 'success') Notify(Lang.Delivery.search, 'success')
if Config.NearbyDeliveries == true then if Config.NearbyDeliveries == true then
local playerPed = PlayerPedId() local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed) local playerCoords = GetEntityCoords(playerPed)
@@ -119,7 +123,7 @@ local function RequestDelivery()
["item"] = item ["item"] = item
} }
else else
QBCore.Functions.Notify("Nothing Close By", 'error') Notify(Lang.Delivery.none, 'error')
end end
else else
@@ -145,15 +149,12 @@ local function RequestDelivery()
sender = QBConfig.Dealers[currentDealer]["name"], sender = QBConfig.Dealers[currentDealer]["name"],
subject = "Delivery Location", subject = "Delivery Location",
message = "Deliver This For Me", message = "Deliver This For Me",
button = {
enabled = true,
buttonEvent = "md-drugs:client:setLocation",
buttonData = waitingDelivery
}
}) })
end) end)
TriggerEvent("md-drugs:client:setLocation",waitingDelivery)
else else
QBCore.Functions.Notify("You Havent Even Finished The One I Told You Too", 'error') Notify(Lang.Delivery.busy, 'error')
end end
end end
@@ -168,26 +169,17 @@ local function DeliveryTimer()
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() local function DeliverStuff()
if deliveryTimeout > 0 then if deliveryTimeout > 0 then
Wait(500) Wait(500)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
PoliceCallDeliveries() PoliceCall(20)
QBCore.Functions.Progressbar("work_dropbox", "handing Off Package", 3500, false, true, { progressbar(Lang.Delivery.pack, 4000, 'uncuff')
disableMovement = true, TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
disableCarMovement = true, activeDelivery = nil
disableMouse = false, exports['qb-target']:RemoveZone('drugDeliveryZone')
disableCombat = true, ClearPedTasks(PlayerPedId())
}, {}, {}, {}, function() -- Done
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
activeDelivery = nil
exports['qb-target']:RemoveZone('drugDeliveryZone')
ClearPedTasks(PlayerPedId())
end)
else else
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false) TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false)
end end
@@ -196,10 +188,10 @@ end
local function SetMapBlip(x, y) local function SetMapBlip(x, y)
SetNewWaypoint(x, y) SetNewWaypoint(x, y)
QBCore.Functions.Notify("Marked On Your Map", 'success'); Notify(Lang.Delivery.found, 'success');
end end
-- PolyZone specific functions
function InitZones() function InitZones()
@@ -211,10 +203,8 @@ function InitZones()
while not HasModelLoaded(Ped) do while not HasModelLoaded(Ped) do
Wait(0) Wait(0)
end end
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false) testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false)
FreezeEntityPosition(testdealer, true) Freeze(testdealer, true, 90)
SetEntityInvincible(testdealer, true)
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, { exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, {
name = "dealer_"..k, name = "dealer_"..k,
heading = v.heading, heading = v.heading,
@@ -287,7 +277,7 @@ end
-- Events -- Events
RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData) RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData)
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end if dealerCombo then dealerCombo:destroy() end
QBConfig.Dealers = DealerData QBConfig.Dealers = DealerData
Wait(1000) Wait(1000)
InitZones() InitZones()
@@ -304,7 +294,7 @@ end)
RegisterNetEvent('md-drugs:client:setLocation', function(locationData) RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
if activeDelivery then if activeDelivery then
SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"]) SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"])
QBCore.Functions.Notify("Already Delivering", 'error') Notify(Lang.Delivery.already, 'error')
return return
end end
activeDelivery = locationData activeDelivery = locationData
@@ -318,9 +308,7 @@ RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
end end
Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false) Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false)
FreezeEntityPosition(Buyer, true) Freeze(Buyer, true, 180)
SetEntityInvincible(Buyer, true)
if Config.UseTarget then
exports['qb-target']:AddTargetEntity(Buyer, { exports['qb-target']:AddTargetEntity(Buyer, {
options = { options = {
{ {
@@ -341,7 +329,7 @@ RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
}, },
distance = 1.5 distance = 1.5
}) })
end
end) end)
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData) RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
@@ -368,5 +356,5 @@ end)
RegisterCommand('checkrep', function() RegisterCommand('checkrep', function()
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"] local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
QBCore.Functions.Notify("Current Rep: "..drugrep) Notify(Lang.Delivery.checkrep..drugrep)
end) end, false)
+215
View File
@@ -0,0 +1,215 @@
local QBCore = exports['qb-core']:GetCoreObject()
local progressbartype = Config.progressbartype
local minigametype = Config.minigametype
local notifytype = Config.Notify
local dispatch = Config.Dispatch
function progressbar(text, time, anim)
TriggerEvent('animations:client:EmoteCommandStart', {anim})
if progressbartype == 'oxbar' then
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
return true
end
elseif progressbartype == 'oxcir' then
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
return true
end
elseif progressbartype == 'qb' then
local test = false
local cancelled = false
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
}, {}, {}, {}, function()-- Done
test = true
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end, function()
cancelled = true
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end)
repeat
Wait(100)
until cancelled or test
if test then return true end
else
print"dude, it literally tells you what you need to set it as in the config"
end
end
function minigame(num1, num2)
local check
if minigametype == 'ps' then
exports['ps-ui']:Circle(function(success)
check = success
end, num1, num2)
return check
elseif minigametype == 'ox' then
num1 = 'easy'
if num2 <= 6 then num2 = 'hard' elseif num2 >= 7 and num2 <= 12 then num2 = 'medium' else num2 = 'easy' end
local success = lib.skillCheck({num1, num2}, {'1', '2', '3', '4'})
return success
elseif minigametype == 'none' then
return true
else
print"dude, it literally tells you what you need to set it as in the config"
end
end
function Notify(text, type)
if notifytype =='ox' then
lib.notify({title = text, type = type})
elseif notifytype == 'qb' then
QBCore.Functions.Notify(text, type)
elseif notifytype == 'okok' then
exports['okokNotify']:Alert('', text, 4000, type, false)
else
print"dude, it literally tells you what you need to set it as in the config"
end
end
function GetImage(img)
if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items()
if Items[img]['client'] then
if Items[img]['client']['image'] then
return Items[img]['client']['image']
else
return "nui://ox_inventory/web/images/".. img.. '.png'
end
else
return "nui://ox_inventory/web/images/".. img.. '.png'
end
elseif GetResourceState('ps-inventory') == 'started' then
return "nui://ps-inventory/html/images/".. QBCore.Shared.Items[img].image
elseif GetResourceState('lj-inventory') == 'started' then
return "nui://lj-inventory/html/images/".. QBCore.Shared.Items[img].image
elseif GetResourceState('qb-inventory') == 'started' then
return "nui://qb-inventory/html/images/".. QBCore.Shared.Items[img].image
elseif GetResourceState('qs-inventory') == 'started' then
return "nui://qs-inventory/html/img/".. QBCore.Shared.Items[img].image
elseif GetResourceState('origen_inventory') == 'started' then
return "nui://origen_inventory/html/img/".. QBCore.Shared.Items[img].image
elseif GetResourceState('core_inventory') == 'started' then
return "nui://core_inventory/html/img/".. QBCore.Shared.Items[img].image
end
end
function GetLabel(label)
if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items()
return Items[label]['label']
else
return QBCore.Shared.Items[label]['label']
end
end
function ItemCheck(item)
local success
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') end
else
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(item) then success = item return success else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') end
end
end
function Email(sender, subject, message)
if Config.Phone == 'yflip' then
local receiver = GetPlayerServerId(PlayerId())
local insertId, received = exports["yflip-phone"]:SendMail({
title = subject,
sender = sender,
senderDisplayName = sender,
content = message,
}, 'phoneNumber', receiver)
elseif Config.Phone == 'qs' then
TriggerServerEvent('qs-smartphone:server:sendNewMail', {
sender = sender,
subject = subject,
message = message,
button = {}
})
else
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = sender,
subject = subject,
message = message,
})
end
end
function PoliceCall(chance)
local math = math.random(1,100)
if math <= chance then
if dispatch == 'ps' then
exports['ps-dispatch']:DrugSale()
elseif dispatch == 'cd' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', },
coords = data.coords,
title = '420-69 Drug Sale',
message = 'A '..data.sex..' robbing a store at '..data.street,
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 431,
scale = 1.2,
colour = 3,
flashes = false,
text = '420-69 Drug Sale',
time = 5,
radius = 0,
}
})
elseif dispatch == 'core' then
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
{icon="fa-ruler", info="4.5 MILES"},
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
elseif dispatch == 'aty' then
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
elseif dispatch == 'qs' then
exports['qs-dispatch']:DrugSale()
else
print('Congrats, You Choose 0 of the options :)')
end
else
end
end
function GetCops(number)
if number == 0 then return true end
local amount = lib.callback.await('md-drugs:server:GetCoppers', false)
if amount >= number then return true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
end
function Freeze(entity, toggle, head)
SetEntityInvincible(entity, toggle)
SetEntityAsMissionEntity(entity, toggle, toggle)
FreezeEntityPosition(entity, toggle)
SetEntityHeading(entity, head)
SetBlockingOfNonTemporaryEvents(entity, toggle)
end
+80 -184
View File
@@ -2,14 +2,6 @@ local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {} local CocaPlant = {}
local PoppyPlants = {} local PoppyPlants = {}
local herointable = false local herointable = false
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
local function loadParticle(dict) local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict) RequestNamedPtfxAsset(dict)
@@ -19,55 +11,41 @@ local function loadParticle(dict)
end end
SetPtfxAssetNextCall(dict) SetPtfxAssetNextCall(dict)
end end
CreateThread(function() CreateThread(function()
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime) lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
labkitlocation = Config.buyheroinlabkit local labkitlocation = Config.buyheroinlabkit
heroinkitdealer = CreatePed(0, Ped,labkitlocation.x, labkitlocation.y, labkitlocation.z-1, 180.0, false, false) local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
FreezeEntityPosition(heroinkitdealer, true) Freeze(heroinkitdealer, true, labkitlocation.w)
SetEntityInvincible(heroinkitdealer, true) local options = {
exports['qb-target']:AddTargetEntity(heroinkitdealer, { { label = "Buy Heroin Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0},
options = { }
{ if Config.oxtarget then
type = "client", exports.ox_target:addLocalEntity(heroinkitdealer, options)
label = "Buy Heroin Lab Kit", else
icon = "fas fa-eye", exports['qb-target']:AddTargetEntity(heroinkitdealer, { options = options, distance = 2.0})
event = "md-drugs:client:buyheroinlabkit" end
},
}
})
end) end)
---- plant spawns dont edit ---- plant spawns dont edit
RegisterNetEvent('heroin:respawnCane', function(loc) RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc] local v = GlobalState.PoppyPlants[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not PoppyPlants[loc] then if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true) PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[loc], true, true) Freeze(PoppyPlants[loc], true, v.heading)
FreezeEntityPosition(PoppyPlants[loc], true)
SetEntityHeading(PoppyPlants[loc], v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], { exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
options = { { options = { {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "pick Poppies", label = "pick Poppies",
action = function() action = function()
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, { if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, TriggerServerEvent("heroin:pickupCane", loc)
{ 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 end
} }
}, },
distance = 3.0 distance = 2.5
}) })
end end
end) end)
@@ -87,27 +65,18 @@ RegisterNetEvent("heroin:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[k], true, true) Freeze(PoppyPlants[k], true, v.heading)
FreezeEntityPosition(PoppyPlants[k], true)
SetEntityHeading(PoppyPlants[k], v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[k], { exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
options = { { options = { {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "Pick Poppies", label = "Pick Poppies",
action = function() action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, { if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, TriggerServerEvent("heroin:pickupCane", k)
{ 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 end
} }
}, },
distance = 3.0 distance = 2.5
}) })
end end
end end
@@ -140,172 +109,99 @@ AddEventHandler('onResourceStart', function(resource)
end) end)
---- plant stop end ---- plant stop end
RegisterNetEvent("md-drugs:client:dryplant")
AddEventHandler("md-drugs:client:dryplant", function() RegisterNetEvent("md-drugs:client:dryplant", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, { TriggerServerEvent("md-drugs:server:dryplant",data.data)
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:dryplant")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:cutheroin") RegisterNetEvent("md-drugs:client:cutheroin", function(data)
AddEventHandler("md-drugs:client:cutheroin", function() if not ItemCheck('bakingsoda') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { TriggerServerEvent("md-drugs:server:cutheroin", data.data)
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutheroin")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit") RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
AddEventHandler("md-drugs:client:buyheroinlabkit", function() if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) TriggerServerEvent("md-drugs:server:getheroinlabkit")
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) end)
RegisterNetEvent("md-drugs:client:setheroinlabkit") RegisterNetEvent("md-drugs:client:setheroinlabkit")
AddEventHandler("md-drugs:client:setheroinlabkit", function() AddEventHandler("md-drugs:client:setheroinlabkit", function()
if herointable then if herointable then
QBCore.Functions.Notify('You Already Have A Table Out', 'error') Notify(Lang.Heroin.tableout, 'error')
else else
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
herointable = true herointable = true
ClearPedTasks(PlayerPedId()) local heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(heroinlabkit) PlaceObjectOnGroundProperly(heroinlabkit)
exports['qb-target']:AddTargetEntity(heroinlabkit, { local options = {
options = { { event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", data = heroinlabkit},
{ { event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = heroinlabkit, canInteract = function() if herointable then return true end end},
}
event = "md-drugs:client:heatliquidheroin", if Config.oxtarget then
icon = "fas fa-box-circle-check", exports.ox_target:addLocalEntity(heroinlabkit, options)
label = "Cook Heroin", else
}, exports['qb-target']:AddTargetEntity(heroinlabkit, {options = options})
{ end
event = "md-drugs:client:getheroinkitback",
icon = "fas fa-box-circle-check",
label = "Pick Up",
canInteract = function()
if herointable then return true end end
},
}
})
end end
end) end)
RegisterNetEvent("md-drugs:client:heatliquidheroin")
AddEventHandler("md-drugs:client:heatliquidheroin", function() RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('emptyvial') then return end
exports['ps-ui']:Circle(function(success) if not minigame(2, 8) then
if success then TriggerServerEvent("md-drugs:server:failheatingheroin")
TriggerServerEvent("md-drugs:server:heatliquidheroin") DeleteObject(data.data)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheatingheroin")
ClearPedTasks(PlayerPedId())
DeleteObject(heroinlabkit)
Wait(100) Wait(100)
dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
loadParticle("core") 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) 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) SetParticleFxLoopedAlpha(heroinkit, 3.0)
ClearPedTasks(PlayerPedId()) SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0) local options = {
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
options = {
{
event = "md-drugs:client:cleanheroinlabkit",
icon = "fas fa-box-circle-check",
label = "Clean It",
} }
} if Config.oxtarget then
}) exports.ox_target:addLocalEntity(dirtylabkitheroin,options )
end else
end, 1, 8) -- NumberOfCircles, MS exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {options = options})
end
return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end) end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit") RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
AddEventHandler("md-drugs:client:cleanheroinlabkit", function() if not ItemCheck('cleaningkit') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'clean'}) if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, { TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data)
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:removecleaningkitheroin")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:deletedirtyheroin") RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
AddEventHandler("md-drugs:client:deletedirtyheroin", function() DeleteObject(data)
DeleteObject(dirtylabkitheroin)
herointable = false herointable = false
Wait(1000) Wait(1000)
TriggerEvent("md-drugs:client:setheroinlabkit") TriggerEvent("md-drugs:client:setheroinlabkit")
end) end)
RegisterNetEvent("md-drugs:client:getheroinkitback")
AddEventHandler("md-drugs:client:getheroinkitback", function()
herointable = false
DeleteObject(heroinlabkit)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:fillneedle") RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
AddEventHandler("md-drugs:client:fillneedle", function() if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) herointable = false
QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, { DeleteObject(data.data)
disableMovement = false, TriggerServerEvent("md-drugs:server:getheroinlabkitback")
disableCarMovement = false, end)
disableMouse = false,
disableCombat = true,
disableInventory = true, RegisterNetEvent("md-drugs:client:fillneedle", function(data)
}, {}, {}, {}, function()-- Done if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
exports['ps-ui']:Circle(function(success) if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
if success then TriggerServerEvent("md-drugs:server:fillneedle", data.data)
TriggerServerEvent("md-drugs:server:fillneedle")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheroin")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles,
end)
end) end)
+14 -35
View File
@@ -2,42 +2,21 @@ local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function() CreateThread(function()
local current = "s_m_m_doctor_01" local current = "s_m_m_doctor_01"
lib.requestModel(current, Config.requestModelTime) lib.requestModel(current, Config.RequestModelTime)
SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, false, false) local SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, Config.SyrupVendor.w, false, false)
FreezeEntityPosition(SyrupLocation, true) Freeze(SyrupLocation, true, Config.SyrupVendor.w)
SetEntityInvincible(SyrupLocation, true) local options = {
exports['qb-target']:AddTargetEntity(SyrupLocation, { { type = "client", label = "Get Task", icon = "fas fa-eye", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0},
options = { }
{ if Config.oxtarget then
type = "client", exports.ox_target:addLocalEntity(SyrupLocation, options)
label = "Get Task", else
icon = "fas fa-eye", exports['qb-target']:AddTargetEntity(SyrupLocation, { options = options, distance = 2.0})
event = "md-drugs:client:getsyruplocationtobuy" end
},
},
distance = 2.0
})
end) end)
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy")
AddEventHandler("md-drugs:client:getsyruplocationtobuy", function() RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
Notify(Lang.Lean.marked, "success")
SpawnCarPedChase() 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) end)
+89 -271
View File
@@ -1,5 +1,7 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local tableout = false local tableout = false
local function loadParticle(dict) local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict) RequestNamedPtfxAsset(dict)
@@ -12,312 +14,128 @@ end
CreateThread(function() CreateThread(function()
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.requestModelTime) lib.requestModel(Ped, Config.RequestModelTime)
tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, 180.0, false, false) local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false)
FreezeEntityPosition(tabdealer, true) Freeze(tabdealer, true, Config.buylsdlabkit.w)
SetEntityInvincible(tabdealer, true) local options = {
exports['qb-target']:AddTargetEntity(tabdealer, { { type = "client", label = "Buy LSD Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}
options = { }
{ if Config.oxtarget then
type = "client", exports.ox_target:addLocalEntity(tabdealer, options)
label = "Buy LSD Lab Kit", else
icon = "fas fa-eye", exports['qb-target']:AddTargetEntity(tabdealer, {options = options, distance = 2.0})
event = "md-drugs:client:buylabkit" end
}
}
})
end) end)
RegisterNetEvent("md-drugs:client:getlysergic")
AddEventHandler("md-drugs:client:getlysergic", function() RegisterNetEvent("md-drugs:client:getlysergic", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not minigame(2, 8) then return end
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, { if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:getlysergic",data.data)
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) end)
RegisterNetEvent("md-drugs:client:getdiethylamide")
AddEventHandler("md-drugs:client:getdiethylamide", function() RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not minigame(2, 8) then return end
QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, { if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
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) end)
RegisterNetEvent("md-drugs:client:setlsdlabkit") RegisterNetEvent("md-drugs:client:setlsdlabkit")
AddEventHandler("md-drugs:client:setlsdlabkit", function() AddEventHandler("md-drugs:client:setlsdlabkit", function()
if tableout then if tableout then
QBCore.Functions.Notify('You Already Have A Table Out', 'error') Notify(Lang.lsd.tableout, 'error')
TriggerServerEvent('md-drugs:server:getlabkitback')
else else
tableout = true tableout = true
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.lsd.place, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getlabkitback') return end
QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, { local labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
disableMovement = false, PlaceObjectOnGroundProperly(labkit)
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", local options = {
icon = "fas fa-box-circle-check", { event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, },
label = "Heat Liquid", { event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, },
}, { event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, },
{ { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end},
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",
canInteract = function()
if tableout then return true end end
},
} }
}) if Config.oxtarget then
end) exports.ox_target:addLocalEntity(labkit, options)
else
exports['qb-target']:AddTargetEntity(labkit, {options = options})
end
end end
end) end)
RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
RegisterNetEvent("md-drugs:client:getlabkitback") if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
AddEventHandler("md-drugs:client:getlabkitback", function() DeleteObject(data.data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) TriggerServerEvent('md-drugs:server:getlabkitback')
local PedCoords = GetEntityCoords(PlayerPedId()) tableout = false
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())
tableout = false
end)
end) end)
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
RegisterNetEvent("md-drugs:client:heatliquid")
AddEventHandler("md-drugs:client:heatliquid", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords = GetEntityCoords(PlayerPedId())
dict = "scr_ie_svm_technical2" dict = "scr_ie_svm_technical2"
QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, { if not ItemCheck('lysergic_acid') then return end
disableMovement = false, if not ItemCheck('diethylamide') then return end
disableCarMovement = false, if not minigame(2, 8) then
disableMouse = false, TriggerServerEvent("md-drugs:server:failheating")
disableCombat = true, DeleteObject(data.data)
disableInventory = true, local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
}, {}, {}, {}, 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) 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) 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) PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0) SetParticleFxLoopedAlpha(exitPtfx, 3.0)
ClearPedTasks(PlayerPedId()) local options = {
exports['qb-target']:AddTargetEntity(dirtylabkit, { { event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit },
options = { }
{ if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkit, options)
event = "md-drugs:client:cleanlabkit", else
icon = "fas fa-box-circle-check", exports['qb-target']:AddTargetEntity(dirtylabkit, { options = options})
label = "Clean It", end
}, return end
} if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
}) TriggerServerEvent("md-drugs:server:heatliquid")
end
end, 1, 8) -- NumberOfCircles, MS
end)
end) end)
RegisterNetEvent("md-drugs:client:cleanlabkit") RegisterNetEvent("md-drugs:client:cleanlabkit", function(data)
AddEventHandler("md-drugs:client:cleanlabkit", function() if not ItemCheck('cleaningkit') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'clean'}) if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, { tableout = false
disableMovement = false, TriggerServerEvent("md-drugs:server:removecleaningkit", data.data)
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
tableout = false
TriggerServerEvent("md-drugs:server:removecleaningkit")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:resetlsdkit")
AddEventHandler("md-drugs:client:resetlsdkit", function() RegisterNetEvent("md-drugs:client:resetlsdkit", function(data)
DeleteObject(dirtylabkit) DeleteObject(data)
TriggerEvent("md-drugs:client:setlsdlabkit") TriggerEvent("md-drugs:client:setlsdlabkit")
end) end)
RegisterNetEvent("md-drugs:client:refinequalityacid")
AddEventHandler("md-drugs:client:refinequalityacid", function() RegisterNetEvent("md-drugs:client:refinequalityacid", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('lsd_one_vial') then return end
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, { if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failrefinequality") return end
disableMovement = false, if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:refinequalityacid")
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) end)
RegisterNetEvent("md-drugs:client:maketabpaper") RegisterNetEvent("md-drugs:client:maketabpaper", function()
AddEventHandler("md-drugs:client:maketabpaper", function() if not ItemCheck('tab_paper') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failtabs") return end
QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, { if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:maketabpaper")
disableCarMovement = false, end)
disableMouse = false,
disableCombat = true, RegisterNetEvent("md-drugs:client:buytabs", function(data)
disableInventory = true, if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
}, {}, {}, {}, function()-- Done TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
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) end)
RegisterNetEvent("md-drugs:client:cutsheet") RegisterNetEvent("md-drugs:client:buylabkit", function()
AddEventHandler("md-drugs:client:cutsheet", function() if QBCore.Functions.HasItem('lsdlabkit') then Notify('You Have One Idiot', 'error') return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, { TriggerServerEvent("md-drugs:server:getlabkit")
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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) end)
+41 -101
View File
@@ -1,6 +1,5 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local Mescaline = {} local Mescaline = {}
local hallucinate = nil
function LoadModel(hash) function LoadModel(hash)
hash = GetHashKey(hash) hash = GetHashKey(hash)
@@ -10,45 +9,17 @@ function LoadModel(hash)
end end
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) RegisterNetEvent('Mescaline:respawnCane', function(loc)
local v = GlobalState.Mescaline[loc] local v = GlobalState.Mescaline[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not Mescaline[loc] then if not Mescaline[loc] then
Mescaline[loc] = CreateObject(hash, v.location, false, true, true) Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(Mescaline[loc], true, true) Freeze(Mescaline[loc], true, v.heading)
FreezeEntityPosition(Mescaline[loc], true)
SetEntityHeading(Mescaline[loc], v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[loc], { exports['qb-target']:AddTargetEntity(Mescaline[loc], {
options = { { options = {
icon = "fas fa-hand", {icon = "fas fa-hand",label = "pick Cactus",action = function() if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end TriggerServerEvent("Mescaline:pickupCane", loc)end}
label = "pick Cactus", },
action = function() distance = 2.5
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
end) end)
@@ -68,27 +39,11 @@ RegisterNetEvent("Mescaline:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then if not v.taken then
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(Mescaline[k], true, true) Freeze(Mescaline[k], true, v.heading)
FreezeEntityPosition(Mescaline[k], true)
SetEntityHeading(Mescaline[k], v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[k], { exports['qb-target']:AddTargetEntity(Mescaline[k], {
options = { { options = { { icon = "fas fa-hand", label = "Pick Mescaline", action = function() if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end TriggerServerEvent("Mescaline:pickupCane", k) end}
icon = "fas fa-hand", },
label = "Pick Mescaline", distance = 2.5
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 end
@@ -119,57 +74,42 @@ AddEventHandler('onResourceStart', function(resource)
end) end)
RegisterNetEvent("md-drugs:client:drymescaline")
AddEventHandler("md-drugs:client:drymescaline", function() RegisterNetEvent("md-drugs:client:drymescaline", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('cactusbulb') then return end
QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, { if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:drymescaline")
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:drymescaline")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:takemescaline")
AddEventHandler("md-drugs:client:takemescaline", function() RegisterNetEvent("md-drugs:client:takemescaline", function()
local chance = math.random(1,100) local chance = math.random(1,100)
local chance2 = math.random(1,100) local chance2 = math.random(1,100)
QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, { if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
disableMovement = false, if chance <= Config.Badtrip then
disableCarMovement = false, AlienEffect()
disableMouse = false, clone = ClonePed(PlayerPedId(), false, false, true)
disableCombat = true, SetEntityAsMissionEntity(clone)
disableInventory = true, SetEntityVisible(clone, true)
}, {}, {}, {}, function()-- Done SetPedRelationshipGroupHash(clone)
if chance <= Config.Badtrip then SetPedAccuracy(clone)
AlienEffect() SetPedArmour(clone)
clone = ClonePed(PlayerPedId(), false, false, true) SetPedCanSwitchWeapon(clone, true)
SetEntityAsMissionEntity(clone) SetPedFleeAttributes(clone, false)
SetEntityVisible(clone, true) if chance2 <= 99 then
SetPedRelationshipGroupHash(clone) GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true)
SetPedAccuracy(clone) TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedArmour(clone) SetPedCombatAttributes(clone, 46, true)
SetPedCanSwitchWeapon(clone, true) Wait(1000 * 30)
SetPedFleeAttributes(clone, false) DeleteEntity(clone)
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 else
AlienEffect() GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
end end
end) else
AlienEffect()
end
end) end)
+170 -187
View File
@@ -2,8 +2,104 @@ local QBCore = exports['qb-core']:GetCoreObject()
local amonia = nil local amonia = nil
local tray = nil local tray = nil
local heated = nil local heated = nil
local active = nil
local function startcook()
if amonia == nil then
active = true
TriggerServerEvent("md-drugs:server:startcook")
MethCooking()
amonia = true
else
Notify(Lang.meth.inside, "error")
end
end
local function dials()
if amonia == true then
if not minigame(2, 8) then
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
ClearPedTasks(PlayerPedId())
amonia = nil
active = nil
return end
Notify(Lang.meth.increaseheat, "success")
ClearPedTasks(PlayerPedId())
heated = true
else
end
end
local function smash()
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()
local options = {
{
name = 'bucket',
icon = 'fa-solid fa-car',
label = 'Bag Meth',
action = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
}
}
local optionsox = {
{
name = 'bucket',
icon = 'fa-solid fa-car',
label = 'Bag Meth',
onSelect = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(bucket, optionsox)
else
exports['qb-target']:AddTargetEntity(bucket, {options = options, distance = 2.0})
end
end
end
local function trayscarry()
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
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
end
end
CreateThread(function() CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject() BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade) BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
@@ -13,230 +109,117 @@ CreateThread(function()
end) end)
CreateThread(function() CreateThread(function()
exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { name = "methteleout", heading = 11.0, debugPoly = false, minZ = Config.MethTeleIn.z - 2, maxZ = Config.MethTeleIn.z + 2,}, {
name = "methteleout",
heading = 11.0,
debugPoly = false,
minZ = Config.MethTeleIn.z - 2,
maxZ = Config.MethTeleIn.z + 2,
}, {
options = { options = {
{ {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end},
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
action = function()
SetEntityCoords(PlayerPedId(), Config.MethTeleOut)
end,
},
}, },
distance = 2.5 distance = 2.5
}) })
exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, {name = "methtelein",heading = 11.0,debugPoly = false,minZ = Config.MethTeleOut.z - 2,maxZ = Config.MethTeleOut.z + 2,}, {
name = "methtelein",
heading = 11.0,
debugPoly = false,
minZ = Config.MethTeleOut.z - 2,
maxZ = Config.MethTeleOut.z + 2,
}, {
options = { options = {
{ { name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end },
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
action = function()
SetEntityCoords(PlayerPedId(), Config.MethTeleIn)
end,
},
}, },
distance = 2.5 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 exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { name = "maze", heading = 11.0, debugPoly = false, minZ = 44 - 2, maxZ = 44 + 2, }, {
name = "maze",
heading = 11.0,
debugPoly = false,
minZ = 44 - 2,
maxZ = 44 + 2,
}, {
options = { 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},
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 distance = 2.5
}) })
local itemreqcook = { "ephedrine", "acetone" } local itemreqcook = { "ephedrine", "acetone" }
exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75, exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75,{ name = "ingridientsmeth", heading = 11.0, debugPoly = false, minZ = -39 - 2, maxZ = -39 + 2,}, {
{ -- 963.37, .z-2122.95, 31.47
name = "ingridientsmeth",
heading = 11.0,
debugPoly = false,
minZ = -39 - 2,
maxZ = -39 + 2,
}, {
options = { options = {
{ { name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", item = itemreqcook, action = function() startcook() end,
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() canInteract = function()
if amonia == nil then if amonia == nil and active == nil then
return true return true
end end
end, end,
}, },
{ { name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 5, action = function() trayscarry() end,
name = 'grabtray', canInteract = function()
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.15, -3194.04, -39.20), 1.5, 1.75,
{ -- 963.37, .z-2122.95, 31.47
name = "boxmeth",
heading = 3.0,
debugPoly = false,
minZ = -39 - 2,
maxZ = -39 + 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 if heated and amonia and tray == nil then return true end
end, end,
}, },
}, },
distance = 2.5 distance = 2.5
}) })
exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75,{ name = "boxmeth", heading = 3.0, debugPoly = false, minZ = -39 - 2, maxZ = -39 + 2,}, {
options = {
{name = 'boxmeth',icon = "fas fa-sign-in-alt",label = "Box Up Meth",distance = 5,action = function() smash()end,
canInteract = function()
if tray then return true end
end,
},
},
})
exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75,{ 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() dials() end,
canInteract = function()
if amonia and heated == nil then return true end end
},
},
})
if Config.MethHeist == false then
for k, v in pairs (Config.MethEph) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
exports['qb-target']:AddBoxZone("methep"..k, v.loc, v.l, v.w, { name = "methep"..k, heading = v.rot, minZ = v.loc.z - 1.0, maxZ = v.loc.z + 2.0,}, {
options = {
{icon = "fas fa-sign-in-alt", label = "Steal Ephedrine", event = 'md-drugs:client:stealeph', data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
},
distance = 2.5
})
end
for k, v in pairs (Config.Methace) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
exports['qb-target']:AddBoxZone("methace"..k, v.loc, v.l, v.w, { name = "methace"..k, heading = v.rot, minZ = v.loc.z - 1.0, maxZ = v.loc.z + 2.0,}, {
options = {
{icon = "fas fa-sign-in-alt", label = "Steal Acetone", event = 'md-drugs:client:stealace', data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
},
distance = 2.5
})
end
end
end) end)
CreateThread(function() CreateThread(function()
if Config.MethHeist == false then
else
local current = "g_m_y_famdnf_01" local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.requestModelTime) lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.MethHeistStart local CurrentLocation = Config.MethHeistStart
methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false) local methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
FreezeEntityPosition(methdealer, true) Freeze(methdealer, true, 220.0)
SetEntityHeading(methdealer, 220.0)
SetEntityInvincible(methdealer, true)
exports['qb-target']:AddTargetEntity(methdealer, { exports['qb-target']:AddTargetEntity(methdealer, {
options = { options = {
{ {
label = "Get Mission", label = "Get Mission",
icon = "fas fa-eye", icon = "fas fa-eye",
action = function() action = function()
Notify(Lang.meth.mission, "success")
SpawnMethCarPedChase() SpawnMethCarPedChase()
QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success")
end, end,
}, },
} }
}) })
end
end) end)
RegisterNetEvent("md-drugs:client:stealeph", function(data)
if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:geteph", data.data)
end)
RegisterNetEvent("md-drugs:client:stealace", function(data)
if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getace", data.data)
end)
+52 -79
View File
@@ -1,47 +1,39 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local deliveryBlip = nil local deliveryBlip = nil
local PZone = nil
local listen = false
local carryPackage = nil local carryPackage = nil
RegisterNetEvent("md-drugs:client:getoxytruck") RegisterNetEvent("md-drugs:client:getoxytruck", function()
AddEventHandler("md-drugs:client:getoxytruck", function()
if TriggerServerEvent('md-drugs:server:payfortruck') then if TriggerServerEvent('md-drugs:server:payfortruck') then
end end
end) end)
function PolicecallOxy()
print "Tell Your Dev They Didn't Follow The Readme"
end
RegisterNetEvent("md-drugs:Client:getoxylocation", function() RegisterNetEvent("md-drugs:Client:getoxylocation", function()
local coords = Config.truckspawn local coords = Config.truckspawn
local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model
lib.requestModel(ModelHash, Config.requestModelTime) lib.requestModel(ModelHash, Config.RequestModelTime)
local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false) local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false)
SetEntityHeading(oxycar, coords.w) SetEntityHeading(oxycar, coords.w)
exports[Config.Fuel]:SetFuel(oxycar, 100.0) exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar)) TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success') Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute") TriggerEvent("md-drugs:client:getoxylocationroute")
SetVehicleEngineOn(oxycar, true, true) SetVehicleEngineOn(oxycar, true, true)
exports['qb-target']:AddTargetEntity(oxycar, { local options = {
options = { { event = "md-drugs:client:getfromtrunk", icon = "fas fa-box-circle-check", label = "Get Package"},
{
event = "md-drugs:client:getfromtrunk",
icon = "fas fa-box-circle-check",
label = "Get Package",
},
} }
}) if Config.oxtarget then
exports.ox_target:addLocalEntity(oxycar, options)
else
exports['qb-target']:AddTargetEntity(oxycar, {options = options, distance = 2.0})
end
end) end)
RegisterNetEvent("md-drugs:client:getoxylocationroute")
AddEventHandler("md-drugs:client:getoxylocationroute", function() RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
Wait(100) Wait(100)
local unlucky = math.random(1,100) local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
@@ -50,53 +42,42 @@ AddEventHandler("md-drugs:client:getoxylocationroute", function()
RemoveBlip(deliveryBlip) RemoveBlip(deliveryBlip)
end end
if CurrentLocation ~= nil then if CurrentLocation ~= nil then
deliveryBlip = AddBlipForCoord(CurrentLocation) deliveryBlip = AddBlipForCoord(CurrentLocation)
SetBlipSprite(deliveryBlip, 1) SetBlipSprite(deliveryBlip, 1)
SetBlipDisplay(deliveryBlip, 2) SetBlipDisplay(deliveryBlip, 2)
SetBlipScale(deliveryBlip, 1.0) SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false) SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27) SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING") BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("drug Meet") AddTextComponentSubstringPlayerName("drug Meet")
EndTextCommandSetBlipName(deliveryBlip) EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true) 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" local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.requestModelTime) lib.requestModel(current, Config.RequestModelTime)
oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false) local oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
SetEntityHeading(oxybuyer, 180) Freeze(oxybuyer, true, CurrentLocation.w)
FreezeEntityPosition(oxybuyer, true) repeat
SetEntityInvincible(oxybuyer, true) Wait(1000)
exports['qb-target']:AddTargetEntity(oxybuyer, { until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x,CurrentLocation.y,CurrentLocation.z)) < 5.0
options = { RemoveBlip(deliveryBlip)
{ PoliceCall(Config.PoliceAlertOxy)
type = "client", local options = {
label = "Talk To Buyer", { type = "client", label = "Talk To Buyer", icon = "fas fa-eye", event = "md-drugs:client:giveoxybox", ped = oxybuyer},
icon = "fas fa-eye", }
event = "md-drugs:client:giveoxybox" if Config.oxtarget then
}, exports.ox_target:addLocalEntity(oxybuyer, options)
} else
}) exports['qb-target']:AddTargetEntity(oxybuyer, {options = options, distance = 2.0})
end
end
end) end)
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
RegisterNetEvent("md-drugs:client:getfromtrunk")
AddEventHandler("md-drugs:client:getfromtrunk", function()
if carryPackage then if carryPackage then
QBCore.Functions.Notify("You Cant Carry More Than One", "error") Notify(Lang.oxy.cantcarry, "error")
else else
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@') RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7) Wait(7)
@@ -112,25 +93,17 @@ AddEventHandler("md-drugs:client:getfromtrunk", function()
end end
end) end)
RegisterNetEvent("md-drugs:client:giveoxybox")
AddEventHandler("md-drugs:client:giveoxybox", function() RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
if carryPackage then if carryPackage then
QBCore.Functions.Progressbar("drink_something", "handing over oxy", 4000, false, true, { if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:giveoxybox")
disableCarMovement = false, DeleteEntity(data.ped)
disableMouse = false, DetachEntity(carryPackage, true, true)
disableCombat = true, DeleteObject(carryPackage)
disableInventory = true, carryPackage = nil
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:giveoxybox")
ClearPedTasks(PlayerPedId())
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
end)
else else
QBCore.Functions.Notify("cant be empty handed idiot", "error") Notify(Lang.oxy.empty, "error")
end end
end) end)
+33 -134
View File
@@ -1,157 +1,56 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterCommand('prescriptionpad', function() RegisterNetEvent("md-drugs:client:prescriptionpad", function(args)
if QBCore.Functions.GetPlayerData().job.name == Config.PharmaJob then if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then
lib.registerContext({ lib.registerContext({
id = 'prescriptionpad', id = 'prescriptionpad',
title = "Prescription Pad", title = "Prescription Pad",
options = { options = {
{ {title = 'Give Vics', description = 'Give Vics ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'vicodin_prescription'}},
title = 'Give Vicodin', {title = 'Give Madderal', description = 'Give Madderal ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'adderal_prescription'}},
description = 'Give Vicodin ', {title = 'Give Morphin',description = 'Give Morphin ',icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'morphine_prescription'}},
icon = 'fa-solid fa-file-prescription', {title = 'Give Zany', description = 'Give Zany ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'xanax_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') lib.showContext('prescriptionpad')
else else
QBCore.Functions.Notify("Youre Not A Medical Person", "error") Notify(Lang.Pharma.notems, "error")
end end
end) end)
RegisterNetEvent("md-drugs:client:givevicodinprescription")
AddEventHandler("md-drugs:client:givevicodinprescription", function() RegisterNetEvent("md-drugs:client:writeprescription", function(args)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { TriggerServerEvent("md-drugs:server:giveprescription", args.item)
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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) end)
RegisterNetEvent("md-drugs:client:givemorphineprescription")
AddEventHandler("md-drugs:client:givemorphineprescription", function() RegisterNetEvent("md-drugs:client:fillprescription", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { TriggerServerEvent("md-drugs:server:fillprescription", data.data)
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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) end)
RegisterNetEvent("md-drugs:client:fillprescription")
AddEventHandler("md-drugs:client:fillprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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") RegisterNetEvent("md-drugs:client:unbottle", function(item)
AddEventHandler("md-drugs:client:openingvicodin", function() if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if item.name == 'vicodinbottle' then item = 'vicodin' end
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { if item.name == 'adderalbottle' then item = 'adderal' end
disableMovement = false, if item.name == 'morphinebottle' then item = 'morphine' end
disableCarMovement = false, if item.name == 'xanaxbottle' then item = 'xanax' end
disableMouse = false, TriggerServerEvent('md-drugs:server:unbottle', item)
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent('md-drugs:client:takepharma', function(itemName) RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, { if not progressbar(Lang.Pharma.consume, 1000, 'eat') then return end
disableMovement = false, if itemName == "vicodin" then
disableCarMovement = false, exports['ps-buffs']:AddHealthBuff(10000, 20)
disableMouse = false, elseif itemName == "adderal" then
disableCombat = true, exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
}, { elseif itemName == "xanax" then
animDict = "mp_suicide", exports['ps-buffs']:AddStressBuff(10000, 25)
anim = "pill", else
flags = 49, exports['ps-buffs']:AddHealthBuff(10000, 40)
}, {}, {}, function() -- Done end
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) end)
+11 -59
View File
@@ -13,30 +13,13 @@ end
RegisterNetEvent('shrooms:respawnCane', function(loc) RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc] local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not shrooms[loc] then if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true) shrooms[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(shrooms[loc], true, true) Freeze(shrooms[loc], true, v.heading)
FreezeEntityPosition(shrooms[loc], true)
SetEntityHeading(shrooms[loc], v.heading)
exports['qb-target']:AddTargetEntity(shrooms[loc], { exports['qb-target']:AddTargetEntity(shrooms[loc], {
options = { { options = { { icon = "fas fa-hand", label = "pick shrooms", action = function() if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end TriggerServerEvent("shrooms:pickupCane", loc) end }
icon = "fas fa-hand", },
label = "pick shrooms", distance = 2.5
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
end) end)
@@ -77,27 +60,11 @@ end)
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(shrooms[k], true, true) Freeze(shrooms[k], true, v.heading)
FreezeEntityPosition(shrooms[k], true)
SetEntityHeading(shrooms[k], v.heading)
exports['qb-target']:AddTargetEntity(shrooms[k], { exports['qb-target']:AddTargetEntity(shrooms[k], {
options = { { options = { { icon = "fas fa-hand", label = "Pick shrooms", action = function() if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end TriggerServerEvent("shrooms:pickupCane", k) end }
icon = "fas fa-hand", },
label = "Pick shrooms", distance = 2.5
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 end
@@ -105,22 +72,7 @@ end)
RegisterNetEvent('md-drugs:client:takeshrooms', function() RegisterNetEvent('md-drugs:client:takeshrooms', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
disableMovement = false, TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
disableCarMovement = false, EcstasyEffect()
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) end)
+239 -628
View File
@@ -1,40 +1,24 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function() CreateThread(function()
if Config.oxtarget then if Config.oxtarget then
coketelein = exports.ox_target:addBoxZone({ coketelein = exports.ox_target:addBoxZone({ coords = Config.CokeTeleIn, size = vec(1,1,3), rotation = 0, debug = false,
coords = Config.CokeTeleIn,
size = vec(1,1,3),
rotation = 0,
debug = false,
options = { options = {
{ {name = 'teleout',icon = "fas fa-sign-in-alt",label = "Enter Building",distance = 5,
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
distance = 5,
onSelect = function() onSelect = function()
DoScreenFadeOut(500) DoScreenFadeOut(500)
Wait(1000) Wait(1000)
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z) SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z)
Wait(1000) Wait(1000)
DoScreenFadeIn(500) DoScreenFadeIn(500)
end, end
}, },
}, },
}) })
coketeleout = exports.ox_target:addBoxZone({ coketeleout = exports.ox_target:addBoxZone({ coords = Config.CokeTeleOut, size = vec(1,1,3), rotation = 0, debug = false,
coords = Config.CokeTeleOut,
size = vec(1,1,3),
rotation = 0,
debug = false,
options = { options = {
{ {name = 'teleout',icon = "fas fa-sign-in-alt",label = "Exit Building",distance = 5,
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
distance = 5,
onSelect = function() onSelect = function()
DoScreenFadeOut(500) DoScreenFadeOut(500)
Wait(500) Wait(500)
@@ -46,285 +30,8 @@ if Config.oxtarget then
}, },
}, },
}) })
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",
},
},
})
------------- 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
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",
},
},
})
------- crack
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",
},
},
})
------- 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.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.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.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',
},
},
})
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',
},
},
})
--------------------------------------- XTC
else else
exports['qb-target']:AddBoxZone("coketelein",Config.CokeTeleIn,1.5, 1.75, { name = "coketelein",heading = 156.0,debugPoly = false,minZ = Config.CokeTeleIn.z-2,maxZ = Config.CokeTeleIn.z+2,}, {
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 = { options = {
{ {
name = 'teleout', name = 'teleout',
@@ -341,13 +48,7 @@ else
}, },
}, },
}) })
exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47 exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, {name = "CokeTeleOut",heading = 156.0,debugPoly = false,minZ = Config.CokeTeleOut.z-2,maxZ = Config.CokeTeleOut.z+2,}, {
name = "CokeTeleOut",
heading = 156.0,
debugPoly = false,
minZ = Config.CokeTeleOut.z-2,
maxZ = Config.CokeTeleOut.z+2,
}, {
options = { options = {
{ {
name = 'teleout', name = 'teleout',
@@ -364,324 +65,234 @@ else
}, },
}, },
}) })
exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47 end
name = "makepowder", -- cocaine ( Bagging and Cutting is in Cocaine.lua due to globals used :))
heading = 156.0, for k, v in pairs (Config.MakePowder) do
debugPoly = false, if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
minZ = Config.MakePowder.z-2, local options = {
maxZ = Config.MakePowder.z+2, { type = "client", event = "md-drugs:client:makepowder", icon = "fas fa-sign-in-alt", label = "chop it up", data = k, distance = 2.0,
}, { canInteract = function()
options = { if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
{
type = "client",
event = "md-drugs:client:makepowder",
icon = "fas fa-sign-in-alt",
label = "chop it up",
},
},
})
----- 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("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("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
})
----------------------------------------- mescaline
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
})
-------------- 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",
}, },
} }
}) if Config.oxtarget then
--------------------------------------- XTC exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47 else
name = "stealisosafrole2", exports['qb-target']:AddBoxZone("makepowder"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="makepowder"..k, heading = 156.0,minZ = v.loc.z-1, maxZ = v.loc.z+1, }, {options = options, distance = 1.5})
heading = 156.0, end
debugPoly = false, end
minZ = Config.isosafrole.z-2, ------------- lsd
maxZ = Config.isosafrole.z+2, for k, v in pairs (Config.lysergicacid) do
}, { if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
options = { local options = {
{ { type = "client", event = "md-drugs:client:getlysergic", icon = "fas fa-sign-in-alt", label = "stealing", data = k,
type = "client", canInteract = function()
event = "md-drugs:client:stealisosafrole", if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
icon = 'fas fa-sign-in-alt', }
label = 'Steal Isosafrole', }
}, if Config.oxtarget then
}, exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false, rotation = v.rot, options = options,})
distance = 2.5 else
}) exports['qb-target']:AddBoxZone("getlysergic"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="getlysergic"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47 end
name = "stealmdp2p", end
heading = 156.0, for k, v in pairs (Config.diethylamide) do
debugPoly = false, if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
minZ = Config.mdp2p.z-2, local options = {
maxZ = Config.mdp2p.z+2, { type = "client", event = "md-drugs:client:getdiethylamide", icon = "fas fa-sign-in-alt", label = "stealing", data = k,
}, { canInteract = function()
options = { if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
{ }
type = "client", }
event = "md-drugs:client:stealmdp2p", if Config.oxtarget then
icon = 'fas fa-eye', exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
label = 'Steal mdp2p', else
}, exports['qb-target']:AddBoxZone("getdiethylamide"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="getdiethylamide"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
}, end
distance = 2.5 end
}) for k, v in pairs (Config.gettabs) do
exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47 if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
name = "makerawxtc", local options = {
heading = 156.0, { type = "client", event = "md-drugs:client:buytabs", icon = "fas fa-sign-in-alt", label = "Buy Tabs", data = k,
debugPoly = false, canInteract = function()
minZ = Config.rawxtcloc.z-2, if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
maxZ = Config.rawxtcloc.z+2, }
}, { }
options = { if Config.oxtarget then
{ exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
type = "client", else
event = "md-drugs:client:makingrawxtc", exports['qb-target']:AddBoxZone("buytabs"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="buytabs"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
icon = 'fas fa-eye', end
label = 'Make Raw XTC', end
}, ------ heroin
}, for k, v in pairs (Config.dryplant) do
distance = 2.5 if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
}) local options = {
exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47 { type = "client", event = "md-drugs:client:dryplant", icon = "fas fa-sign-in-alt", label = "Dry Poppies", data = k,
name = "buypress", canInteract = function()
heading = 156.0, if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
debugPoly = false, }
minZ = Config.buypress.z-2, }
maxZ = Config.buypress.z+2, if Config.oxtarget then
}, { exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
options = { else
{ exports['qb-target']:AddBoxZone("dryplant"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="dryplant"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
type = "client", end
event = "md-drugs:client:buypress", end
icon = 'fas fa-eye', for k, v in pairs (Config.cutheroinone) do
label = 'Buy Press', if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
}, local options = {
}, { type = "client", event = "md-drugs:client:cutheroin", icon = "fas fa-sign-in-alt", label = "Cut Heroin", data = k,
distance = 2.5 canInteract = function()
}) if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("cutheroin"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="cutheroin"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
for k, v in pairs (Config.fillneedle) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:fillneedle", icon = "fas fa-sign-in-alt", label = "Fill Needles", data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("fillneedle"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="fillneedle"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
------- crack
for k, v in pairs (Config.makecrack) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:makecrackone", icon = "fas fa-sign-in-alt", label = "Cook Crack", data = k, distance = 2.0,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("makecrackone"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="makecrackone"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
for k, v in pairs (Config.bagcrack) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:bagcrack", icon = "fas fa-sign-in-alt", label = "Bag Crack", data = k, distance = 2.0,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("bagcrack"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="bagcrack"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
------- pharma
for k, v in pairs (Config.FillPrescription) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:fillprescription", icon = "fas fa-sign-in-alt", label = "Fill Prescription", data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("fillprescription"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="fillprescription"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
-------- oxy runs
local options2 = {
{ event = "md-drugs:client:getoxytruck", icon = "fas fa-sign-in-alt", label = "Pay For Truck",},
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = Config.Payfortruck, size = vec3(1,1,1),debugPoly = false,rotation = 90.0, options = options2,})
else
exports['qb-target']:AddBoxZone("payfortruck" ,Config.Payfortruck, 1.0, 1.0, {name ="payfortruck", heading = 156.0,minZ = Config.Payfortruck.z-2, maxZ = Config.Payfortruck.z+2, }, {options = options2, distance = 1.5})
end
------------ mescaline
local options3 = {
{ type = "client", event = "md-drugs:client:drymescaline", icon = "fas fa-sign-in-alt", label = "Dry Out"},
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = Config.DryOut, size = vec3(1,1,1),debugPoly = false,rotation = 90.0, options = options3,})
else
exports['qb-target']:AddBoxZone("DryOut" ,Config.DryOut, 1.0, 1.0, {name ="DryOut", heading = 156.0,minZ = Config.DryOut.z-2, maxZ = Config.DryOut.z+2, }, {options = options3, distance = 1.5})
end
------ XTC
for k, v in pairs (Config.isosafrole) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:stealisosafrole", icon = "fas fa-sign-in-alt", label = "Steal Isosafrole", data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("stealisosafrole"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="stealisosafrole"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
for k, v in pairs (Config.mdp2p) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:stealmdp2p", icon = "fas fa-sign-in-alt", label = "Steal MDP2P", data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("stealmdp2p"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="stealmdp2p"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
for k, v in pairs (Config.rawxtcloc) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:makingrawxtc", icon = "fas fa-sign-in-alt", label = "Make Raw XTC", data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("makingrawxtc"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="makingrawxtc"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
local options4 = {
{ type = "client", event = "md-drugs:client:buypress", icon = 'fas fa-eye', label = 'Buy Press',},
}
if Config.oxtarget then
exports.ox_target:addBoxZone({ coords = Config.buypress, size = vec3(2,2,2), debugPoly = false, rotation = 45, options = options4})
else
exports['qb-target']:AddBoxZone("buypress" ,Config.buypress, 1.0, 1.0, {name ="buypress", heading = 156.0,minZ = Config.buypress.z-2, maxZ = Config.buypress.z+2, }, {options = options4, distance = 1.5})
end
for k, v in pairs(Config.stamp) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{type = "client", event = "md-drugs:client:stampwhite", icon = 'fas fa-eye', label = 'Stamp Pills', data = k, canInteract = function() if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end },
}
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1),debugPoly = false,rotation = v.rot, options = options,})
else
exports['qb-target']:AddBoxZone("stampxtc"..k ,vector3(v.loc.x, v.loc.y, v.loc.z), v.l, v.w, {name ="stampxtc"..k, heading = 156.0,minZ = v.loc.z-2, maxZ = v.loc.z+2, }, {options = options, distance = 1.5})
end
end
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
})
end
end) end)
+29 -67
View File
@@ -2,82 +2,44 @@ local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function() CreateThread(function()
local current = "g_m_y_famdnf_01" local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.requestModelTime) lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)] local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)]
travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false) local travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
FreezeEntityPosition(travellingmerchant, true) Freeze(travellingmerchant, true, CurrentLocation.w)
SetEntityInvincible(travellingmerchant, true) if Config.oxtarget then
if Config.OxInv then local options = {
if Config.oxtarget then { label = "Travelling Merchant", icon = "fas fa-eye", onSelect = function() lib.showContext('travellingmerchant') end},
options = { }
{ exports.ox_target:addLocalEntity(travellingmerchant, 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 else
if Config.oxtarget then exports['qb-target']:AddTargetEntity(travellingmerchant, {
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 = { options = {
{ { label = "Travelling Merchant", icon = "fas fa-eye", action = function() lib.showContext('travellingmerchant') end},
label = "Travelling Merchant", }
icon = "fas fa-eye", })
action = function()
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
end,
},
}
})
end
end end
end) end)
CreateThread(function() CreateThread(function()
local ShopMenu = {} local ShopMenu = {}
for k, v in pairs (Config.Items.items) do for k, v in pairs (Config.Items.items) do
ShopMenu[#ShopMenu + 1] = { ShopMenu[#ShopMenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, icon = GetImage(v.name),
header = v.label, description = '$'.. v.price,
title = v.label, title = GetLabel(v.name),
event = "md-drugs:client:travellingmerchantox", event = "md-drugs:client:travellingmerchantox",
args = { args = {
item = v.name, item = v.name,
cost = v.price, cost = v.price,
amount = v.amount, amount = v.amount,
} table = Config.Items.items,
num = k
} }
}
lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu}) lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu})
end end
end) end)
@@ -95,5 +57,5 @@ RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data) local di
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 }, { type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
}) })
if data.cost == "Free" then data.cost = 0 end if data.cost == "Free" then data.cost = 0 end
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost ) TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost, data.table, data.num )
end) end)
+129 -315
View File
@@ -1,6 +1,7 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {} local WeedPlant = {}
local exploded = nil local exploded = nil
local drying = false
function LoadModel(hash) function LoadModel(hash)
hash = GetHashKey(hash) hash = GetHashKey(hash)
RequestModel(hash) RequestModel(hash)
@@ -15,24 +16,15 @@ RegisterNetEvent('weed:respawnCane', function(loc)
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not WeedPlant[loc] then if not WeedPlant[loc] then
WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
SetEntityAsMissionEntity(WeedPlant[loc], true, true) Freeze(WeedPlant[loc],true, v.heading)
FreezeEntityPosition(WeedPlant[loc], true)
SetEntityHeading(WeedPlant[loc], v.heading)
exports['qb-target']:AddTargetEntity(WeedPlant[loc], { exports['qb-target']:AddTargetEntity(WeedPlant[loc], {
options = { options = {
{ {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "Pick Weed", label = "Pick Weed",
action = function() action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, { if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, TriggerServerEvent("weed:pickupCane", loc)
{ 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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -41,7 +33,8 @@ RegisterNetEvent('weed:respawnCane', function(loc)
else else
return true end end, return true end end,
} }
} },
distance = 2.5
}) })
end end
end) end)
@@ -57,24 +50,15 @@ RegisterNetEvent("weed:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then if not v.taken then
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
SetEntityAsMissionEntity(WeedPlant[k], true, true) Freeze(WeedPlant[k],true, v.heading)
FreezeEntityPosition(WeedPlant[k], true)
SetEntityHeading(WeedPlant[k], v.heading)
exports['qb-target']:AddTargetEntity(WeedPlant[k], { exports['qb-target']:AddTargetEntity(WeedPlant[k], {
options = { options = {
{ {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "Pick Weed", label = "Pick Weed",
action = function() action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, { if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, TriggerServerEvent("weed:pickupCane", k)
{ 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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -83,7 +67,8 @@ RegisterNetEvent("weed:init", function()
else else
return true end end, return true end end,
} }
} },
distance = 2.5
}) })
end end
end end
@@ -117,75 +102,80 @@ CreateThread(function()
for k, v in pairs (Config.WeedDry) do 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 exports['qb-target']:AddBoxZone("weeddry"..k,v,1.5, 1.75, {name = "weeddry"..k,heading = 11.0,debugPoly = false,minZ = v.z-2,maxZ = v.z+2,}, {
name = "weeddry"..k, options = {
heading = 11.0,
debugPoly = false,
minZ = v.z-2,
maxZ = v.z+2,
}, {
options = {
{ {
name = 'dryweed', name = 'dryweed',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Dry Weed", label = "Dry Weed",
distance = 1, distance = 1,
items = "wetcannabis", item = "wetcannabis",
action = function() action = function()
if drying then if drying then
QBCore.Functions.Notify("Already Drying One Out", "error") Notify(Lang.Weed.busy, "error")
else else
local loc = GetEntityCoords(PlayerPedId()) local loc = GetEntityCoords(PlayerPedId())
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false) local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true drying = true
FreezeEntityPosition(weedplant, true) FreezeEntityPosition(weedplant, true)
QBCore.Functions.Notify("Wait A little Bit To Dry", "success") Notify("Wait A little Bit To Dry", "success")
Wait(math.random(1000,5000)) Wait(math.random(1000,5000))
QBCore.Functions.Notify("Take Down The Weed", "success") Notify("Take Down The Weed", "success")
exports['qb-target']:AddTargetEntity(weedplant, { local options = {
options = { {
{ icon = "fas fa-sign-in-alt",
icon = "fas fa-sign-in-alt", label = "Pick Up Weed",
label = "Pick Up Weed", action = function()
action = function() DeleteEntity(weedplant)
DeleteEntity(weedplant) drying = false
drying = false TriggerServerEvent('md-drugs:server:dryoutweed')
TriggerServerEvent('md-drugs:server:dryoutweed') end,
end, canInteract = function()
canInteract = function() if Config.Joblock then
if Config.Joblock then if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then return true end
return true end else
else return true end end,
return true end end, }
} }
} local optionsox = {
}) {
icon = "fas fa-sign-in-alt",
label = "Pick Up Weed",
onSelect = 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,
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(weedplant, optionsox )
else
exports['qb-target']:AddTargetEntity(weedplant, {options = options})
end
end end
end, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end if drying == false then
return true end end
else else
return true end end, return true end end,
}, },
}, },
}) })
end end
exports['qb-target']:AddBoxZone("teleinweed",Config.Telein,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("teleinweed",Config.Telein,1.5, 1.75, {name = "teleinweed",heading = 11.0,debugPoly = false,minZ = Config.Telein.z-2,maxZ = Config.Telein.z+2,}, {
name = "teleinweed", options = {
heading = 11.0, { name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", distance = 2.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() action = function()
SetEntityCoords(PlayerPedId(),Config.Teleout) SetEntityCoords(PlayerPedId(),Config.Teleout)
@@ -196,26 +186,14 @@ options = {
return true end return true end
else else
return true end end, return true end end,
}, },
}, },
}) })
exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { name = "teleinweedout",heading = 11.0,debugPoly = false,minZ = Config.Teleout.z-2,maxZ = Config.Teleout.z+2,}, {
name = "teleinweedout",
heading = 11.0,
debugPoly = false,
minZ = Config.Teleout.z-2,
maxZ = Config.Teleout.z+2,
}, {
options = { options = {
{ { name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", distance = 2.0,
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
distance = 5,
action = function() action = function()
SetEntityCoords(PlayerPedId(),Config.Telein) SetEntityCoords(PlayerPedId(),Config.Telein)
end, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -223,40 +201,20 @@ options = {
return true end return true end
else else
return true end end, return true end end,
}, },
}, },
}) })
exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, {name = "MakeButter",heading = 11.0,debugPoly = false,minZ = Config.MakeButter.z-2,maxZ = Config.MakeButter.z+2,}, {
name = "MakeButter",
heading = 11.0,
debugPoly = false,
minZ = Config.MakeButter.z-2,
maxZ = Config.MakeButter.z+2,
}, {
options = { options = {
{ {
name = 'butter', name = 'butter',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Make Butter", label = "Make Butter",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('mdbutter') and not ItemCheck('grindedweed') then return end
QBCore.Functions.Progressbar("drink_something", "Making Canna Butter", 4000, false, true, { if not minigame(2, 8) then return end
disableMovement = false, if not progressbar(Lang.Weed.canna, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makebutter")
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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -271,23 +229,11 @@ options = {
label = "Make Brownies", label = "Make Brownies",
item = "cannabutter", item = "cannabutter",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('cannabutter') and not ItemCheck('flour') and not ItemCheck('chocolate') then return end
QBCore.Functions.Progressbar("drink_something", "Making Special Brownies", 4000, false, true, { if not minigame(2, 8) then return end
disableMovement = false, if not progressbar(Lang.Weed.brown, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makebrownies")
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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -302,23 +248,10 @@ options = {
label = "Make Cookies", label = "Make Cookies",
item = "cannabutter", item = "cannabutter",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('cannabutter') and not ItemCheck('flour') then return end
QBCore.Functions.Progressbar("drink_something", "Making Special Cookies", 4000, false, true, { if not minigame(2, 8) then return end
disableMovement = false, if not progressbar(Lang.Weed.cook, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makecookies")
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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -333,23 +266,10 @@ options = {
label = "Make Chocolate", label = "Make Chocolate",
item = "cannabutter", item = "cannabutter",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('cannabutter') and not ItemCheck('chocolate') then return end
QBCore.Functions.Progressbar("drink_something", "Making Special Chocolate", 4000, false, true, { if not minigame(2, 8) then return end
disableMovement = false, if not progressbar(Lang.Weed.choc, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makechocolate")
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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -364,23 +284,10 @@ options = {
label = "Make Muffin", label = "Make Muffin",
item = "cannabutter", item = "cannabutter",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('cannabutter') and not ItemCheck('flour') then return end
QBCore.Functions.Progressbar("drink_something", "Making Special Muffin", 4000, false, true, { if not minigame(2, 8) then return end
disableMovement = false, if not progressbar(Lang.Weed.muff, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makemuffin")
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, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -391,45 +298,27 @@ options = {
}, },
}, },
}) })
exports['qb-target']:AddBoxZone("makeoil",Config.MakeOil,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("makeoil",Config.MakeOil,1.5, 1.75, {name = "makeoil",heading = 11.0,debugPoly = false,minZ = Config.MakeOil.z-2,maxZ = Config.MakeOil.z+2,}, {
name = "makeoil",
heading = 11.0,
debugPoly = false,
minZ = Config.MakeOil.z-2,
maxZ = Config.MakeOil.z+2,
}, {
options = { options = {
{ {
name = 'Oil', name = 'Oil',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Make Oil", label = "Make Oil",
action = function() action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('butane') and not ItemCheck('grindedweed') then return end
QBCore.Functions.Progressbar("drink_something", "Making Wax Oil", 4000, false, true, { if not minigame(2, 8) then
disableMovement = false, local explosion = math.random(1,100)
disableCarMovement = false, local loc = GetEntityCoords(PlayerPedId())
disableMouse = false, if explosion <= 99 then
disableCombat = true, AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
disableInventory = true, exploded = true
}, {}, {}, {}, function()-- Done Notify(Lang.Weed.stovehot, "error")
exports['ps-ui']:Circle(function(success) Wait(1000 * 30)
if success then exploded = nil
TriggerServerEvent("md-drugs:server:makeoil") end
ClearPedTasks(PlayerPedId()) return end
else if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
local explosion = math.random(1,100) TriggerServerEvent("md-drugs:server:makeoil")
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, end,
canInteract = function() canInteract = function()
if exploded == nil then return true end if exploded == nil then return true end
@@ -469,131 +358,56 @@ RegisterNetEvent('md-drugs:client:bluntwraps', function(args)
title = 'Blunt Types', title = 'Blunt Types',
menu = 'bluntroll', menu = 'bluntroll',
options = { options = {
{ { title = 'Roll Blunt', description = 'Roll A Regular Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollblunt'},
title = 'Roll Blunt', { title = 'Dip Blunt Wrap In Lean', description = 'Roll A Lean Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollleanblunt'},
description = 'Roll A Regular Blunt', { title = 'Dip Blunt Wrap In Dextro', description = 'Roll A Dextro Blunt', icon = 'check', serverEvent = 'md-drugs:server:rolldextroblunt'},
icon = 'check', { title = 'Roll A Chewy Blunt', description = 'Roll A Chewy Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollchewyblunt'},
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') lib.showContext('bluntroll')
end) end)
RegisterNetEvent("md-drugs:client:rollanim", function() RegisterNetEvent("md-drugs:client:rollanim", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.Weed.roll, 4000, 'uncuff') then return end
Wait(4000) end)
ClearPedTasks(PlayerPedId()) RegisterNetEvent("md-drugs:client:grind", function()
if not progressbar("grinding", 4000, 'uncuff') then return end
end) end)
RegisterNetEvent("md-drugs:client:dodabs", function() RegisterNetEvent("md-drugs:client:dodabs", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar('Doing Dabs', 4000, 'bong2') then return end
AlienEffect() AlienEffect()
end) 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() CreateThread(function()
local WeedShop = {} local WeedShop = {}
local current = "u_m_m_jesus_01" local current = "u_m_m_jesus_01"
lib.requestModel(current, Config.requestModelTime)
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,
}, lib.requestModel(current, Config.RequestModelTime)
} local CurrentLocation = Config.WeedSaleman
local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
}) Freeze(WeedGuy, true, CurrentLocation.w)
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 for k, v in pairs (Config.Weed.items) do
WeedShop[#WeedShop + 1] = { WeedShop[#WeedShop + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, icon = GetImage(v.name),
header = v.label, title = GetLabel(v.name),
title = v.label, description = '$'.. v.price,
event = "md-drugs:client:WeedShop", event = "md-drugs:client:travellingmerchantox",
args = { args = {
item = v.name, item = v.name,
cost = v.price, cost = v.price,
amount = v.amount, amount = v.amount,
table = Config.Weed.items,
num = k,
} }
} }
lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop}) lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop})
end 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)
TriggerEvent('animations:client:EmoteCommandStart', {'smoke'})
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) end)
+82 -446
View File
@@ -1,456 +1,92 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local miss = false
local deliveryBlip = nil local deliveryBlip = nil
function PoliceCallWholesale()
print " tell your devs they didnt do something" RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
if not GetCops(Config.PoliceCount) then return end
if miss then
Notify('Already Called Someone', 'error')
else
TriggerServerEvent('md-drugs:server:RemoveBurner', drug)
Notify(notify, 'success')
local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
local timer = 0
miss = true
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)
repeat
Wait(1000)
timer = timer + 1
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
PoliceCall(Config.AlertPoliceWholesale)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 then
timer = 0
RemoveBlip(deliveryBlip)
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local current = "g_m_y_famdnf_01"
local 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:SuccessSale", drug)
Wait(4000)
DeleteEntity(drugdealer)
else
TriggerEvent("md-drugs:client:SetUp")
Wait(3000)
SetUpPeds()
Wait(4000)
DeleteEntity(drugdealer)
end
miss = false
end,
},
},
distance = 2.0
})
else
Notify('The Buyer Waited To Long')
RemoveBlip(deliveryBlip)
end
end 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", Config.requestModelTime)
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) end)
RegisterNetEvent("md-drugs:client:SuccessSale", function(drug)
RegisterNetEvent("md-drugs:client:successsalecoke") if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
AddEventHandler("md-drugs:client:successsalecoke", function() if drug == 'coke' then
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) TriggerServerEvent("md-drugs:server:wholesalecoke")
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { elseif drug == 'crack' then
disableMovement = false, TriggerServerEvent("md-drugs:server:wholesalecrack")
disableCarMovement = false, elseif drug == 'lsd' then
disableMouse = false, TriggerServerEvent("md-drugs:server:wholesalelsd")
disableCombat = true, elseif drug == 'heroin' then
disableInventory = true, TriggerServerEvent("md-drugs:server:wholesaleheroin")
}, {}, {}, {}, function()-- Done elseif drug == 'xtc' then
TriggerServerEvent("md-drugs:server:wholesalecoke") TriggerEvent("md-drugs:client:wholesalextc")
Citizen.Wait(4000) end
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:setupcoke")
AddEventHandler("md-drugs:client:setupcoke", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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", Config.requestModelTime)
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) end)
RegisterNetEvent("md-drugs:client:SetUp", function()
RegisterNetEvent("md-drugs:client:successsalecrack") progressbar("YOU FUCKED NOW", 4000, 'uncuff')
AddEventHandler("md-drugs:client:successsalecrack", function() SetUpPeds()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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", Config.requestModelTime)
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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", Config.requestModelTime)
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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", Config.requestModelTime)
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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) end)
+167 -792
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -3,7 +3,7 @@ author "mustache_dom"
description "drugs by mustache dom" description "drugs by mustache dom"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"
version '3.0.0' version '3.5.9'
client_scripts { client_scripts {
'client/**.lua', 'client/**.lua',
'@PolyZone/client.lua', '@PolyZone/client.lua',
@@ -19,6 +19,7 @@ server_scripts {
shared_scripts { shared_scripts {
'@ox_lib/init.lua', '@ox_lib/init.lua',
'shared/**.lua', 'shared/**.lua',
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File renamed without changes.
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Loaded 100 of 253 files, more files were not shown because too many files have changed in this diff. Show more