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 7238 additions and 7385 deletions

No files matched your search

+114 -88
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,7 +497,31 @@ 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
repeat -- repeats Wait(1000) only until
Wait(1000)
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0 -- either the distance is within 20 OR the driver is dead
if GetEntityHealth(driver) == 0 then -- once one of those thing ends, the loop breaks and carries on from here
if Config.oxtarget then
local options = {
{
name = 'leancar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
onSelect = 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,
}
}
exports.ox_target:addLocalEntity(leancar, options)
else
exports['qb-target']:AddTargetEntity(leancar, { exports['qb-target']:AddTargetEntity(leancar, {
options = { options = {
{ {
@@ -501,41 +529,25 @@ else
icon = 'fa-solid fa-car', icon = 'fa-solid fa-car',
label = 'Steal From Car', label = 'Steal From Car',
action = function() action = function()
local chance = math.random(1,100) if not minigame(2,8) then return end
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent('md-drugs:server:givelean') TriggerServerEvent('md-drugs:server:givelean')
started = nil started = nil
else if math.random(1,100) <= 30 then
started = nil
end
end, 5, 8)
if chance <= 30 then
DeleteVehicle(leancar) DeleteVehicle(leancar)
DeleteEntity(driver) DeleteEntity(driver)
DeleteEntity(pilot2) DeleteEntity(pilot2)
end end
end, end,
canInteract = function()
if IsEntityDead(driver) then
return true end
end,
} }
} }
}) })
end
else
repeat -- this second loop is to spawn the helicopter when the truck is in distance
Wait(1000) Wait(1000)
search = true until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0
CreateThread(function()
while search do
Wait(5000)
if IsEntityDead(driver) == false then
loc = #(GetEntityCoords(driver) - GetEntityCoords(pilot2))
if loc < 25.0 then
Wait( 3 * 1000) Wait( 3 * 1000)
search = false local heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
started = nil
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000) Wait(1000)
if DoesEntityExist(heli) then if DoesEntityExist(heli) then
SetEntityInvincible(pilot2, false) SetEntityInvincible(pilot2, false)
@@ -548,11 +560,6 @@ else
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true) heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
end end
end end
else
started = nil
end
end
end)
end end
end end
@@ -560,17 +567,17 @@ 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,6 +586,30 @@ 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)
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
if GetEntityHealth(methdriver) == 0 then
if Config.oxtarget then
local options = {
{
name = 'methcar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
onSelect = 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,
}
}
exports.ox_target:addLocalEntity(methcar, options)
else
exports['qb-target']:AddTargetEntity(methcar, { exports['qb-target']:AddTargetEntity(methcar, {
options = { options = {
{ {
@@ -586,43 +617,26 @@ else
icon = 'fa-solid fa-car', icon = 'fa-solid fa-car',
label = 'Steal From Car', label = 'Steal From Car',
action = function() action = function()
local chance = math.random(1,100) if not minigame(2,8) then return end
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent('md-drugs:server:givemethingridients') TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = nil startedmeth = nil
else if math.random(1,100) <= 30 then
startedmeth = nil
end
end, 5, 8)
print(chance)
if chance <= 30 then
DeleteVehicle(methcar) DeleteVehicle(methcar)
DeleteEntity(methdriver) DeleteEntity(methdriver)
DeleteEntity(methpilot) DeleteEntity(methpilot)
end end
end, end,
canInteract = function()
if IsEntityDead(methdriver) then
return true end
end,
} }
} }
}) })
end
else
repeat
Wait(1000) Wait(1000)
searchmeth = true until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0
CreateThread(function()
while searchmeth do
Wait(1000)
local pickuploc = GetEntityCoords(methcar)
if IsEntityDead(methdriver) == false then
loc = #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot))
if loc < 25.0 then
Wait( 3 * 1000) Wait( 3 * 1000)
startedmeth = nil local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
methheli = CreateVehicle(`cargobob3`, pickuploc.x, pickuploc.y, pickuploc.z+4, 80, true,true) Wait(1000)
Wait(10)
if DoesEntityExist(methheli) then if DoesEntityExist(methheli) then
SetEntityInvincible(methpilot, false) SetEntityInvincible(methpilot, false)
CreatePickUpRopeForCargobob(methheli, 1) CreatePickUpRopeForCargobob(methheli, 1)
@@ -631,17 +645,10 @@ else
SetEntityAsMissionEntity(methheli) SetEntityAsMissionEntity(methheli)
SetPedIntoVehicle(methpilot, methheli, -1) 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) 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 else
methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true) methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
end end
end end
else
startedmeth = nil
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)
+102 -95
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,28 +53,31 @@ 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], {
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(k) 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", k)
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(k) then return end
end
}
}
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)
@@ -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
if Config.FancyCokeAnims then
CutCoke() 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
if Config.FancyCokeAnims then
BagCoke() 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
name = "cutcokepowder",
heading = 11.0,
debugPoly = false,
minZ = cut.z-1,
maxZ = cut.z+1,
}, {
options = {
{
type = "client",
event = "md-drugs:client:cutcokeone",
icon = "fas fa-sign-in-alt",
label = "cut up",
canInteract = function()
if cuttingcoke == nil and baggingcoke == nil then return true end if cuttingcoke == nil and baggingcoke == nil then return true end
end end
}, },
}, }
distance = 2.5 local options2 = {
}) { type = "client", event = "md-drugs:client:bagcoke", icon = "fas fa-sign-in-alt", label = "bagging", 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 baggingcoke == nil and cuttingcoke == nil then return true end end }, }
name = "bagcokepowder", if Config.oxtarget then
heading = 11.0, exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options})
debugPoly = false, exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options2})
minZ = bagg.z-1, else
maxZ = bagg.z+1, 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 })
}, { 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})
options = {
{
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 end
if Config.FancyCokeAnims == false then
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 = {
{ type = "client", event = "md-drugs:client:cutcokeone", icon = "fas fa-sign-in-alt", label = "Cut Coke", 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("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})
end
end
for k, v in pairs (Config.BaggingCoke) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:bagcoke", icon = "fas fa-sign-in-alt", label = "Bag Coke", data = k, distance = 2.0,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}, },
distance = 2.5 }
}) 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("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)
+11 -19
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",
anim = "pill",
flags = 49,
}, {}, {}, function()
ClearPedTasks(PlayerPedId())
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then
AlienEffect()
elseif itemName == "cupoflean" or itemName == "cupofdextro" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
CokeBaggyEffect()
else else
TrevorEffect() TriggerServerEvent('md-drugs:server:updatestatus', status, statval)
end end
end) TriggerEvent('evidence:client:SetStatus', 'widepupils', 200)
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
if status == nil then return end
end) end)
+126 -289
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,
canInteract = function(entity)
if IsEntityDead(entity) then
return true
end
end
}
},
distance = 1.5,
})
CreateThread(function()
while stealingPed do
local playerPed = PlayerPedId()
local pos = GetEntityCoords(playerPed)
local pedpos = GetEntityCoords(stealingPed)
local dist = #(pos - pedpos)
if dist > 100 then
stealingPed = nil
stealData = {}
exports['qb-target']:RemoveZone('stealingPed')
break
end
Wait(0)
end
end)
end
end
local function SellToPed(ped)
hasTarget = true
for i = 1, #lastPed, 1 do
if lastPed[i] == ped then
hasTarget = false
return
end
end
local successChance = math.random(1, 100)
local scamChance = math.random(1, 100)
local getRobbed = math.random(1, 100)
if successChance <= QBConfig.SuccessChance then hasTarget = false return end
local drugType = math.random(1, #availableDrugs)
local bagAmount = math.random(1, availableDrugs[drugType].amount)
if bagAmount > 15 then bagAmount = math.random(9, 15) end
currentOfferDrug = availableDrugs[drugType]
local ddata = QBConfig.DrugsPrice[currentOfferDrug.item]
local randomPrice = math.random(ddata.min, ddata.max) * bagAmount
if scamChance <= QBConfig.ScamChance then randomPrice = math.random(3, 10) * bagAmount end
SetEntityAsNoLongerNeeded(ped)
ClearPedTasks(ped)
local coords = GetEntityCoords(PlayerPedId(), true)
local pedCoords = GetEntityCoords(ped)
local pedDist = #(coords - pedCoords)
if getRobbed <= QBConfig.RobberyChance then
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
else
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
end
while pedDist > 1.5 do
coords = GetEntityCoords(PlayerPedId(), true)
pedCoords = GetEntityCoords(ped)
if getRobbed <= QBConfig.RobberyChance then
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
else
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
end
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
pedDist = #(coords - pedCoords)
Wait(100)
end
TaskLookAtEntity(ped, PlayerPedId(), 5500.0, 2048, 3)
TaskTurnPedToFaceEntity(ped, PlayerPedId(), 5500)
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
if hasTarget then
while pedDist < 3.0 and not IsPedDeadOrDying(ped) do
local coords2 = GetEntityCoords(PlayerPedId(), true)
local pedCoords2 = GetEntityCoords(ped)
local pedDist2 = #(coords2 - pedCoords2)
if getRobbed <= QBConfig.RobberyChance then
TriggerServerEvent('md-drugs:server:robCornerDrugs', drugType, bagAmount)
QBCore.Functions.Notify("You Got Robbed " .. bagAmount .. " Bags of " .. currentOfferDrug.item.. "!")
stealingPed = ped
stealData = {
item = availableDrugs[drugType].item,
drugType = drugType,
amount = bagAmount,
}
hasTarget = false
local moveto = GetEntityCoords(PlayerPedId())
local movetoCoords = {x = moveto.x + math.random(100, 500), y = moveto.y + math.random(100, 500), z = moveto.z, }
ClearPedTasksImmediately(ped)
TaskGoStraightToCoord(ped, movetoCoords.x, movetoCoords.y, movetoCoords.z, 15.0, -1, 0.0, 0.0)
lastPed[#lastPed + 1] = ped
RobberyPed()
break
else
if pedDist2 < 1.5 and cornerselling then
if Config.UseTarget and not zoneMade then
zoneMade = true
exports['qb-target']:AddTargetEntity(ped, {
options = {
{
icon = 'fas fa-hand-holding-dollar',
label = "Sell " ..bagAmount.. " of " .. currentOfferDrug.item.. " for " .. randomPrice .. " Dollars! ",
action = function(entity)
local playerPed = PlayerPedId()
if IsPedInAnyVehicle(PlayerPedId(), false) then
QBCore.Functions.Notify("youre in a car", 'error')
hasTarget = false
SetPedKeepTask(entity, false)
SetEntityAsNoLongerNeeded(entity)
ClearPedTasksImmediately(entity)
lastPed[#lastPed + 1] = entity
return
else
QBCore.Functions.Progressbar("cornerSelling", "selling Drugs", '5000', false, false, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = false,
}, {}, {}, {}, function()
TriggerServerEvent('md-drugs:server:sellCornerDrugs', drugType, bagAmount, randomPrice)
hasTarget = false
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, end,
canInteract = function() canInteract = function()
if IsEntityDead(ped) == false then return true end if not targbusy then return true end end,
end distance = 2.0
}, },
{ { label = 'Deny Price', icon = "fas fa-eye",
icon = 'fas fa-x', onSelect = function()
label = 'Decline offer', PoliceCall(20)
action = function(entity) targbusy = true
QBCore.Functions.Notify("Fuck that Offer", 'error') if not progressbar('Telling This Dumbass To Leave!', 4000, 'argue5') then return end
hasTarget = false FreezeEntityPosition(targ, false)
SetPedKeepTask(entity, false) ClearPedTasks(targ)
SetEntityAsNoLongerNeeded(entity) Wait(10000)
ClearPedTasksImmediately(entity) DeletePed(targ)
lastPed[#lastPed + 1] = entity targbusy = false
exports['qb-target']:RemoveZone('sellingPed') sold = true
end, end,
canInteract = function()
if not targbusy then return true end end,
distance = 2.0
}, },
}, }
distance = 1.5, local optionsqb = {
}) { label = 'Sell ' .. bagAmount .. ' Of ' .. GetLabel(item) .. ' For $' .. price .. '!', icon = "fas fa-eye",
end action = function()
else PoliceCall(20)
if Config.UseTarget then targbusy = true
zoneMade = false if IsPedInAnyVehicle(PlayerPedId(), true) then
exports['qb-target']:RemoveZone('sellingPed') 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
end,
canInteract = function()
if not targbusy then return true end end,
distance = 2.0
},
{ label = 'Deny Price', icon = "fas fa-eye",
action = function()
PoliceCall(20)
targbusy = true
if not progressbar('Telling This Dumbass To Leave!', 4000, 'argue5') then return end
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
end,
canInteract = function()
if not targbusy then return true end end,
distance = 2.0
},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(targ, options)
else
exports['qb-target']:AddTargetEntity(targ, { options = optionsqb, distance = 2.0})
end end
hasTarget = false repeat
SetPedKeepTask(ped, false) Wait(1000)
SetEntityAsNoLongerNeeded(ped) until sold
ClearPedTasksImmediately(ped) if sold then sold = false return true end
lastPed[#lastPed + 1] = ped
break
end
end
Wait(0)
end
Wait(math.random(4000, 7000))
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
Notify('Lazy Ass Cant Even Sell Drugs', 'error')
sell = false
else else
if result then sell = true
availableDrugs = result Notify('Go Make That Paper', 'success')
ToggleSelling() repeat
else Wait(1000)
QBCore.Functions.Notify("what you gonna sell fuckin air or something?", 'error') if not Cornersell() then end
LocalPlayer.state:set("inv_busy", false, true) until sell == false
end
end end
else else
QBCore.Functions.Notify("not enough pork", "error") Notify('You Cant Sell Air', 'error')
end end
end)
end) end)
RegisterNetEvent('police:SetCopCount', function(amount)
CurrentCops = amount
end)
RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items)
availableDrugs = items
if availableDrugs == nil or #availableDrugs <= 0 then
QBCore.Functions.Notify("no Drugs", 'error')
cornerselling = false
LocalPlayer.state:set("inv_busy", false, true)
end
end)
+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)
+28 -40
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,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true) TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
activeDelivery = nil activeDelivery = nil
exports['qb-target']:RemoveZone('drugDeliveryZone') exports['qb-target']:RemoveZone('drugDeliveryZone')
ClearPedTasks(PlayerPedId()) 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
+72 -176
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 = {
{
type = "client",
label = "Buy Heroin Lab Kit",
icon = "fas fa-eye",
event = "md-drugs:client:buyheroinlabkit"
},
} }
if Config.oxtarget then
}) exports.ox_target:addLocalEntity(heroinkitdealer, options)
else
exports['qb-target']:AddTargetEntity(heroinkitdealer, { options = options, distance = 2.0})
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, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", loc) 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, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", k) 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'})
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") 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",
icon = "fas fa-box-circle-check",
label = "Cook Heroin",
},
{
event = "md-drugs:client:getheroinkitback",
icon = "fas fa-box-circle-check",
label = "Pick Up",
canInteract = function()
if herointable then return true end end
},
} }
}) if Config.oxtarget then
exports.ox_target:addLocalEntity(heroinlabkit, options)
else
exports['qb-target']:AddTargetEntity(heroinlabkit, {options = options})
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:heatliquidheroin")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheatingheroin") TriggerServerEvent("md-drugs:server:failheatingheroin")
ClearPedTasks(PlayerPedId()) DeleteObject(data.data)
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 = {
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, { { event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = 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 )
else
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {options = options})
end end
end, 1, 8) -- NumberOfCircles, MS 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)
+78 -260
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 = {
{
type = "client",
label = "Buy LSD Lab Kit",
icon = "fas fa-eye",
event = "md-drugs:client:buylabkit"
} }
} if Config.oxtarget then
}) exports.ox_target:addLocalEntity(tabdealer, options)
else
exports['qb-target']:AddTargetEntity(tabdealer, {options = options, distance = 2.0})
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,
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) 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'})
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Packing Up", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
DeleteObject(labkit)
TriggerServerEvent('md-drugs:server:getlabkitback') TriggerServerEvent('md-drugs:server:getlabkitback')
ClearPedTasks(PlayerPedId())
tableout = false 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,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:heatliquid")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheating") TriggerServerEvent("md-drugs:server:failheating")
ClearPedTasks(PlayerPedId()) DeleteObject(data.data)
DeleteObject(labkit) local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
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 = {
{
event = "md-drugs:client:cleanlabkit",
icon = "fas fa-box-circle-check",
label = "Clean It",
},
} }
}) if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkit, options)
else
exports['qb-target']:AddTargetEntity(dirtylabkit, { options = options})
end end
end, 1, 8) -- NumberOfCircles, MS return end
end) if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
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, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
tableout = false tableout = false
TriggerServerEvent("md-drugs:server:removecleaningkit") TriggerServerEvent("md-drugs:server:removecleaningkit", data.data)
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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:refinequalityacid") 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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:maketabpaper") TriggerServerEvent("md-drugs:server:maketabpaper")
else end)
TriggerServerEvent("md-drugs:server:failtabs")
end RegisterNetEvent("md-drugs:client:buytabs", function(data)
end, 3, 8) -- NumberOfCircles, if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
end) TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
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, {
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") 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)
+14 -74
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()
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 distance = 2.5
}) })
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",
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 distance = 2.5
}) })
end end
end end
@@ -119,32 +74,18 @@ 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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:drymescaline") 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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
if chance <= Config.Badtrip then if chance <= Config.Badtrip then
AlienEffect() AlienEffect()
clone = ClonePed(PlayerPedId(), false, false, true) clone = ClonePed(PlayerPedId(), false, false, true)
@@ -171,5 +112,4 @@ local chance2 = math.random(1,100)
else else
AlienEffect() AlienEffect()
end end
end)
end) end)
+164 -181
View File
@@ -2,148 +2,86 @@ 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()
CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
RefreshInterior(BikerMethLab.interiorId)
end)
CreateThread(function()
exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "methteleout",
heading = 11.0,
debugPoly = false,
minZ = Config.MethTeleIn.z - 2,
maxZ = Config.MethTeleIn.z + 2,
}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
action = function()
SetEntityCoords(PlayerPedId(), Config.MethTeleOut)
end,
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "methtelein",
heading = 11.0,
debugPoly = false,
minZ = Config.MethTeleOut.z - 2,
maxZ = Config.MethTeleOut.z + 2,
}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
action = function()
SetEntityCoords(PlayerPedId(), Config.MethTeleIn)
end,
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "maze",
heading = 11.0,
debugPoly = false,
minZ = 44 - 2,
maxZ = 44 + 2,
}, {
options = {
{
name = 'die',
icon = "fas fa-sign-in-alt",
label = "dont click this",
action = function()
SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93))
end,
},
},
distance = 2.5
})
local itemreqcook = { "ephedrine", "acetone" }
exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75,
{ -- 963.37, .z-2122.95, 31.47
name = "ingridientsmeth",
heading = 11.0,
debugPoly = false,
minZ = -39 - 2,
maxZ = -39 + 2,
}, {
options = {
{
name = 'methcook',
icon = "fas fa-sign-in-alt",
label = "Cook Meth",
item = itemreqcook,
action = function()
if amonia == nil then if amonia == nil then
amonia = true active = true
TriggerServerEvent("md-drugs:server:startcook") TriggerServerEvent("md-drugs:server:startcook")
MethCooking() MethCooking()
exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75, amonia = true
{ -- 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 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) AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
ClearPedTasks(PlayerPedId()) ClearPedTasks(PlayerPedId())
amonia = nil amonia = nil
exports['qb-target']:RemoveZone("adjustdials") active = nil
end return end
end, 2, 8) -- NumberOfCircles, Notify(Lang.meth.increaseheat, "success")
ClearPedTasks(PlayerPedId())
heated = true
else else
end end
end, end
},
}, local function smash()
}) if tray then
else tray = false
QBCore.Functions.Notify("Theres Stuff Inside", "error") DeleteObject(trays)
end local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
end, SetEntityHeading(bucket, 90.0)
canInteract = function() SmashMeth()
if amonia == nil then
return true local options = {
end
end,
},
{ {
name = 'grabtray', name = 'bucket',
icon = "fas fa-sign-in-alt", icon = 'fa-solid fa-car',
label = "Grab Tray", label = 'Bag Meth',
distance = 5,
action = function() 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 if amonia then
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@') RequestAnimDict('anim@heists@box_carry@')
@@ -156,60 +94,50 @@ CreateThread(function()
while not HasModelLoaded("bkr_prop_meth_tray_02a") do while not HasModelLoaded("bkr_prop_meth_tray_02a") do
Wait(0) Wait(0)
end end
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) 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, AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
tray = true tray = true
exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75, end
{ -- 963.37, .z-2122.95, 31.47 end
name = "boxmeth", CreateThread(function()
heading = 3.0, BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
debugPoly = false, BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
minZ = -39 - 2, BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
maxZ = -39 + 2, BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
}, { RefreshInterior(BikerMethLab.interiorId)
options = { end)
{
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,
} CreateThread(function()
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,}, {
options = {
{name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end},
}, },
distance = 2.5
}) })
end 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,}, {
end, options = {
{ name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end },
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { name = "maze", heading = 11.0, debugPoly = false, minZ = 44 - 2, maxZ = 44 + 2, }, {
options = {
{ name = 'die', icon = "fas fa-sign-in-alt", label = "dont click this", action = function() SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93)) end},
},
distance = 2.5
})
local itemreqcook = { "ephedrine", "acetone" }
exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75,{ name = "ingridientsmeth", heading = 11.0, debugPoly = false, minZ = -39 - 2, maxZ = -39 + 2,}, {
options = {
{ name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", item = itemreqcook, action = function() startcook() end,
canInteract = function() canInteract = function()
if tray then return true end if amonia == nil and active == nil then
end, return true
},
},
})
end end
end, end,
},
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 5, action = function() trayscarry() end,
canInteract = function() 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,
@@ -217,26 +145,81 @@ CreateThread(function()
}, },
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)
+36 -63
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)]
@@ -60,41 +52,30 @@ AddEventHandler("md-drugs:client:getoxylocationroute", function()
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@')
@@ -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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:giveoxybox") TriggerServerEvent("md-drugs:server:giveoxybox")
ClearPedTasks(PlayerPedId()) DeleteEntity(data.ped)
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true) DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage) DeleteObject(carryPackage)
carryPackage = nil carryPackage = nil
end)
else else
QBCore.Functions.Notify("cant be empty handed idiot", "error") Notify(Lang.oxy.empty, "error")
end end
end) end)
+24 -125
View File
@@ -1,146 +1,49 @@
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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
if itemName == "vicodin" then if itemName == "vicodin" then
exports['ps-buffs']:AddHealthBuff(10000, 20) exports['ps-buffs']:AddHealthBuff(10000, 20)
elseif itemName == "adderal" then elseif itemName == "adderal" then
@@ -150,8 +53,4 @@ RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
else else
exports['ps-buffs']:AddHealthBuff(10000, 40) exports['ps-buffs']:AddHealthBuff(10000, 40)
end end
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end) end)
+7 -55
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",
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 distance = 2.5
}) })
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",
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 distance = 2.5
}) })
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,
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) TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect() EcstasyEffect()
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end) end)
+236 -625
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)
+15 -53
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.OxInv then
if Config.oxtarget then if Config.oxtarget then
options = { local options = {
{ { label = "Travelling Merchant", icon = "fas fa-eye", onSelect = function() lib.showContext('travellingmerchant') end},
label = "Travelling Merchant",
icon = "fas fa-eye",
onSelect = function()
lib.showContext('travellingmerchant')
end,
},
} }
exports.ox_target:addLocalEntity(travellingmerchant, options) exports.ox_target:addLocalEntity(travellingmerchant, options)
else else
exports['qb-target']:AddTargetEntity(travellingmerchant, { 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()
lib.showContext('travellingmerchant')
end,
},
} }
}) })
end end
else
if Config.oxtarget then
options = {
{
label = "Travelling Merchant",
icon = "fas fa-eye",
onSelect = function()
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
end,
},
}
exports.ox_target:addLocalEntity(travellingmerchant, options)
else
exports['qb-target']:AddTargetEntity(travellingmerchant, {
options = {
{
label = "Travelling Merchant",
icon = "fas fa-eye",
action = function()
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
end,
},
}
})
end
end
end) 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)
+90 -276
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, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("weed:pickupCane", loc) 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, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("weed:pickupCane", k) 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,33 +102,26 @@ 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",
@@ -160,8 +138,14 @@ options = {
return true end end, return true end end,
} }
} }
}) local optionsox = {
end {
icon = "fas fa-sign-in-alt",
label = "Pick Up Weed",
onSelect = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end, end,
canInteract = function() canInteract = function()
if Config.Joblock then if Config.Joblock then
@@ -169,23 +153,29 @@ options = {
return true end return true end
else else
return true end end, 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,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
if drying == false then
return true end end
else
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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebutter") 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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebrownies") 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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makecookies") 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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makechocolate") 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,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makemuffin") 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,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeoil")
ClearPedTasks(PlayerPedId())
else
local explosion = math.random(1,100) local explosion = math.random(1,100)
local loc = GetEntityCoords(PlayerPedId()) local loc = GetEntityCoords(PlayerPedId())
if explosion <= 99 then if explosion <= 99 then
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true) AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
exploded = true exploded = true
QBCore.Functions.Notify("Stove Is Too Hot Wait 30 Seconds To Cool Down", "error") Notify(Lang.Weed.stovehot, "error")
Wait(1000 * 30) Wait(1000 * 30)
exploded = nil exploded = nil
end end
ClearPedTasks(PlayerPedId()) return end
end if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
end, 3, 8) -- NumberOfCircles, TriggerServerEvent("md-drugs:server:makeoil")
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) lib.requestModel(current, Config.RequestModelTime)
WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false) local CurrentLocation = Config.WeedSaleman
FreezeEntityPosition(WeedGuy, true) local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
SetEntityInvincible(WeedGuy, true) Freeze(WeedGuy, true, CurrentLocation.w)
SetEntityHeading(WeedGuy, 270.0)
exports['qb-target']:AddTargetEntity(WeedGuy, { exports['qb-target']:AddTargetEntity(WeedGuy, {
options = { options = {
{ {label = "Weed Shop",icon = "fas fa-eye",action = function() lib.showContext('WeedShop')end},
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)
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) end)
+78 -442
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'})
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:wholesalecoke") TriggerServerEvent("md-drugs:server:wholesalecoke")
Citizen.Wait(4000) elseif drug == 'crack' then
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)
RegisterNetEvent("md-drugs:client:successsalecrack")
AddEventHandler("md-drugs:client:successsalecrack", 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:wholesalecrack") TriggerServerEvent("md-drugs:server:wholesalecrack")
Citizen.Wait(4000) elseif drug == 'lsd' then
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") TriggerServerEvent("md-drugs:server:wholesalelsd")
DeleteEntity(drugdealer) elseif drug == 'heroin' then
ClearPedTasks(PlayerPedId()) TriggerServerEvent("md-drugs:server:wholesaleheroin")
end) elseif drug == 'xtc' then
TriggerEvent("md-drugs:client:wholesalextc")
end
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) RegisterNetEvent("md-drugs:client:SetUp", function()
ClearPedTasks(PlayerPedId()) progressbar("YOU FUCKED NOW", 4000, 'uncuff')
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() 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)
+154 -779
View File
@@ -1,837 +1,212 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local xtcpress = false local xtcpress = false
RegisterNetEvent("md-drugs:client:setpressquad")
AddEventHandler("md-drugs:client:setpressquad", function()
if xtcpress then
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
else
local PedCoords = GetEntityCoords(PlayerPedId())
xtcpress = true
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
Wait(4000)
ClearPedTasks(PlayerPedId())
quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(quadpress)
exports['qb-target']:AddTargetEntity(quadpress, {
options = {
{
event = "md-drugs:client:makextcquad",
icon = 'fas fa-eye',
label = 'Make White quad Stack',
},
{
event = "md-drugs:client:makeredxtcquad",
icon = 'fas fa-eye',
label = 'Make Red quad Stack',
}, RegisterNetEvent("md-drugs:client:setpress", function(type)
{
event = "md-drugs:client:makeorangextcquad",
icon = 'fas fa-eye',
label = 'Make orange quad Stack',
},
{
event = "md-drugs:client:makebluextcquad",
icon = 'fas fa-eye',
label = 'Make blue quad Stack',
},
{
event = "md-drugs:client:getquadpressback",
icon = "fas fa-eye",
label = "Pick Up",
canInteract = function()
if xtcpress then return true end end
},
}
})
end
end)
RegisterNetEvent("md-drugs:client:setpresstriple")
AddEventHandler("md-drugs:client:setpresstriple", function()
if xtcpress then if xtcpress then
QBCore.Functions.Notify('You Have A Press Out Already', 'error') Notify(Lang.xtc.out, 'error')
else else
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords = GetEntityCoords(PlayerPedId())
xtcpress = true xtcpress = true
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) progressbar('Setting Press On The Ground', 4000, 'uncuff')
Wait(4000) local press = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
ClearPedTasks(PlayerPedId()) PlaceObjectOnGroundProperly(press)
triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(triplepress) local options = {
exports['qb-target']:AddTargetEntity(triplepress, {
options = {
{ {
event = "md-drugs:client:makextctriple", icon = "fas fa-eye",
icon = 'fas fa-eye', label = "Make XTC",
label = 'Make White triple Stack', action = function()
TriggerEvent("md-drugs:client:XTCMenu", type)
end,
canInteract = function()
if xtcpress then return true end end
}, },
{ {
event = "md-drugs:client:makeredxtctriple",
icon = 'fas fa-eye',
label = 'Make Red triple Stack',
},
{
event = "md-drugs:client:makeorangextctriple",
icon = 'fas fa-eye',
label = 'Make orange triple Stack',
},
{
event = "md-drugs:client:makebluextctriple",
icon = 'fas fa-eye',
label = 'Make blue triple Stack',
},
{
event = "md-drugs:client:gettriplepressback",
icon = "fas fa-eye", icon = "fas fa-eye",
label = "Pick Up", label = "Pick Up",
action = function()
TriggerEvent("md-drugs:client:GetPressBack", type, press)
end,
canInteract = function() canInteract = function()
if xtcpress then return true end end if xtcpress then return true end end
}, },
} }
}) local optionsox = {
{
icon = "fas fa-eye",
label = "Make XTC",
onSelect = function()
TriggerEvent("md-drugs:client:XTCMenu", type)
end,
canInteract = function()
if xtcpress then return true end end
},
{
icon = "fas fa-eye",
label = "Pick Up",
onSelect = function()
TriggerEvent("md-drugs:client:GetPressBack", type, press)
end,
canInteract = function()
if xtcpress then return true end end
},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(press, optionsox)
else
exports['qb-target']:AddTargetEntity(press, { options = options})
end
end end
end) end)
RegisterNetEvent("md-drugs:client:setpressdual") RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
AddEventHandler("md-drugs:client:setpressdual", function() lib.registerContext({
if xtcpress then id = 'XTCmenu',
QBCore.Functions.Notify('You Have A Press Out Already', 'error') title = 'XTC Menu',
else
local PedCoords = GetEntityCoords(PlayerPedId())
xtcpress = true
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
Wait(4000)
ClearPedTasks(PlayerPedId())
dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(dualpress)
exports['qb-target']:AddTargetEntity(dualpress, {
options = { options = {
{ {
event = "md-drugs:client:makextcdual", icon = GetImage('white_xtc'),
icon = 'fas fa-eye', title = 'White XTC',
label = 'Make White dual Stack', description = '1 X Raw XTC',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'white'}
},
{
icon = GetImage('red_xtc'),
title = 'Red XTC',
description = '1 X Raw XTC and 1 X Loose Coke',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'red'}
},
{
icon = GetImage('orange_xtc'),
title = 'Orange XTC',
description = '1 X Raw XTC and 1 X Heroin Vial',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'orange'}
},
{
icon = GetImage('blue_xtc'),
title = 'Blue XTC',
description = '1 X Raw XTC and 1 X Crack Rock',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'blue'}
},
},
{
event = "md-drugs:client:makeredxtcdual",
icon = 'fas fa-eye',
label = 'Make Red dual Stack',
},
{
event = "md-drugs:client:makeorangextcdual",
icon = 'fas fa-eye',
label = 'Make orange dual Stack',
},
{
event = "md-drugs:client:makebluextcdual",
icon = 'fas fa-eye',
label = 'Make blue dual Stack',
},
{
event = "md-drugs:client:getdualpressback",
icon = "fas fa-eye",
label = "Pick Up",
canInteract = function()
if xtcpress then return true end end
},
} }
}) })
end lib.showContext('XTCmenu')
end) end)
RegisterNetEvent("md-drugs:client:setpresssingle") RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
AddEventHandler("md-drugs:client:setpresssingle", function() if not progressbar('Packing Up The Press', 5000, 'uncuff') then return end
if xtcpress then DeleteObject(press)
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
else
local PedCoords = GetEntityCoords(PlayerPedId())
xtcpress = true
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
Wait(4000)
ClearPedTasks(PlayerPedId())
singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(singlepress)
exports['qb-target']:AddTargetEntity(singlepress, {
options = {
{
event = "md-drugs:client:makextcsingle",
icon = 'fas fa-eye',
label = 'Make White Single Stack',
},
{
event = "md-drugs:client:makeredxtcsingle",
icon = 'fas fa-eye',
label = 'Make Red Single Stack',
},
{
event = "md-drugs:client:makeorangextcsingle",
icon = 'fas fa-eye',
label = 'Make orange Single Stack',
},
{
event = "md-drugs:client:makebluextcsingle",
icon = 'fas fa-eye',
label = 'Make blue Single Stack',
},
{
event = "md-drugs:client:getsinglepressback",
icon = "fas fa-eye",
label = "Pick Up",
canInteract = function()
if xtcpress then return true end end
},
}
})
end
end)
RegisterNetEvent("md-drugs:client:getsinglepressback")
AddEventHandler("md-drugs:client:getsinglepressback", function()
xtcpress = false
DeleteObject(singlepress)
TriggerServerEvent("md-drugs:server:getsinglepressback")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:getdualpressback")
AddEventHandler("md-drugs:client:getdualpressback", function()
xtcpress = false
DeleteObject(dualpress)
TriggerServerEvent("md-drugs:server:getdualpressback")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:gettriplepressback")
AddEventHandler("md-drugs:client:gettriplepressback", function()
xtcpress = false xtcpress = false
DeleteObject(triplepress) TriggerServerEvent("md-drugs:server:getpressback", type)
TriggerServerEvent("md-drugs:server:gettriplepressback")
ClearPedTasks(PlayerPedId())
end) end)
RegisterNetEvent("md-drugs:client:getquadpressback") RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
AddEventHandler("md-drugs:client:getquadpressback", function() if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
xtcpress = false if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
DeleteObject(quadpress) TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
TriggerServerEvent("md-drugs:server:getquadpressback")
ClearPedTasks(PlayerPedId())
end) end)
RegisterNetEvent("md-drugs:client:stealisosafrole")
AddEventHandler("md-drugs:client:stealisosafrole", function() RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, { if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
disableMovement = false, TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stealisosafrole")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end) end)
RegisterNetEvent("md-drugs:client:stealmdp2p")
AddEventHandler("md-drugs:client:stealmdp2p", function() RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not ItemCheck('isosafrole') then return end
QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, { if not ItemCheck('mdp2p') then return end
disableMovement = false, if not progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
disableCarMovement = false, TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stealmdp2p")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end) end)
RegisterNetEvent("md-drugs:client:makingrawxtc") RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
AddEventHandler("md-drugs:client:makingrawxtc", function() if not ItemCheck('raw_xtc') then return end
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) if not progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, { TriggerServerEvent("md-drugs:server:makextc",data)
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makingrawxtc")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
---------------------------- unstamped just xtc
RegisterNetEvent("md-drugs:client:makextcsingle")
AddEventHandler("md-drugs:client:makextcsingle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makextcsingle")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 4, 8) -- NumberOfCircles, MS
end)
end) end)
RegisterNetEvent("md-drugs:client:makextcdual")
AddEventHandler("md-drugs:client:makextcdual", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makextcdual")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makextctriple")
AddEventHandler("md-drugs:client:makextctriple", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makextctriple")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makextcquad")
AddEventHandler("md-drugs:client:makextcquad", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makextcquad")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
-------------------------------------------------
RegisterNetEvent("md-drugs:client:makeredxtcsingle")
AddEventHandler("md-drugs:client:makeredxtcsingle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeredxtcsingle")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 4, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeredxtcdual")
AddEventHandler("md-drugs:client:makeredxtcdual", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeredxtcdual")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeredxtctriple")
AddEventHandler("md-drugs:client:makeredxtctriple", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeredxtctriple")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeredxtcquad")
AddEventHandler("md-drugs:client:makeredxtcquad", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeredxtcquad")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
--------------------------------------------------------------- making orange unstamped
RegisterNetEvent("md-drugs:client:makeorangextcsingle")
AddEventHandler("md-drugs:client:makeorangextcsingle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeorangextcsingle")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 4, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeorangextcdual")
AddEventHandler("md-drugs:client:makeorangextcdual", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeorangextcdual")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeorangextctriple")
AddEventHandler("md-drugs:client:makeorangextctriple", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeorangextctriple")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makeorangextcquad")
AddEventHandler("md-drugs:client:makeorangextcquad", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeorangextcquad")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
--------------------------------------- blue unstamped
RegisterNetEvent("md-drugs:client:makebluextcsingle")
AddEventHandler("md-drugs:client:makebluextcsingle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebluextcsingle")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 4, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makebluextcdual")
AddEventHandler("md-drugs:client:makebluextcdual", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebluextcdual")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makebluextctriple")
AddEventHandler("md-drugs:client:makebluextctriple", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebluextctriple")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:makebluextcquad")
AddEventHandler("md-drugs:client:makebluextcquad", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebluextcquad")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
------------------------------------------------------------------ Stamping ------------------------------------------------------------------ Stamping
RegisterNetEvent("md-drugs:client:stampwhite")
AddEventHandler("md-drugs:client:stampwhite", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stampwhite")
ClearPedTasks(PlayerPedId()) RegisterNetEvent("md-drugs:client:stampwhite", function(data)
else lib.registerContext({
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error") id = 'stampxtc',
title = 'Stamp XTC Menu',
ClearPedTasks(PlayerPedId()) options = {
{
icon = GetImage('white_xtc'),
title = 'White XTC',
onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping White Pills', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
end end
end, 2, 8) -- NumberOfCircles, MS },
end) {
icon = GetImage('red_xtc'),
title = 'Red XTC',
onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Red Pills', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampred", data.data)
end
},
{
icon = GetImage('orange_xtc'),
title = 'Orange XTC',
onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Orange Pills', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamporange", data.data)
end,
},
{
icon = GetImage('blue_xtc'),
title = 'Blue XTC',
onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Blue Pills', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampblue", data.data)
end
},
}
})
lib.showContext('stampxtc')
end) end)
RegisterNetEvent("md-drugs:client:stampred")
AddEventHandler("md-drugs:client:stampred", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stampred")
ClearPedTasks(PlayerPedId()) RegisterNetEvent("md-drugs:client:getsinglepress", function()
else if not progressbar('Buying Press', 4000, 'uncuff') then return end
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:stamporange")
AddEventHandler("md-drugs:client:stamporange", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stamporange")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:stampblue")
AddEventHandler("md-drugs:client:stampblue", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:stampblue")
ClearPedTasks(PlayerPedId())
else
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:getsinglepress")
AddEventHandler("md-drugs:client:getsinglepress", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:buypress") TriggerServerEvent("md-drugs:server:buypress")
ClearPedTasks(PlayerPedId())
end)
end) end)
RegisterNetEvent("md-drugs:client:exchangepresses")
AddEventHandler("md-drugs:client:exchangepresses", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:upgradepress")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
if not progressbar('Buying Press', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:upgradepress", data.data)
end) end)
RegisterNetEvent("md-drugs:client:buypress")
AddEventHandler("md-drugs:client:buypress", function() RegisterNetEvent("md-drugs:client:buypress", function()
local img = GetImage('singlepress'),
lib.registerContext({ lib.registerContext({
id = 'buypresses', id = 'buypresses',
title = 'Purchase Presses', title = 'Purchase Presses',
options = { options = {
{ title = 'Single Press', description = 'Buy a single press for 20k', icon = img, event = 'md-drugs:client:getsinglepress'},
{ { title = 'Exchange Single For Dual', description = '20 of each unstamped single stack pill and your single press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
title = 'Single Press', { title = 'Exchange Dual For Triple', description = '50 of each unstamped dual stack pill and your dual press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
description = 'Buy a single press for 20k', { title = 'Exchange Triple For Quad', description = '150 of each unstamped Triple stack pill and your triple press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
icon = "fa-solid fa-wallet",
event = 'md-drugs:client:getsinglepress',
},
{
title = 'Exchange Single For Dual',
description = '20 of each unstamped single stack pill and your single press ',
icon = "fa-solid fa-wallet",
event = 'md-drugs:client:exchangepresses',
},
{
title = 'Exchange Dual For Triple',
description = '50 of each unstamped dual stack pill and your dual press ',
icon = "fa-solid fa-wallet",
event = 'md-drugs:client:exchangepresses',
},
{
title = 'Exchange Triple For Quad',
description = '150 of each unstamped Triple stack pill and your triple press ',
icon = "fa-solid fa-wallet",
event = 'md-drugs:client:exchangepresses',
}
} }
}) })
lib.showContext('buypresses') lib.showContext('buypresses')
end) end)
+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.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

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