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 7739 additions and 7886 deletions

No files matched your search

+173 -147
View File
@@ -1,4 +1,4 @@
---@diagnostic disable: param-type-mismatch
local QBCore = exports['qb-core']:GetCoreObject()
local started = nil
@@ -12,14 +12,15 @@ local function loadParticle(dict)
SetPtfxAssetNextCall(dict)
end
function MethCooking()
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
lib.requestAnimDict(animDict, 500)
dict = "scr_fbi5a"
dict = "scr_ornate_heist"
local ped = PlayerPedId()
SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524))
Wait(1)
local targetPosition = GetEntityCoords(ped)
local animDuration = GetAnimDuration(animDict, animName) * 800
FreezeEntityPosition(ped, true)
@@ -36,11 +37,16 @@ NetworkStopSynchronisedScene(netScene)
DeleteObject(sacid)
DeleteObject(ammonia)
FreezeEntityPosition(ped, false)
loadParticle(dict)
methflare = StartParticleFxLoopedAtCoord('scr_fbi5a_flare',vector3(1005.95, -3202.09, -37.58), 0, 0, 0, 2.0, 0, 0,0)
SetParticleFxLoopedAlpha(methflare, 1.0)
Wait(20000)
StopParticleFxLooped(methflare,true)
lib.requestModel('hei_prop_heist_thermite', 2000)
loadParticle('scr_ornate_heist')
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
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
@@ -384,8 +390,8 @@ FreezeEntityPosition(ped, false)
end
function EcstasyEffect()
local startStamina = 30
SetFlash(0, 0, 500, 7000, 500)
local startStamina = 50
SetFlash(0, 0, 500, 20000, 500)
while startStamina > 0 do
Wait(1000)
startStamina = startStamina - 1
@@ -404,7 +410,7 @@ end
function MethBagEffect()
local startStamina = 8
local startStamina = 30
TrevorEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
while startStamina > 0 do
@@ -475,17 +481,15 @@ function SpawnCarPedChase()
local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
local search = false
local spawnedCar = {}
if started then
if started then -- checks if active
else
started = true
lib.requestModel(`pounder`, Config.requestModelTime)
lib.requestModel("ig_priest", Config.requestModelTime)
lib.requestModel(`cargobob3`, Config.requestModelTime)
leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false)
pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
lib.requestModel(`pounder`, Config.RequestModelTime)
lib.requestModel("ig_priest", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.RequestModelTime)
local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 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)
SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leancar)
@@ -493,84 +497,87 @@ else
SetPedIntoVehicle(driver, leancar, -1)
SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(driver, true)
exports['qb-target']:AddTargetEntity(leancar, {
options = {
{
name = 'leancar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
local chance = math.random(1,100)
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent('md-drugs:server:givelean')
started = nil
else
started = nil
end
end, 5, 8)
if chance <= 30 then
DeleteVehicle(leancar)
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end,
canInteract = function()
if IsEntityDead(driver) then
return true end
end,
}
}
})
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, {
options = {
{
name = 'leancar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
if not minigame(2,8) then return end
TriggerServerEvent('md-drugs:server:givelean')
started = nil
if math.random(1,100) <= 30 then
DeleteVehicle(leancar)
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end,
}
}
})
end
else
repeat -- this second loop is to spawn the helicopter when the truck is in distance
Wait(1000)
until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0
Wait( 3 * 1000)
local heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000)
search = true
CreateThread(function()
while search do
Wait(5000)
if IsEntityDead(driver) == false then
loc = #(GetEntityCoords(driver) - GetEntityCoords(pilot2))
if loc < 25.0 then
Wait( 3 * 1000)
search = false
started = nil
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000)
if DoesEntityExist(heli) then
SetEntityInvincible(pilot2, false)
DeleteVehicle(leancar)
DeleteEntity(driver)
SetEntityAsMissionEntity(heli)
SetPedIntoVehicle(pilot2, heli, -1)
TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
else
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
end
end
else
started = nil
end
end
end)
if DoesEntityExist(heli) then
SetEntityInvincible(pilot2, false)
DeleteVehicle(leancar)
DeleteEntity(driver)
SetEntityAsMissionEntity(heli)
SetPedIntoVehicle(pilot2, heli, -1)
TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
else
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
end
end
end
end
function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
local searchmeth = false
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
local startedmeth = false
if startedmeth then
else
startedmeth = true
lib.requestModel(`journey`, Config.requestModelTime)
lib.requestModel("a_m_m_hillbilly_02", Config.requestModelTime)
lib.requestModel(`cargobob3`, Config.requestModelTime)
methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, true, false)
methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
lib.requestModel(`journey`, Config.RequestModelTime)
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.RequestModelTime)
local methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 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)
SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar)
@@ -579,69 +586,69 @@ else
SetPedFleeAttributes(methdriver,false)
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(methdriver, true)
exports['qb-target']:AddTargetEntity(methcar, {
options = {
{
name = 'methcar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
local chance = math.random(1,100)
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = nil
else
startedmeth = nil
end
end, 5, 8)
print(chance)
if chance <= 30 then
DeleteVehicle(methcar)
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,
canInteract = function()
if IsEntityDead(methdriver) then
return true end
end,
}
}
})
end
end,
}
}
exports.ox_target:addLocalEntity(methcar, options)
else
exports['qb-target']:AddTargetEntity(methcar, {
options = {
{
name = 'methcar',
icon = 'fa-solid fa-car',
label = 'Steal From Car',
action = function()
if not minigame(2,8) then return end
TriggerServerEvent('md-drugs:server:givemethingridients')
startedmeth = nil
if math.random(1,100) <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end,
}
}
})
end
else
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0
Wait( 3 * 1000)
local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000)
searchmeth = true
CreateThread(function()
while searchmeth do
Wait(1000)
local pickuploc = GetEntityCoords(methcar)
if IsEntityDead(methdriver) == false then
loc = #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot))
if loc < 25.0 then
Wait( 3 * 1000)
startedmeth = nil
methheli = CreateVehicle(`cargobob3`, pickuploc.x, pickuploc.y, pickuploc.z+4, 80, true,true)
Wait(10)
if DoesEntityExist(methheli) then
SetEntityInvincible(methpilot, false)
CreatePickUpRopeForCargobob(methheli, 1)
AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0)
DeleteEntity(methdriver)
SetEntityAsMissionEntity(methheli)
SetPedIntoVehicle(methpilot, methheli, -1)
TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
searchmeth = false
else
methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
end
end
else
startedmeth = nil
end
end
end)
if DoesEntityExist(methheli) then
SetEntityInvincible(methpilot, false)
CreatePickUpRopeForCargobob(methheli, 1)
AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0)
DeleteEntity(methdriver)
SetEntityAsMissionEntity(methheli)
SetPedIntoVehicle(methpilot, methheli, -1)
TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
else
methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
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 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)
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)
SetPedCanSwitchWeapon(CokePed, true)
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
@@ -679,3 +691,17 @@ SetPedCombatAttributes(CokePed6, 46, true)
SetPedCombatAttributes(CokePed7, 46, true)
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)
+115 -108
View File
@@ -2,39 +2,43 @@ local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
local cuttingcoke = nil
local baggingcoke = nil
function LoadModel(hash)
hash = GetHashKey(hash)
lib.requestModel(hash, Config.requestModelTime)
end
local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
end
RegisterNetEvent('coke:respawnCane', function(loc)
local v = GlobalState.CocaPlant[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(CocaPlant[loc], true, true)
FreezeEntityPosition(CocaPlant[loc], true)
SetEntityHeading(CocaPlant[loc], v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
options = { {
Freeze(CocaPlant[loc], true, v.heading)
local options = {
{
icon = "fas fa-hand",
label = "pick Cocaine",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("coke:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not pick(loc) then return 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)
@@ -49,30 +53,33 @@ RegisterNetEvent("coke:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(CocaPlant[k], true, true)
FreezeEntityPosition(CocaPlant[k], true)
SetEntityHeading(CocaPlant[k], v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
options = { {
icon = "fas fa-hand",
label = "pick cocaine",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("coke:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
})
Freeze(CocaPlant[k], true, v.heading)
local options = {
{
icon = "fas fa-hand",
label = "pick Cocaine",
action = function()
if not pick(k) then return end
end
}
}
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)
AddEventHandler('onResourceStart', function(resource)
@@ -98,82 +105,82 @@ AddEventHandler('onResourceStop', function(resourceName)
end
end)
RegisterNetEvent("md-drugs:client:makepowder")
AddEventHandler("md-drugs:client:makepowder", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:makepowder")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:makepowder", function(data)
if not ItemCheck('coca_leaf') then return end
if not progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makepowder", data.data)
end)
RegisterNetEvent("md-drugs:client:cutcokeone")
AddEventHandler("md-drugs:client:cutcokeone", function()
RegisterNetEvent("md-drugs:client:cutcokeone", function()
if not ItemCheck('bakingsoda') then return end
cuttingcoke = true
CutCoke()
if Config.FancyCokeAnims then
CutCoke()
else
if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
end
TriggerServerEvent("md-drugs:server:cutcokeone")
ClearPedTasks(PlayerPedId())
cuttingcoke = nil
end)
RegisterNetEvent("md-drugs:client:bagcoke")
AddEventHandler("md-drugs:client:bagcoke", function()
RegisterNetEvent("md-drugs:client:bagcoke", function()
if not ItemCheck('empty_weed_bag') then return end
baggingcoke = true
BagCoke()
if Config.FancyCokeAnims then
BagCoke()
else
if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
end
TriggerServerEvent("md-drugs:server:bagcoke")
ClearPedTasks(PlayerPedId())
baggingcoke = nil
end)
CreateThread(function()
local cut = vector3(1093.01, -3194.8, -39.99)
local bagg = vector3(1090.70, -3195.91, -39.99)
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
end
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("bagcokepowder",vector3(bagg.x, bagg.y, bagg.z),1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "bagcokepowder",
heading = 11.0,
debugPoly = false,
minZ = bagg.z-1,
maxZ = bagg.z+1,
}, {
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
},
},
distance = 2.5
})
local 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
end
},
}
local options2 = {
{ 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 }, }
if Config.oxtarget then
exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options})
exports.ox_target:addBoxZone({coords = vector3(1093.17, -3195.74, -39.19 -1), size = vec3(1,1,1), options = options2})
else
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})
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
},
}
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)
+13 -21
View File
@@ -1,25 +1,17 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName)
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function()
ClearPedTasks(PlayerPedId())
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then
AlienEffect()
elseif itemName == "cupoflean" or itemName == "cupofdextro" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
CokeBaggyEffect()
else
TrevorEffect()
end
end)
RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, statval, item)
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
TriggerServerEvent('md-drugs:server:removeconsum', item)
if status == "armor" then
TriggerServerEvent('hospital:server:SetArmor', statval)
TriggerServerEvent('consumables:server:useArmor')
SetPedArmour(PlayerPedId(), statval)
else
TriggerServerEvent('md-drugs:server:updatestatus', status, statval)
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)
+134 -297
View File
@@ -1,308 +1,145 @@
local QBCore = exports['qb-core']:GetCoreObject()
local cornerselling = false
local hasTarget = false
local lastPed = {}
local stealingPed = nil
local stealData = {}
local availableDrugs = {}
local currentOfferDrug = nil
local CurrentCops = 0
local textDrawn = false
local zoneMade = false
local sell = false
-- Functions
local function LoadAnimDict(dict)
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Wait(0)
end
end
local function TooFarAway()
QBCore.Functions.Notify("too far from your corner homie", 'error')
LocalPlayer.state:set("inv_busy", false, true)
cornerselling = false
hasTarget = false
availableDrugs = {}
end
local function PoliceCallCornerselling()
print"tell your devs to read the readme. it isnt hard for most people but they are dumb"
end
local function RobberyPed()
if Config.UseTarget then
exports['qb-target']:AddTargetEntity(stealingPed, {
options = {
{
icon = 'fas fa-magnifying-glass',
label = "take back",
action = function()
local player = PlayerPedId()
TriggerEvent('animations:client:EmoteCommandStart', {'pickup'})
Wait(2000)
ClearPedTasks(player)
TriggerServerEvent('md-drugs:server:giveStealItems', stealData.item, stealData.amount)
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items[stealData.item], "add")
stealingPed = nil
stealData = {}
ClearPedTasks(PlayerPedId())
exports['qb-target']:RemoveZone('stealingPed')
function Cornersell()
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
if targ == nil then return end
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 then return end
local sold = false
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
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
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
canInteract = function()
if not targbusy then return true end end,
distance = 2.0
},
{ label = 'Deny Price', icon = "fas fa-eye",
onSelect = 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
},
}
local optionsqb = {
{ label = 'Sell ' .. bagAmount .. ' Of ' .. GetLabel(item) .. ' For $' .. price .. '!', icon = "fas fa-eye",
action = 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
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
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,
canInteract = function()
if IsEntityDead(ped) == false then return true end
end
},
{
icon = 'fas fa-x',
label = 'Decline offer',
action = function(entity)
QBCore.Functions.Notify("Fuck that Offer", 'error')
hasTarget = false
SetPedKeepTask(entity, false)
SetEntityAsNoLongerNeeded(entity)
ClearPedTasksImmediately(entity)
lastPed[#lastPed + 1] = entity
exports['qb-target']:RemoveZone('sellingPed')
end,
},
},
distance = 1.5,
})
end
else
if Config.UseTarget then
zoneMade = false
exports['qb-target']:RemoveZone('sellingPed')
end
hasTarget = false
SetPedKeepTask(ped, false)
SetEntityAsNoLongerNeeded(ped)
ClearPedTasksImmediately(ped)
lastPed[#lastPed + 1] = ped
break
end
end
Wait(0)
end
Wait(math.random(4000, 7000))
end
exports['qb-target']:AddTargetEntity(targ, { options = optionsqb, distance = 2.0})
end
repeat
Wait(1000)
until sold
if sold then sold = false return true end
end
local function ToggleSelling()
if not cornerselling then
cornerselling = true
LocalPlayer.state:set("inv_busy", true, true)
QBCore.Functions.Notify("get that paper")
local startLocation = GetEntityCoords(PlayerPedId())
CreateThread(function()
while cornerselling do
local player = PlayerPedId()
local coords = GetEntityCoords(player)
if not hasTarget then
local PlayerPeds = {}
if next(PlayerPeds) == nil then
for _, activePlayer in ipairs(GetActivePlayers()) do
local ped = GetPlayerPed(activePlayer)
PlayerPeds[#PlayerPeds + 1] = ped
end
end
local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds)
if closestDistance < 15.0 and closestPed ~= 0 and not IsPedInAnyVehicle(closestPed) and GetPedType(closestPed) ~= 28 then
SellToPed(closestPed)
end
end
local startDist = #(startLocation - coords)
if startDist > 30 then
TooFarAway()
end
Wait(0)
end
end)
else
stealingPed = nil
stealData = {}
cornerselling = false
LocalPlayer.state:set("inv_busy", false, true)
QBCore.Functions.Notify("lazy ass cant even sell drugs")
end
end
-- Events
RegisterNetEvent('md-drugs:client:cornerselling', function()
QBCore.Functions.TriggerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(result)
if CurrentCops >= QBConfig.MinimumDrugSalePolice then
if IsPedInAnyVehicle(PlayerPedId(), false) then
QBCore.Functions.Notify("youre in a car", 'error')
else
if result then
availableDrugs = result
ToggleSelling()
else
QBCore.Functions.Notify("what you gonna sell fuckin air or something?", 'error')
LocalPlayer.state:set("inv_busy", false, true)
end
end
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
local item, amount = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
if item ~= 'nothing' then
if sell then
Notify('Lazy Ass Cant Even Sell Drugs', 'error')
sell = false
else
QBCore.Functions.Notify("not enough pork", "error")
sell = true
Notify('Go Make That Paper', 'success')
repeat
Wait(1000)
if not Cornersell() then end
until sell == false
end
end)
end)
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)
else
Notify('You Cant Sell Air', 'error')
end
end)
+11 -33
View File
@@ -1,40 +1,18 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:makecrackone")
AddEventHandler("md-drugs:client:makecrackone", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makecrackone")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failcrackone")
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
RegisterNetEvent("md-drugs:client:makecrackone", function(data)
if not ItemCheck('bakingsoda') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makecrackone", data.data)
end)
RegisterNetEvent("md-drugs:client:bagcrack")
AddEventHandler("md-drugs:client:bagcrack", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcrack")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:bagcrack", function(data)
if not ItemCheck('empty_weed_bag') then return end
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", data.data)
end)
+32 -44
View File
@@ -1,4 +1,4 @@
QBCore = exports['qb-core']:GetCoreObject()
local QBCore = exports['qb-core']:GetCoreObject()
local currentDealer = nil
local dealerIsHome = false
local waitingDelivery = nil
@@ -18,7 +18,7 @@ AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
Wait(1000)
InitZones()
else
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
if dealerCombo then dealerCombo:destroy() end
end
end)
@@ -41,14 +41,16 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function()
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
title = v.label,
icon = GetImage(v.name),
title = GetLabel(v.name),
description = v.price,
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
info = v.info,
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
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
title = v.label,
icon = GetImage(v.name),
title = GetLabel(v.name),
description = v.price,
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
info = v.info,
amount = v.amount,
table = QBConfig.Products,
num = k,
}
}
@@ -94,7 +98,7 @@ local function RequestDelivery()
local amount = math.random(1, 3)
local item = RandomDeliveryItemOnRep()
QBCore.Functions.Notify("Currently searching for a delivery...", 'success')
Notify(Lang.Delivery.search, 'success')
if Config.NearbyDeliveries == true then
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
@@ -119,7 +123,7 @@ local function RequestDelivery()
["item"] = item
}
else
QBCore.Functions.Notify("Nothing Close By", 'error')
Notify(Lang.Delivery.none, 'error')
end
else
@@ -145,15 +149,12 @@ local function RequestDelivery()
sender = QBConfig.Dealers[currentDealer]["name"],
subject = "Delivery Location",
message = "Deliver This For Me",
button = {
enabled = true,
buttonEvent = "md-drugs:client:setLocation",
buttonData = waitingDelivery
}
})
end)
TriggerEvent("md-drugs:client:setLocation",waitingDelivery)
else
QBCore.Functions.Notify("You Havent Even Finished The One I Told You Too", 'error')
Notify(Lang.Delivery.busy, 'error')
end
end
@@ -168,26 +169,17 @@ local function DeliveryTimer()
end
local function PoliceCallDeliveries()
print " Tell your devs they didnt do something and to read the readme it isnt hard"
end
local function DeliverStuff()
if deliveryTimeout > 0 then
Wait(500)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
PoliceCallDeliveries()
QBCore.Functions.Progressbar("work_dropbox", "handing Off Package", 3500, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
activeDelivery = nil
exports['qb-target']:RemoveZone('drugDeliveryZone')
ClearPedTasks(PlayerPedId())
end)
PoliceCall(20)
progressbar(Lang.Delivery.pack, 4000, 'uncuff')
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
activeDelivery = nil
exports['qb-target']:RemoveZone('drugDeliveryZone')
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false)
end
@@ -196,10 +188,10 @@ end
local function SetMapBlip(x, y)
SetNewWaypoint(x, y)
QBCore.Functions.Notify("Marked On Your Map", 'success');
Notify(Lang.Delivery.found, 'success');
end
-- PolyZone specific functions
function InitZones()
@@ -211,10 +203,8 @@ function InitZones()
while not HasModelLoaded(Ped) do
Wait(0)
end
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false)
FreezeEntityPosition(testdealer, true)
SetEntityInvincible(testdealer, true)
Freeze(testdealer, true, 90)
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, {
name = "dealer_"..k,
heading = v.heading,
@@ -287,7 +277,7 @@ end
-- Events
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
Wait(1000)
InitZones()
@@ -304,7 +294,7 @@ end)
RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
if activeDelivery then
SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"])
QBCore.Functions.Notify("Already Delivering", 'error')
Notify(Lang.Delivery.already, 'error')
return
end
activeDelivery = locationData
@@ -318,9 +308,7 @@ RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
end
Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false)
FreezeEntityPosition(Buyer, true)
SetEntityInvincible(Buyer, true)
if Config.UseTarget then
Freeze(Buyer, true, 180)
exports['qb-target']:AddTargetEntity(Buyer, {
options = {
{
@@ -341,7 +329,7 @@ RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
},
distance = 1.5
})
end
end)
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
@@ -368,5 +356,5 @@ end)
RegisterCommand('checkrep', function()
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
QBCore.Functions.Notify("Current Rep: "..drugrep)
end)
Notify(Lang.Delivery.checkrep..drugrep)
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
+81 -185
View File
@@ -2,14 +2,6 @@ local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
local PoppyPlants = {}
local herointable = false
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
@@ -19,55 +11,41 @@ local function loadParticle(dict)
end
SetPtfxAssetNextCall(dict)
end
CreateThread(function()
local Ped = "g_m_y_famdnf_01"
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
labkitlocation = Config.buyheroinlabkit
heroinkitdealer = CreatePed(0, Ped,labkitlocation.x, labkitlocation.y, labkitlocation.z-1, 180.0, false, false)
FreezeEntityPosition(heroinkitdealer, true)
SetEntityInvincible(heroinkitdealer, true)
exports['qb-target']:AddTargetEntity(heroinkitdealer, {
options = {
{
type = "client",
label = "Buy Heroin Lab Kit",
icon = "fas fa-eye",
event = "md-drugs:client:buyheroinlabkit"
},
}
})
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local labkitlocation = Config.buyheroinlabkit
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
Freeze(heroinkitdealer, true, labkitlocation.w)
local options = {
{ label = "Buy Heroin Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(heroinkitdealer, options)
else
exports['qb-target']:AddTargetEntity(heroinkitdealer, { options = options, distance = 2.0})
end
end)
---- plant spawns dont edit
RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[loc], true, true)
FreezeEntityPosition(PoppyPlants[loc], true)
SetEntityHeading(PoppyPlants[loc], v.heading)
Freeze(PoppyPlants[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
options = { {
icon = "fas fa-hand",
label = "pick Poppies",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
end
}
},
distance = 3.0
distance = 2.5
})
end
end)
@@ -87,27 +65,18 @@ RegisterNetEvent("heroin:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[k], true, true)
FreezeEntityPosition(PoppyPlants[k], true)
SetEntityHeading(PoppyPlants[k], v.heading)
Freeze(PoppyPlants[k], true, v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
options = { {
icon = "fas fa-hand",
label = "Pick Poppies",
action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", k)
end
}
},
distance = 3.0
distance = 2.5
})
end
end
@@ -140,172 +109,99 @@ AddEventHandler('onResourceStart', function(resource)
end)
---- plant stop end
RegisterNetEvent("md-drugs:client:dryplant")
AddEventHandler("md-drugs:client:dryplant", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:dryplant")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:dryplant", function(data)
if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:dryplant",data.data)
end)
RegisterNetEvent("md-drugs:client:cutheroin")
AddEventHandler("md-drugs:client:cutheroin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutheroin")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:cutheroin", function(data)
if not ItemCheck('bakingsoda') then return end
if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:cutheroin", data.data)
end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
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")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
RegisterNetEvent("md-drugs:client:setheroinlabkit")
AddEventHandler("md-drugs:client:setheroinlabkit", function()
if herointable then
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
Notify(Lang.Heroin.tableout, 'error')
else
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
ClearPedTasks(PlayerPedId())
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
local heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(heroinlabkit)
exports['qb-target']:AddTargetEntity(heroinlabkit, {
options = {
{
event = "md-drugs:client:heatliquidheroin",
icon = "fas fa-box-circle-check",
label = "Cook Heroin",
},
{
event = "md-drugs:client:getheroinkitback",
icon = "fas fa-box-circle-check",
label = "Pick Up",
canInteract = function()
if herointable then return true end end
},
}
})
end
local 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},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(heroinlabkit, options)
else
exports['qb-target']:AddTargetEntity(heroinlabkit, {options = options})
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())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:heatliquidheroin")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheatingheroin")
ClearPedTasks(PlayerPedId())
DeleteObject(heroinlabkit)
if not ItemCheck('emptyvial') then return end
if not minigame(2, 8) then
TriggerServerEvent("md-drugs:server:failheatingheroin")
DeleteObject(data.data)
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")
heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
ClearPedTasks(PlayerPedId())
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
options = {
{
event = "md-drugs:client:cleanheroinlabkit",
icon = "fas fa-box-circle-check",
label = "Clean It",
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
local options = {
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
}
}
})
end
end, 1, 8) -- NumberOfCircles, MS
if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkitheroin,options )
else
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {options = options})
end
return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit")
AddEventHandler("md-drugs:client:cleanheroinlabkit", function()
TriggerEvent('animations:client:EmoteCommandStart', {'clean'})
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:removecleaningkitheroin")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data)
end)
RegisterNetEvent("md-drugs:client:deletedirtyheroin")
AddEventHandler("md-drugs:client:deletedirtyheroin", function()
DeleteObject(dirtylabkitheroin)
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
DeleteObject(data)
herointable = false
Wait(1000)
TriggerEvent("md-drugs:client:setheroinlabkit")
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")
AddEventHandler("md-drugs:client:fillneedle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:fillneedle")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheroin")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles,
end)
RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
herointable = false
DeleteObject(data.data)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
end)
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillneedle", data.data)
end)
+14 -35
View File
@@ -2,42 +2,21 @@ local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function()
local current = "s_m_m_doctor_01"
lib.requestModel(current, Config.requestModelTime)
SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, false, false)
FreezeEntityPosition(SyrupLocation, true)
SetEntityInvincible(SyrupLocation, true)
exports['qb-target']:AddTargetEntity(SyrupLocation, {
options = {
{
type = "client",
label = "Get Task",
icon = "fas fa-eye",
event = "md-drugs:client:getsyruplocationtobuy"
},
},
distance = 2.0
})
lib.requestModel(current, Config.RequestModelTime)
local SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, Config.SyrupVendor.w, false, false)
Freeze(SyrupLocation, true, Config.SyrupVendor.w)
local options = {
{ type = "client", label = "Get Task", icon = "fas fa-eye", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(SyrupLocation, options)
else
exports['qb-target']:AddTargetEntity(SyrupLocation, { options = options, 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()
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)
+92 -274
View File
@@ -1,5 +1,7 @@
local QBCore = exports['qb-core']:GetCoreObject()
local tableout = false
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
@@ -12,312 +14,128 @@ end
CreateThread(function()
local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.requestModelTime)
tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, 180.0, false, false)
FreezeEntityPosition(tabdealer, true)
SetEntityInvincible(tabdealer, true)
exports['qb-target']:AddTargetEntity(tabdealer, {
options = {
{
type = "client",
label = "Buy LSD Lab Kit",
icon = "fas fa-eye",
event = "md-drugs:client:buylabkit"
}
}
})
lib.requestModel(Ped, Config.RequestModelTime)
local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false)
Freeze(tabdealer, true, Config.buylsdlabkit.w)
local options = {
{ type = "client", label = "Buy LSD Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(tabdealer, options)
else
exports['qb-target']:AddTargetEntity(tabdealer, {options = options, distance = 2.0})
end
end)
RegisterNetEvent("md-drugs:client:getlysergic")
AddEventHandler("md-drugs:client:getlysergic", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:getlysergic")
else
end
end, 1, 8) -- NumberOfCircles, MS
end)
RegisterNetEvent("md-drugs:client:getlysergic", function(data)
if not minigame(2, 8) then return end
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic",data.data)
end)
RegisterNetEvent("md-drugs:client:getdiethylamide")
AddEventHandler("md-drugs:client:getdiethylamide", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
ClearPedTasks(PlayerPedId())
if success then
TriggerServerEvent("md-drugs:server:getdiethylamide")
else
end
end, 1, 8) -- NumberOfCircles, MS
end)
RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
if not minigame(2, 8) then return end
if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
end)
RegisterNetEvent("md-drugs:client:setlsdlabkit")
AddEventHandler("md-drugs:client:setlsdlabkit", function()
AddEventHandler("md-drugs:client:setlsdlabkit", function()
if tableout then
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
Notify(Lang.lsd.tableout, 'error')
TriggerServerEvent('md-drugs:server:getlabkitback')
else
tableout = true
local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(labkit)
ClearPedTasks(PlayerPedId())
exports['qb-target']:AddTargetEntity(labkit, {
options = {
{
event = "md-drugs:client:heatliquid",
icon = "fas fa-box-circle-check",
label = "Heat Liquid",
},
{
event = "md-drugs:client:refinequalityacid",
icon = "fas fa-box-circle-check",
label = "Refine",
},
{
event = "md-drugs:client:maketabpaper",
icon = "fas fa-box-circle-check",
label = "Dab Sheets",
},
{
event = "md-drugs:client:getlabkitback",
icon = "fas fa-box-circle-check",
label = "Pick Up",
canInteract = function()
if tableout then return true end end
},
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getlabkitback') return end
local labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(labkit)
local options = {
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, },
{ 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},
}
})
end)
if Config.oxtarget then
exports.ox_target:addLocalEntity(labkit, options)
else
exports['qb-target']:AddTargetEntity(labkit, {options = options})
end
end
end)
RegisterNetEvent("md-drugs:client:getlabkitback")
AddEventHandler("md-drugs:client:getlabkitback", function()
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')
ClearPedTasks(PlayerPedId())
tableout = false
end)
end)
RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
DeleteObject(data.data)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
end)
RegisterNetEvent("md-drugs:client:heatliquid")
AddEventHandler("md-drugs:client:heatliquid", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
local PedCoords = GetEntityCoords(PlayerPedId())
dict = "scr_ie_svm_technical2"
QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:heatliquid")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheating")
ClearPedTasks(PlayerPedId())
DeleteObject(labkit)
dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
if not ItemCheck('lysergic_acid') then return end
if not ItemCheck('diethylamide') then return end
if not minigame(2, 8) then
TriggerServerEvent("md-drugs:server:failheating")
DeleteObject(data.data)
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
loadParticle(dict)
exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
ClearPedTasks(PlayerPedId())
exports['qb-target']:AddTargetEntity(dirtylabkit, {
options = {
{
event = "md-drugs:client:cleanlabkit",
icon = "fas fa-box-circle-check",
label = "Clean It",
},
}
})
end
end, 1, 8) -- NumberOfCircles, MS
end)
local options = {
{ event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit },
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkit, options)
else
exports['qb-target']:AddTargetEntity(dirtylabkit, { options = options})
end
return end
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
end)
RegisterNetEvent("md-drugs:client:cleanlabkit")
AddEventHandler("md-drugs:client:cleanlabkit", function()
TriggerEvent('animations:client:EmoteCommandStart', {'clean'})
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
tableout = false
TriggerServerEvent("md-drugs:server:removecleaningkit")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:cleanlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
tableout = false
TriggerServerEvent("md-drugs:server:removecleaningkit", data.data)
end)
RegisterNetEvent("md-drugs:client:resetlsdkit")
AddEventHandler("md-drugs:client:resetlsdkit", function()
DeleteObject(dirtylabkit)
RegisterNetEvent("md-drugs:client:resetlsdkit", function(data)
DeleteObject(data)
TriggerEvent("md-drugs:client:setlsdlabkit")
end)
RegisterNetEvent("md-drugs:client:refinequalityacid")
AddEventHandler("md-drugs:client:refinequalityacid", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:refinequalityacid")
else
TriggerServerEvent("md-drugs:server:failrefinequality")
end
end, 1, 8) -- NumberOfCircles, MS
end)
RegisterNetEvent("md-drugs:client:refinequalityacid", function()
if not ItemCheck('lsd_one_vial') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failrefinequality") return end
if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid")
end)
RegisterNetEvent("md-drugs:client:maketabpaper")
AddEventHandler("md-drugs:client:maketabpaper", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:maketabpaper")
else
TriggerServerEvent("md-drugs:server:failtabs")
end
end, 3, 8) -- NumberOfCircles,
end)
RegisterNetEvent("md-drugs:client:maketabpaper", function()
if not ItemCheck('tab_paper') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failtabs") return end
if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper")
end)
RegisterNetEvent("md-drugs:client:buytabs", function(data)
if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
end)
RegisterNetEvent("md-drugs:client:cutsheet")
AddEventHandler("md-drugs:client:cutsheet", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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")
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)
RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify('You Have One Idiot', 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlabkit")
end)
+42 -102
View File
@@ -1,6 +1,5 @@
local QBCore = exports['qb-core']:GetCoreObject()
local Mescaline = {}
local hallucinate = nil
function LoadModel(hash)
hash = GetHashKey(hash)
@@ -10,45 +9,17 @@ function LoadModel(hash)
end
end
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
---- plant spawns dont edit
RegisterNetEvent('Mescaline:respawnCane', function(loc)
local v = GlobalState.Mescaline[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not Mescaline[loc] then
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(Mescaline[loc], true, true)
FreezeEntityPosition(Mescaline[loc], true)
SetEntityHeading(Mescaline[loc], v.heading)
Freeze(Mescaline[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[loc], {
options = { {
icon = "fas fa-hand",
label = "pick Cactus",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cactus", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("Mescaline:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
options = {
{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}
},
distance = 2.5
})
end
end)
@@ -68,27 +39,11 @@ RegisterNetEvent("Mescaline:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(Mescaline[k], true, true)
FreezeEntityPosition(Mescaline[k], true)
SetEntityHeading(Mescaline[k], v.heading)
Freeze(Mescaline[k], true, v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[k], {
options = { {
icon = "fas fa-hand",
label = "Pick Mescaline",
action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Mescaline", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("Mescaline:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
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}
},
distance = 2.5
})
end
end
@@ -119,57 +74,42 @@ AddEventHandler('onResourceStart', function(resource)
end)
RegisterNetEvent("md-drugs:client:drymescaline")
AddEventHandler("md-drugs:client:drymescaline", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:drymescaline")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:drymescaline", function()
if not ItemCheck('cactusbulb') then return end
if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:drymescaline")
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 chance2 = math.random(1,100)
QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
if chance <= Config.Badtrip then
AlienEffect()
clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone)
SetEntityVisible(clone, true)
SetPedRelationshipGroupHash(clone)
SetPedAccuracy(clone)
SetPedArmour(clone)
SetPedCanSwitchWeapon(clone, true)
SetPedFleeAttributes(clone, false)
if chance2 <= 99 then
GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
else
GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
end
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
if chance <= Config.Badtrip then
AlienEffect()
clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone)
SetEntityVisible(clone, true)
SetPedRelationshipGroupHash(clone)
SetPedAccuracy(clone)
SetPedArmour(clone)
SetPedCanSwitchWeapon(clone, true)
SetPedFleeAttributes(clone, false)
if chance2 <= 99 then
GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
else
AlienEffect()
end
end)
GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
end
else
AlienEffect()
end
end)
+170 -187
View File
@@ -2,8 +2,104 @@ local QBCore = exports['qb-core']:GetCoreObject()
local amonia = nil
local tray = nil
local heated = nil
local active = nil
local function startcook()
if amonia == nil then
active = true
TriggerServerEvent("md-drugs:server:startcook")
MethCooking()
amonia = true
else
Notify(Lang.meth.inside, "error")
end
end
local function dials()
if amonia == true then
if not minigame(2, 8) then
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
ClearPedTasks(PlayerPedId())
amonia = nil
active = nil
return end
Notify(Lang.meth.increaseheat, "success")
ClearPedTasks(PlayerPedId())
heated = true
else
end
end
local function smash()
if tray then
tray = false
DeleteObject(trays)
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
SetEntityHeading(bucket, 90.0)
SmashMeth()
local options = {
{
name = 'bucket',
icon = 'fa-solid fa-car',
label = 'Bag Meth',
action = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
}
}
local optionsox = {
{
name = 'bucket',
icon = 'fa-solid fa-car',
label = 'Bag Meth',
onSelect = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(bucket, optionsox)
else
exports['qb-target']:AddTargetEntity(bucket, {options = options, distance = 2.0})
end
end
end
local function trayscarry()
if amonia then
local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7)
end
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
false)
RequestModel("bkr_prop_meth_tray_02a")
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
Wait(0)
end
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
tray = true
end
end
CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
@@ -13,230 +109,117 @@ CreateThread(function()
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,
}, {
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,
},
{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,
}, {
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,}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
action = function()
SetEntityCoords(PlayerPedId(), Config.MethTeleIn)
end,
},
{ name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end },
},
distance = 2.5
})
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,
}, {
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,
},
{ 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,
}, {
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()
if amonia == nil then
amonia = true
TriggerServerEvent("md-drugs:server:startcook")
MethCooking()
exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75,
{ -- 963.37, .z-2122.95, 31.47
name = "adjustdials",
heading = 11.0,
debugPoly = false,
minZ = -39 - 2,
maxZ = -39 + 2,
}, {
options = {
{
name = 'adjustdials',
icon = "fas fa-sign-in-alt",
label = "Adjust Dials",
distance = 5,
action = function()
if amonia == true then
exports['ps-ui']:Circle(function(success)
if success then
QBCore.Functions.Notify("Increasing Heat", "success")
ClearPedTasks(PlayerPedId())
heated = true
exports['qb-target']:RemoveZone("adjustdials")
else
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
ClearPedTasks(PlayerPedId())
amonia = nil
exports['qb-target']:RemoveZone("adjustdials")
end
end, 2, 8) -- NumberOfCircles,
else
end
end,
},
},
})
else
QBCore.Functions.Notify("Theres Stuff Inside", "error")
end
end,
{ name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", item = itemreqcook, action = function() startcook() end,
canInteract = function()
if amonia == nil then
if amonia == nil and active == nil then
return true
end
end,
end,
},
{
name = 'grabtray',
icon = "fas fa-sign-in-alt",
label = "Grab Tray",
distance = 5,
action = function()
if amonia then
local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7)
end
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
false)
RequestModel("bkr_prop_meth_tray_02a")
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
Wait(0)
end
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
tray = true
exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75,
{ -- 963.37, .z-2122.95, 31.47
name = "boxmeth",
heading = 3.0,
debugPoly = false,
minZ = -39 - 2,
maxZ = -39 + 2,
}, {
options = {
{
name = 'boxmeth',
icon = "fas fa-sign-in-alt",
label = "Box Up Meth",
distance = 5,
action = function()
if tray then
tray = false
DeleteObject(trays)
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
SetEntityHeading(bucket, 90.0)
SmashMeth()
exports['qb-target']:RemoveZone("boxmeth")
exports['qb-target']:AddTargetEntity(bucket, {
options = {
{
name = 'bucket',
icon = 'fa-solid fa-car',
label = 'Bag Meth',
action = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
}
},
})
end
end,
canInteract = function()
if tray then return true end
end,
},
},
})
end
end,
canInteract = function()
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 5, action = function() trayscarry() end,
canInteract = function()
if heated and amonia and tray == nil then return true end
end,
end,
},
},
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)
CreateThread(function()
if Config.MethHeist == false then
else
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.requestModelTime)
lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.MethHeistStart
methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
FreezeEntityPosition(methdealer, true)
SetEntityHeading(methdealer, 220.0)
SetEntityInvincible(methdealer, true)
local methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
Freeze(methdealer, true, 220.0)
exports['qb-target']:AddTargetEntity(methdealer, {
options = {
{
label = "Get Mission",
icon = "fas fa-eye",
action = function()
Notify(Lang.meth.mission, "success")
SpawnMethCarPedChase()
QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success")
end,
},
}
})
end
end)
RegisterNetEvent("md-drugs:client:stealeph", function(data)
if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:geteph", data.data)
end)
RegisterNetEvent("md-drugs:client:stealace", function(data)
if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getace", data.data)
end)
+52 -79
View File
@@ -1,47 +1,39 @@
local QBCore = exports['qb-core']:GetCoreObject()
local deliveryBlip = nil
local PZone = nil
local listen = false
local carryPackage = nil
RegisterNetEvent("md-drugs:client:getoxytruck")
AddEventHandler("md-drugs:client:getoxytruck", function()
RegisterNetEvent("md-drugs:client:getoxytruck", function()
if TriggerServerEvent('md-drugs:server:payfortruck') then
end
end)
function PolicecallOxy()
print "Tell Your Dev They Didn't Follow The Readme"
end
RegisterNetEvent("md-drugs:Client:getoxylocation", function()
local coords = Config.truckspawn
local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model
lib.requestModel(ModelHash, 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)
SetEntityHeading(oxycar, coords.w)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success')
Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute")
SetVehicleEngineOn(oxycar, true, true)
exports['qb-target']:AddTargetEntity(oxycar, {
options = {
{
event = "md-drugs:client:getfromtrunk",
icon = "fas fa-box-circle-check",
label = "Get Package",
},
local options = {
{ 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)
RegisterNetEvent("md-drugs:client:getoxylocationroute")
AddEventHandler("md-drugs:client:getoxylocationroute", function()
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
Wait(100)
local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
@@ -50,53 +42,42 @@ AddEventHandler("md-drugs:client:getoxylocationroute", function()
RemoveBlip(deliveryBlip)
end
if CurrentLocation ~= nil then
deliveryBlip = AddBlipForCoord(CurrentLocation)
SetBlipSprite(deliveryBlip, 1)
SetBlipDisplay(deliveryBlip, 2)
SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("drug Meet")
EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true)
oxyzone = lib.zones.sphere({
coords = CurrentLocation,
radius = 2,
onEnter = function()
RemoveBlip(deliveryBlip)
end,
})
end
if unlucky <= Config.PoliceAlertOxy then
PolicecallOxy()
end
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)
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.requestModelTime)
oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false)
SetEntityHeading(oxybuyer, 180)
FreezeEntityPosition(oxybuyer, true)
SetEntityInvincible(oxybuyer, true)
exports['qb-target']:AddTargetEntity(oxybuyer, {
options = {
{
type = "client",
label = "Talk To Buyer",
icon = "fas fa-eye",
event = "md-drugs:client:giveoxybox"
},
}
})
lib.requestModel(current, Config.RequestModelTime)
local oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
Freeze(oxybuyer, true, CurrentLocation.w)
repeat
Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x,CurrentLocation.y,CurrentLocation.z)) < 5.0
RemoveBlip(deliveryBlip)
PoliceCall(Config.PoliceAlertOxy)
local options = {
{ type = "client", label = "Talk To Buyer", icon = "fas fa-eye", event = "md-drugs:client:giveoxybox", ped = oxybuyer},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(oxybuyer, options)
else
exports['qb-target']:AddTargetEntity(oxybuyer, {options = options, distance = 2.0})
end
end
end)
RegisterNetEvent("md-drugs:client:getfromtrunk")
AddEventHandler("md-drugs:client:getfromtrunk", function()
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
if carryPackage then
QBCore.Functions.Notify("You Cant Carry More Than One", "error")
Notify(Lang.oxy.cantcarry, "error")
else
local pos = GetEntityCoords(PlayerPedId(), true)
local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7)
@@ -112,25 +93,17 @@ AddEventHandler("md-drugs:client:getfromtrunk", function()
end
end)
RegisterNetEvent("md-drugs:client:giveoxybox")
AddEventHandler("md-drugs:client:giveoxybox", function()
RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
if carryPackage then
QBCore.Functions.Progressbar("drink_something", "handing over oxy", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:giveoxybox")
ClearPedTasks(PlayerPedId())
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
end)
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(data.ped)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
else
QBCore.Functions.Notify("cant be empty handed idiot", "error")
Notify(Lang.oxy.empty, "error")
end
end)
+33 -134
View File
@@ -1,157 +1,56 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterCommand('prescriptionpad', function()
if QBCore.Functions.GetPlayerData().job.name == Config.PharmaJob then
RegisterNetEvent("md-drugs:client:prescriptionpad", function(args)
if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then
lib.registerContext({
id = 'prescriptionpad',
title = "Prescription Pad",
options = {
{
title = 'Give Vicodin',
description = 'Give Vicodin ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givevicodinprescription',
},
{
title = 'Give Adderal',
description = 'Give Adderal ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:giveadderalprescription',
},
{
title = 'Give Morphine',
description = 'Give Morphine ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givemorphineprescription',
},
{
title = 'Give Xanax',
description = 'Give Vicodin ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givexanaxprescription',
},
{title = 'Give Vics', description = 'Give Vics ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'vicodin_prescription'}},
{title = 'Give Madderal', description = 'Give Madderal ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'adderal_prescription'}},
{title = 'Give Morphin',description = 'Give Morphin ',icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'morphine_prescription'}},
{title = 'Give Zany', description = 'Give Zany ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'xanax_prescription'} },
}
})
lib.showContext('prescriptionpad')
lib.showContext('prescriptionpad')
else
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
Notify(Lang.Pharma.notems, "error")
end
end)
RegisterNetEvent("md-drugs:client:givevicodinprescription")
AddEventHandler("md-drugs:client:givevicodinprescription", 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: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)
RegisterNetEvent("md-drugs:client:writeprescription", function(args)
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
TriggerServerEvent("md-drugs:server:giveprescription", args.item)
end)
RegisterNetEvent("md-drugs:client:givemorphineprescription")
AddEventHandler("md-drugs:client:givemorphineprescription", 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: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)
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
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")
AddEventHandler("md-drugs:client:openingvicodin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:unbottle", function(item)
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
if item.name == 'vicodinbottle' then item = 'vicodin' end
if item.name == 'adderalbottle' then item = 'adderal' end
if item.name == 'morphinebottle' then item = 'morphine' end
if item.name == 'xanaxbottle' then item = 'xanax' end
TriggerServerEvent('md-drugs:server:unbottle', item)
end)
RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
if itemName == "vicodin" then
exports['ps-buffs']:AddHealthBuff(10000, 20)
elseif itemName == "adderal" then
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
elseif itemName == "xanax" then
exports['ps-buffs']:AddStressBuff(10000, 25)
else
exports['ps-buffs']:AddHealthBuff(10000, 40)
end
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
if not progressbar(Lang.Pharma.consume, 1000, 'eat') then return end
if itemName == "vicodin" then
exports['ps-buffs']:AddHealthBuff(10000, 20)
elseif itemName == "adderal" then
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
elseif itemName == "xanax" then
exports['ps-buffs']:AddStressBuff(10000, 25)
else
exports['ps-buffs']:AddHealthBuff(10000, 40)
end
end)
+11 -59
View File
@@ -13,30 +13,13 @@ end
RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(shrooms[loc], true, true)
FreezeEntityPosition(shrooms[loc], true)
SetEntityHeading(shrooms[loc], v.heading)
Freeze(shrooms[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[loc], {
options = { {
icon = "fas fa-hand",
label = "pick shrooms",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("shrooms:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
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 }
},
distance = 2.5
})
end
end)
@@ -77,27 +60,11 @@ end)
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(shrooms[k], true, true)
FreezeEntityPosition(shrooms[k], true)
SetEntityHeading(shrooms[k], v.heading)
Freeze(shrooms[k], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[k], {
options = { {
icon = "fas fa-hand",
label = "Pick shrooms",
action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("shrooms:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
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 }
},
distance = 2.5
})
end
end
@@ -105,22 +72,7 @@ end)
RegisterNetEvent('md-drugs:client:takeshrooms', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
end)
+239 -628
View File
@@ -1,40 +1,24 @@
local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function()
if Config.oxtarget then
coketelein = exports.ox_target:addBoxZone({
coords = Config.CokeTeleIn,
size = vec(1,1,3),
rotation = 0,
debug = false,
coketelein = exports.ox_target:addBoxZone({ coords = Config.CokeTeleIn, size = vec(1,1,3), rotation = 0, debug = false,
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
distance = 5,
{name = 'teleout',icon = "fas fa-sign-in-alt",label = "Enter Building",distance = 5,
onSelect = function()
DoScreenFadeOut(500)
DoScreenFadeOut(500)
Wait(1000)
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z)
Wait(1000)
DoScreenFadeIn(500)
end,
Wait(1000)
DoScreenFadeIn(500)
end
},
},
})
coketeleout = exports.ox_target:addBoxZone({
coords = Config.CokeTeleOut,
size = vec(1,1,3),
rotation = 0,
debug = false,
})
coketeleout = exports.ox_target:addBoxZone({ coords = Config.CokeTeleOut, size = vec(1,1,3), rotation = 0, debug = false,
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
distance = 5,
{name = 'teleout',icon = "fas fa-sign-in-alt",label = "Exit Building",distance = 5,
onSelect = function()
DoScreenFadeOut(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
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,
}, {
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,}, {
options = {
{
name = 'teleout',
@@ -341,13 +48,7 @@ else
},
},
})
exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "CokeTeleOut",
heading = 156.0,
debugPoly = false,
minZ = Config.CokeTeleOut.z-2,
maxZ = Config.CokeTeleOut.z+2,
}, {
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,}, {
options = {
{
name = 'teleout',
@@ -364,324 +65,234 @@ else
},
},
})
exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "makepowder",
heading = 156.0,
debugPoly = false,
minZ = Config.MakePowder.z-2,
maxZ = Config.MakePowder.z+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:makepowder",
icon = "fas fa-sign-in-alt",
label = "chop it up",
},
},
})
----- 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",
end
-- cocaine ( Bagging and Cutting is in Cocaine.lua due to globals used :))
for k, v in pairs (Config.MakePowder) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:makepowder", icon = "fas fa-sign-in-alt", label = "chop it up", data = k, distance = 2.0,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
}
})
--------------------------------------- XTC
exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "stealisosafrole2",
heading = 156.0,
debugPoly = false,
minZ = Config.isosafrole.z-2,
maxZ = Config.isosafrole.z+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:stealisosafrole",
icon = 'fas fa-sign-in-alt',
label = 'Steal Isosafrole',
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "stealmdp2p",
heading = 156.0,
debugPoly = false,
minZ = Config.mdp2p.z-2,
maxZ = Config.mdp2p.z+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:stealmdp2p",
icon = 'fas fa-eye',
label = 'Steal mdp2p',
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "makerawxtc",
heading = 156.0,
debugPoly = false,
minZ = Config.rawxtcloc.z-2,
maxZ = Config.rawxtcloc.z+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:makingrawxtc",
icon = 'fas fa-eye',
label = 'Make Raw XTC',
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "buypress",
heading = 156.0,
debugPoly = false,
minZ = Config.buypress.z-2,
maxZ = Config.buypress.z+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:buypress",
icon = 'fas fa-eye',
label = 'Buy Press',
},
},
distance = 2.5
})
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("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})
end
end
------------- lsd
for k, v in pairs (Config.lysergicacid) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:getlysergic", icon = "fas fa-sign-in-alt", label = "stealing", 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("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})
end
end
for k, v in pairs (Config.diethylamide) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:getdiethylamide", icon = "fas fa-sign-in-alt", label = "stealing", 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("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
end
for k, v in pairs (Config.gettabs) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:buytabs", icon = "fas fa-sign-in-alt", label = "Buy Tabs", 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("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})
end
end
------ heroin
for k, v in pairs (Config.dryplant) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
local options = {
{ type = "client", event = "md-drugs:client:dryplant", icon = "fas fa-sign-in-alt", label = "Dry Poppies", 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("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})
end
end
for k, v in pairs (Config.cutheroinone) do
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,
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)
+30 -68
View File
@@ -2,82 +2,44 @@ local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function()
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)]
travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false)
FreezeEntityPosition(travellingmerchant, true)
SetEntityInvincible(travellingmerchant, true)
if Config.OxInv then
if Config.oxtarget then
options = {
{
label = "Travelling Merchant",
icon = "fas fa-eye",
onSelect = function()
lib.showContext('travellingmerchant')
end,
},
}
exports.ox_target:addLocalEntity(travellingmerchant, options)
else
exports['qb-target']:AddTargetEntity(travellingmerchant, {
options = {
{
label = "Travelling Merchant",
icon = "fas fa-eye",
action = function()
lib.showContext('travellingmerchant')
end,
},
}
})
end
local travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
Freeze(travellingmerchant, true, CurrentLocation.w)
if Config.oxtarget then
local options = {
{ label = "Travelling Merchant", icon = "fas fa-eye", onSelect = function() lib.showContext('travellingmerchant') end},
}
exports.ox_target:addLocalEntity(travellingmerchant, options)
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, {
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
{ label = "Travelling Merchant", icon = "fas fa-eye", action = function() lib.showContext('travellingmerchant') end},
}
})
end
end)
CreateThread(function()
local ShopMenu = {}
local ShopMenu = {}
for k, v in pairs (Config.Items.items) do
ShopMenu[#ShopMenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
header = v.label,
title = v.label,
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
amount = v.amount,
}
for k, v in pairs (Config.Items.items) do
ShopMenu[#ShopMenu + 1] = {
icon = GetImage(v.name),
description = '$'.. v.price,
title = GetLabel(v.name),
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
amount = v.amount,
table = Config.Items.items,
num = k
}
lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu})
end
}
lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu})
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 },
})
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)
+131 -317
View File
@@ -1,6 +1,7 @@
local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {}
local exploded = nil
local drying = false
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
@@ -15,24 +16,15 @@ RegisterNetEvent('weed:respawnCane', function(loc)
if not HasModelLoaded(hash) then LoadModel(hash) end
if not WeedPlant[loc] then
WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
SetEntityAsMissionEntity(WeedPlant[loc], true, true)
FreezeEntityPosition(WeedPlant[loc], true)
SetEntityHeading(WeedPlant[loc], v.heading)
Freeze(WeedPlant[loc],true, v.heading)
exports['qb-target']:AddTargetEntity(WeedPlant[loc], {
options = {
{
icon = "fas fa-hand",
label = "Pick Weed",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("weed:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
end,
canInteract = function()
if Config.Joblock then
@@ -41,7 +33,8 @@ RegisterNetEvent('weed:respawnCane', function(loc)
else
return true end end,
}
}
},
distance = 2.5
})
end
end)
@@ -57,24 +50,15 @@ RegisterNetEvent("weed:init", function()
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
SetEntityAsMissionEntity(WeedPlant[k], true, true)
FreezeEntityPosition(WeedPlant[k], true)
SetEntityHeading(WeedPlant[k], v.heading)
Freeze(WeedPlant[k],true, v.heading)
exports['qb-target']:AddTargetEntity(WeedPlant[k], {
options = {
{
icon = "fas fa-hand",
label = "Pick Weed",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("weed:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", k)
end,
canInteract = function()
if Config.Joblock then
@@ -83,7 +67,8 @@ RegisterNetEvent("weed:init", function()
else
return true end end,
}
}
},
distance = 2.5
})
end
end
@@ -117,75 +102,80 @@ CreateThread(function()
for k, v in pairs (Config.WeedDry) do
exports['qb-target']:AddBoxZone("weeddry"..k,v,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "weeddry"..k,
heading = 11.0,
debugPoly = false,
minZ = v.z-2,
maxZ = v.z+2,
}, {
options = {
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,}, {
options = {
{
name = 'dryweed',
icon = "fas fa-sign-in-alt",
label = "Dry Weed",
distance = 1,
items = "wetcannabis",
item = "wetcannabis",
action = function()
if drying then
QBCore.Functions.Notify("Already Drying One Out", "error")
Notify(Lang.Weed.busy, "error")
else
local loc = GetEntityCoords(PlayerPedId())
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true
FreezeEntityPosition(weedplant, true)
QBCore.Functions.Notify("Wait A little Bit To Dry", "success")
Notify("Wait A little Bit To Dry", "success")
Wait(math.random(1000,5000))
QBCore.Functions.Notify("Take Down The Weed", "success")
exports['qb-target']:AddTargetEntity(weedplant, {
options = {
{
icon = "fas fa-sign-in-alt",
label = "Pick Up Weed",
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
}
}
})
Notify("Take Down The Weed", "success")
local options = {
{
icon = "fas fa-sign-in-alt",
label = "Pick Up Weed",
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
}
}
local optionsox = {
{
icon = "fas fa-sign-in-alt",
label = "Pick Up Weed",
onSelect = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(weedplant, optionsox )
else
exports['qb-target']:AddTargetEntity(weedplant, {options = options})
end
end
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
if drying == false then
return true end end
else
return true end end,
},
},
})
end
exports['qb-target']:AddBoxZone("teleinweed",Config.Telein,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "teleinweed",
heading = 11.0,
debugPoly = false,
minZ = Config.Telein.z-2,
maxZ = Config.Telein.z+2,
}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
distance = 5,
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,}, {
options = {
{ name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", distance = 2.0,
action = function()
SetEntityCoords(PlayerPedId(),Config.Teleout)
@@ -196,26 +186,14 @@ options = {
return true end
else
return true end end,
},
},
})
exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "teleinweedout",
heading = 11.0,
debugPoly = false,
minZ = Config.Teleout.z-2,
maxZ = Config.Teleout.z+2,
}, {
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,}, {
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 = 2.0,
action = function()
SetEntityCoords(PlayerPedId(),Config.Telein)
end,
canInteract = function()
if Config.Joblock then
@@ -223,40 +201,20 @@ options = {
return true end
else
return true end end,
},
},
})
exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "MakeButter",
heading = 11.0,
debugPoly = false,
minZ = Config.MakeButter.z-2,
maxZ = Config.MakeButter.z+2,
}, {
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,}, {
options = {
{
name = 'butter',
icon = "fas fa-sign-in-alt",
label = "Make Butter",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Canna Butter", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebutter")
ClearPedTasks(PlayerPedId())
else
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('mdbutter') and not ItemCheck('grindedweed') then return end
if not minigame(2, 8) then return end
if not progressbar(Lang.Weed.canna, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makebutter")
end,
canInteract = function()
if Config.Joblock then
@@ -271,23 +229,11 @@ options = {
label = "Make Brownies",
item = "cannabutter",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Special Brownies", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makebrownies")
ClearPedTasks(PlayerPedId())
else
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('cannabutter') and not ItemCheck('flour') and not ItemCheck('chocolate') then return end
if not minigame(2, 8) then return end
if not progressbar(Lang.Weed.brown, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makebrownies")
end,
canInteract = function()
if Config.Joblock then
@@ -302,23 +248,10 @@ options = {
label = "Make Cookies",
item = "cannabutter",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Special Cookies", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makecookies")
ClearPedTasks(PlayerPedId())
else
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('cannabutter') and not ItemCheck('flour') then return end
if not minigame(2, 8) then return end
if not progressbar(Lang.Weed.cook, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makecookies")
end,
canInteract = function()
if Config.Joblock then
@@ -333,23 +266,10 @@ options = {
label = "Make Chocolate",
item = "cannabutter",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Special Chocolate", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makechocolate")
ClearPedTasks(PlayerPedId())
else
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('cannabutter') and not ItemCheck('chocolate') then return end
if not minigame(2, 8) then return end
if not progressbar(Lang.Weed.choc, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makechocolate")
end,
canInteract = function()
if Config.Joblock then
@@ -364,23 +284,10 @@ options = {
label = "Make Muffin",
item = "cannabutter",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Special Muffin", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makemuffin")
ClearPedTasks(PlayerPedId())
else
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('cannabutter') and not ItemCheck('flour') then return end
if not minigame(2, 8) then return end
if not progressbar(Lang.Weed.muff, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makemuffin")
end,
canInteract = function()
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
name = "makeoil",
heading = 11.0,
debugPoly = false,
minZ = Config.MakeOil.z-2,
maxZ = Config.MakeOil.z+2,
}, {
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,}, {
options = {
{
name = 'Oil',
icon = "fas fa-sign-in-alt",
label = "Make Oil",
action = function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Making Wax Oil", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:makeoil")
ClearPedTasks(PlayerPedId())
else
local explosion = math.random(1,100)
local loc = GetEntityCoords(PlayerPedId())
if explosion <= 99 then
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
exploded = true
QBCore.Functions.Notify("Stove Is Too Hot Wait 30 Seconds To Cool Down", "error")
Wait(1000 * 30)
exploded = nil
end
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
if not ItemCheck('butane') and not ItemCheck('grindedweed') then return end
if not minigame(2, 8) then
local explosion = math.random(1,100)
local loc = GetEntityCoords(PlayerPedId())
if explosion <= 99 then
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
exploded = true
Notify(Lang.Weed.stovehot, "error")
Wait(1000 * 30)
exploded = nil
end
return end
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makeoil")
end,
canInteract = function()
if exploded == nil then return true end
@@ -469,131 +358,56 @@ RegisterNetEvent('md-drugs:client:bluntwraps', function(args)
title = 'Blunt Types',
menu = 'bluntroll',
options = {
{
title = 'Roll Blunt',
description = 'Roll A Regular Blunt',
icon = 'check',
serverEvent = 'md-drugs:server:rollblunt',
},
{
title = 'Dip Blunt Wrap In Lean',
description = 'Roll A Lean Blunt',
icon = 'check',
serverEvent = 'md-drugs:server:rollleanblunt',
},
{
title = 'Dip Blunt Wrap In Dextro',
description = 'Roll A Dextro Blunt',
icon = 'check',
serverEvent = 'md-drugs:server:rolldextroblunt',
},
{
title = 'Roll A Chewy Blunt',
description = 'Roll A Chewy Blunt',
icon = 'check',
serverEvent = 'md-drugs:server:rollchewyblunt',
},
},
{ title = 'Roll Blunt', description = 'Roll A Regular Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollblunt'},
{ title = 'Dip Blunt Wrap In Lean', description = 'Roll A Lean Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollleanblunt'},
{ title = 'Dip Blunt Wrap In Dextro', description = 'Roll A Dextro Blunt', icon = 'check', serverEvent = 'md-drugs:server:rolldextroblunt'},
{ title = 'Roll A Chewy Blunt', description = 'Roll A Chewy Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollchewyblunt'},
},
})
lib.showContext('bluntroll')
end)
RegisterNetEvent("md-drugs:client:rollanim", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
Wait(4000)
ClearPedTasks(PlayerPedId())
if not progressbar(Lang.Weed.roll, 4000, 'uncuff') then return end
end)
RegisterNetEvent("md-drugs:client:grind", function()
if not progressbar("grinding", 4000, 'uncuff') then return end
end)
RegisterNetEvent("md-drugs:client:dodabs", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
if not progressbar('Doing Dabs', 4000, 'bong2') then return end
AlienEffect()
end)
RegisterNetEvent("md-drugs:client:edibles", function()
QBCore.Functions.Progressbar("use_lsd", "Eating Edibles", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function()
AlienEffect()
ClearPedTasks(PlayerPedId())
end)
end)
CreateThread(function()
local WeedShop = {}
local current = "u_m_m_jesus_01"
lib.requestModel(current, Config.requestModelTime)
local CurrentLocation = vector3(1030.46, -3203.63, -38.2)
WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false)
FreezeEntityPosition(WeedGuy, true)
SetEntityInvincible(WeedGuy, true)
SetEntityHeading(WeedGuy, 270.0)
exports['qb-target']:AddTargetEntity(WeedGuy, {
options = {
{
label = "Weed Shop",
icon = "fas fa-eye",
action = function()
lib.showContext('WeedShop')
end,
},
}
})
lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.WeedSaleman
local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
Freeze(WeedGuy, true, CurrentLocation.w)
exports['qb-target']:AddTargetEntity(WeedGuy, {
options = {
{label = "Weed Shop",icon = "fas fa-eye",action = function() lib.showContext('WeedShop')end},
}
})
for k, v in pairs (Config.Weed.items) do
WeedShop[#WeedShop + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
header = v.label,
title = v.label,
event = "md-drugs:client:WeedShop",
icon = GetImage(v.name),
title = GetLabel(v.name),
description = '$'.. v.price,
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
amount = v.amount,
item = v.name,
cost = v.price,
amount = v.amount,
table = Config.Weed.items,
num = k,
}
}
lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop})
end
end
end)
RegisterNetEvent("md-drugs:client:WeedShop", function(data)
local price = data.cost
local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price
local max = data.amount
local dialog = exports.ox_lib:inputDialog(data.item .."!", {
{ type = 'select', label = "Payment Type", default = "cash",
options = {
{ value = "cash"},
{ value = "bank"},
}
},
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
})
if data.cost == "Free" then data.cost = 0 end
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost )
end)
RegisterNetEvent('md-drugs:client:smokeblunts', function(itemName)
TriggerEvent('animations:client:EmoteCommandStart', {'smoke'})
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
Wait(1000)
if itemName == "blunts" then
AlienEffect()
elseif itemName == "leanblunts" or itemName == "dextroblunts" then
EcstasyEffect()
else
TrevorEffect()
end
end)
+82 -446
View File
@@ -1,456 +1,92 @@
local QBCore = exports['qb-core']:GetCoreObject()
local miss = false
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
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)
RegisterNetEvent("md-drugs:client:successsalecoke")
AddEventHandler("md-drugs:client:successsalecoke", 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:wholesalecoke")
Citizen.Wait(4000)
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
})
RegisterNetEvent("md-drugs:client:SuccessSale", function(drug)
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
if drug == 'coke' then
TriggerServerEvent("md-drugs:server:wholesalecoke")
elseif drug == 'crack' then
TriggerServerEvent("md-drugs:server:wholesalecrack")
elseif drug == 'lsd' then
TriggerServerEvent("md-drugs:server:wholesalelsd")
elseif drug == 'heroin' then
TriggerServerEvent("md-drugs:server:wholesaleheroin")
elseif drug == 'xtc' then
TriggerEvent("md-drugs:client:wholesalextc")
end
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")
Citizen.Wait(4000)
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:setupcrack")
AddEventHandler("md-drugs:client:setupcrack", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
Citizen.Wait(4000)
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
----------------------------- heroin
RegisterNetEvent("md-drugs:client:getlocheroin")
AddEventHandler("md-drugs:client:getlocheroin", function()
local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
local unluck = math.random(1,100)
if deliveryBlip ~= nil then
RemoveBlip(deliveryBlip)
end
if unlucky <= Config.AlertPoliceWholesale then
PoliceCallWholesale()
end
deliveryBlip = AddBlipForCoord(CurrentLocation)
SetBlipSprite(deliveryBlip, 1)
SetBlipDisplay(deliveryBlip, 2)
SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("drug Meet")
EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true)
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "heroinsell", debugPoly = false })
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
local current = "g_m_y_famdnf_01"
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
exports['qb-target']:AddTargetEntity(drugdealer, {
options = {
{
type = "client",
label = "Talk To Buyer",
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
local ped = GetEntityCoords(PlayerPedId())
if luck <= Config.SuccessfulChance then
TriggerEvent("md-drugs:client:successsaleheroin")
else
TriggerEvent("md-drugs:client:setupheroin")
Wait(3000)
SetUpPeds()
end
end,
},
},
distance = 2.0
})
end)
RegisterNetEvent("md-drugs:client:successsaleheroin")
AddEventHandler("md-drugs:client:successsaleheroin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:wholesaleheroin")
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:setupheroin")
AddEventHandler("md-drugs:client:setupheroin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
--------------------------- lsd
RegisterNetEvent("md-drugs:client:getloclsd")
AddEventHandler("md-drugs:client:getloclsd", function()
local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
local unluck = math.random(1,100)
if deliveryBlip ~= nil then
RemoveBlip(deliveryBlip)
end
if unlucky <= Config.AlertPoliceWholesale then
PoliceCallWholesale()
end
deliveryBlip = AddBlipForCoord(CurrentLocation)
SetBlipSprite(deliveryBlip, 1)
SetBlipDisplay(deliveryBlip, 2)
SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("drug Meet")
EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true)
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "lsdsell", debugPoly = false })
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
local current = "g_m_y_famdnf_01"
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
exports['qb-target']:AddTargetEntity(drugdealer, {
options = {
{
type = "client",
label = "Talk To Buyer",
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
local ped = GetEntityCoords(PlayerPedId())
if luck <= Config.SuccessfulChance then
TriggerEvent("md-drugs:client:successsalelsd")
else
TriggerEvent("md-drugs:client:setuplsd")
Wait(3000)
SetUpPeds()
end
end,
},
},
distance = 2.0
})
end)
RegisterNetEvent("md-drugs:client:successsalelsd")
AddEventHandler("md-drugs:client:successsalelsd", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:wholesalelsd")
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:setuplsd")
AddEventHandler("md-drugs:client:setuplsd", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
------------------------- xtc
RegisterNetEvent("md-drugs:client:getlocxtc")
AddEventHandler("md-drugs:client:getlocxtc", function()
local unlucky = math.random(1,100)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
local unluck = math.random(1,100)
if deliveryBlip ~= nil then
RemoveBlip(deliveryBlip)
end
if unlucky <= Config.AlertPoliceWholesale then
PoliceCallWholesale()
end
deliveryBlip = AddBlipForCoord(CurrentLocation)
SetBlipSprite(deliveryBlip, 1)
SetBlipDisplay(deliveryBlip, 2)
SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("drug Meet")
EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true)
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "xtcsell", debugPoly = false })
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
local current = "g_m_y_famdnf_01"
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
exports['qb-target']:AddTargetEntity(drugdealer, {
options = {
{
type = "client",
label = "Talk To Buyer",
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
local ped = GetEntityCoords(PlayerPedId())
if luck <= Config.SuccessfulChance then
TriggerEvent("md-drugs:client:successsalextc")
else
TriggerEvent("md-drugs:client:setupxtc")
Wait(3000)
SetUpPeds()
end
end,
},
},
distance = 2.0
})
end)
RegisterNetEvent("md-drugs:client:successsalextc")
AddEventHandler("md-drugs:client:successsalextc", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
TriggerServerEvent("md-drugs:server:wholesalextc")
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:setupxtc")
AddEventHandler("md-drugs:client:setupxtc", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
DeleteEntity(drugdealer)
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:SetUp", function()
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
end)
+179 -804
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -3,7 +3,7 @@ author "mustache_dom"
description "drugs by mustache dom"
fx_version "cerulean"
game "gta5"
version '3.0.0'
version '3.5.9'
client_scripts {
'client/**.lua',
'@PolyZone/client.lua',
@@ -19,6 +19,7 @@ server_scripts {
shared_scripts {
'@ox_lib/init.lua',
'shared/**.lua',
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

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

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

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