101 Commits
Author SHA1 Message Date
Mustache Dom 1e3264bb9a Merge branch 'main' into test2 2025-01-13 22:47:47 -08:00
Mustache Dom be0dd02166 yolo 2025-01-13 22:44:37 -08:00
Mustache Dom a5246ad55b Update recipes.lua 2025-01-02 17:57:13 -08:00
Mustache Dom 9520c88d58 adjust consumables 2024-12-16 03:53:59 -08:00
Mustache Dom aca346cc1c ps-ui fix 2024-12-16 03:34:20 -08:00
Mustache Dom 79569a18b6 fix for lean and meth missions
update lsd heroin tables
2024-12-16 03:22:44 -08:00
Mustache Dom b56e585691 added CUI function for createuseableitem. will add support for other frameworks in the future 2024-12-12 17:26:08 -08:00
Mustache Dom 3043ecd924 removed core export: fixed bugs 2024-12-12 15:26:48 -08:00
Mustache Dom a07118d0cb added sv function to check cops and threw a cop check in wholesale, made it so you can only buy heroin table if none are in your inventory 2024-12-12 14:50:05 -08:00
Mustache Dom bf1471e238 added codem dispatch support 2024-11-26 17:26:46 -08:00
Mustache Dom fc5b1f5164 yeehaw 2024-11-26 16:07:15 -08:00
Mustache Dom 26fd63d750 edit 2024-11-26 15:45:17 -08:00
Mustache Dom 65597810c7 fix qs images 2024-11-26 13:41:29 -08:00
Mustache Dom f9bc39fc1d version 2024-11-25 20:03:49 -08:00
Mustache Dom cc33ecb7e2 punctuation 2024-11-25 19:57:26 -08:00
Mustache Dom 9d04b359c1 vscode settings 2024-11-25 12:27:43 -08:00
Mustache Dom 0b943d8154 update readme 2024-11-25 02:07:07 -08:00
Mustache Dom c37b777748 added ped walk away feature if you dont cornersell to them fast enough 2024-11-25 01:46:26 -08:00
Mustache Dom c349563ef3 adjusted icons 2024-11-25 01:21:53 -08:00
Mustache Dom 5b6fef2d49 refractored a lot removed travellingmerchant file, now in pedspawns.lua 2024-11-24 01:25:09 -08:00
Mustache Dom 001378704c updated deliveries to be server sided and adjusted all locations to vec4 2024-11-23 15:33:17 -08:00
Mustache Dom cf5cfba909 patch for pharma, new callback to do animations and progressbar checks 2024-11-23 14:38:23 -08:00
Mustache Dom f1ed2c0860 ree 2024-11-23 02:55:09 -08:00
Mustache Dom e83cddd96f updated pharma to utilize nearby Players and give them the prescription directly 2024-11-23 02:21:39 -08:00
Mustache Dom 5c5f454207 removed 90% of logs ( added logs to getrecipe, locationcheck, and fixed wholesale, dealers, and oxyruns, and meth 2024-11-23 01:58:57 -08:00
Mustache Dom cdd26ab465 bug fixes
labkit/presses now are tabled in server side and has checks to see if you have an active table before proceeding/ gives back item if headpop or crash
2024-11-22 12:26:27 -08:00
Mustache Dom c2fddd6144 update
made server table for presses, will do same for lab kits
2024-11-22 01:35:25 -08:00
Mustache Dom 6df0983273 patch 2024-11-22 00:27:30 -08:00
Mustache Dom b7353b4e97 Update lsd.lua 2024-11-19 01:32:04 -08:00
Mustache Dom c81d113494 test2 2024-11-16 23:39:34 -08:00
Mustache Dom 07481651b8 test 2024-11-16 23:39:22 -08:00
Mustache Dom e04d91e79e update readme 2024-11-12 17:22:12 -08:00
Mustache Dom 07c84ff640 test 2024-11-12 17:08:02 -08:00
Mustache Dom 8df50c0417 moved things around 2024-11-12 02:36:45 -08:00
Mustache Dom abb1bba3fe fixed bugs 2024-11-12 02:07:16 -08:00
Mustache Dom 9d828a2b15 update readme 2024-11-12 01:19:37 -08:00
Mustache Dom 31ee7f88c0 update file names 2024-11-12 01:06:40 -08:00
Mustache Dom 5bc0e9f4e0 moved more 2024-11-12 01:04:42 -08:00
Mustache Dom bcdf71b17a check 2024-11-11 20:22:48 -08:00
Mustache Dom c6d8556c12 Update xtc.lua 2024-11-11 12:10:39 -08:00
Mustache Dom aa015ba757 Update xtc.lua 2024-11-11 12:10:07 -08:00
Mustache Dom 52224ab097 remove debug poly 2024-11-07 11:35:34 -08:00
Mustache Dom b486a28a4a Update cocaine.lua 2024-11-06 10:50:49 -08:00
Mustache Dom adcd5d7c2b Update cocaine.lua 2024-11-06 10:44:56 -08:00
Mustache Dom bb4d05373e Merge pull request #57 from Mustachedom/testing-shit
updated
2024-11-05 00:49:26 -08:00
Mustache Dom b1ac95f959 Merge branch 'main' into testing-shit 2024-11-05 00:49:12 -08:00
Mustache Dom 3db581ac1e update 2024-11-05 00:46:12 -08:00
Mustache Dom c7479b44ff update 2024-11-04 17:43:48 -08:00
Mustache Dom 11e3b5efe6 update 2024-11-04 16:46:27 -08:00
Mustache Dom b1bcb7ce56 getPlayer 2024-11-01 00:54:21 -07:00
Mustache Dom 502677054c fix 2024-10-30 13:03:51 -07:00
Mustache Dom 025cd2884b fx 2024-10-28 14:42:32 -07:00
Mustache Dom 7978cc0b90 Update version.txt 2024-10-28 14:39:45 -07:00
Mustache Dom 7c45cbaec4 Delete langs directory 2024-10-28 14:39:31 -07:00
Mustache Dom 3c80fbfbb8 iconic 2024-10-28 14:35:47 -07:00
Mustache Dom 70c3d9ae15 updated a lot 2024-10-28 14:11:49 -07:00
Mustache Dom 99d0ae58be removed OnPlayerLoad and Resource Start from prop drugs to functions file to condense repeatable code 2024-10-25 11:41:59 -07:00
Mustache Dom 24877e6447 condense target 2024-10-25 02:00:55 -07:00
Mustache Dom 83f2749101 remove blips| switch to waypoint. function spawning tables, code condense 2024-10-25 01:55:35 -07:00
Mustache Dom 1224133815 rewrote crack 2024-10-24 20:19:44 -07:00
Mustache Dom 73af37c00a tweaks 2024-10-24 20:00:27 -07:00
Mustache Dom dbed6b3c47 made makeMenu function, moved all stores from config to server/travellingmerchant.lua 2024-10-24 19:45:39 -07:00
Mustache Dom b796b6eff9 Update consumables.lua 2024-10-24 16:24:37 -07:00
Mustache Dom d2fdf7298d Update lsd.lua 2024-10-24 16:19:46 -07:00
Mustache Dom e9f722a140 reduce code, more langs, patch work, moved pharma drugs to consumables 2024-10-24 12:56:34 -07:00
Mustache Dom 9df44f726d fix 2024-10-23 17:49:03 -07:00
Mustache Dom d3e99d6440 added lang and sorts 2024-10-23 17:44:46 -07:00
Mustache Dom fefd53857e test test 2024-10-23 16:04:09 -07:00
Mustache Dom ca2a9205b0 Update consumables.lua 2024-10-22 16:44:56 -07:00
Mustache Dom 6dca2d36a7 Update fxmanifest.lua 2024-10-17 01:44:24 -07:00
Mustache Dom 48fedf0b48 Update consumables.lua 2024-10-04 11:01:01 -07:00
Mustache Dom 000a5b29a2 Update consumables.lua 2024-10-02 11:49:59 -07:00
Mustache Dom 2d3ca8a361 added support for more minigames
you can now utilize all of ps-ui, bl_ui, and glow_minigames
2024-10-02 01:00:46 -07:00
Mustache Dom 6e7fd5441f Update functions.lua 2024-10-01 18:35:06 -07:00
Mustache Dom 9a24682aac Update fxmanifest.lua 2024-10-01 18:32:39 -07:00
Mustache Dom e79d7fd6f5 Update version.txt 2024-10-01 18:32:27 -07:00
Mustache Dom 2c112c8927 Update functions.lua 2024-10-01 18:27:57 -07:00
Mustache Dom 41b66a45e4 Update functions.lua 2024-10-01 17:41:24 -07:00
Mustache Dom 9b69d6306c update to add more than one buff
read the consumables.lua in shared for instrustions. its easy
2024-10-01 16:10:49 -07:00
Mustache Dom 6dad9f70a9 a
a
2024-10-01 16:09:49 -07:00
Mustache Dom 4938821793 Update functions.lua 2024-10-01 09:06:03 -07:00
Mustache Dom 88bf966b91 Update heroin.lua 2024-09-30 13:16:44 -07:00
Mustache Dom 57de95f880 Update functions.lua 2024-09-30 12:52:16 -07:00
Mustache Dom 798ad3cd97 Update lsd.lua 2024-09-30 12:46:12 -07:00
Mustache Dom f2068806cb Update recipes.lua 2024-09-30 12:36:08 -07:00
Mustache Dom e4c5abed63 fix
peepee poopoo do people read this?
2024-09-28 18:20:22 -07:00
Mustache Dom 388c32939b update to fix
should fix ox items issues
2024-09-28 18:17:25 -07:00
Mustache Dom 85fc0a4b67 Update ox_inventory.txt 2024-09-28 17:41:48 -07:00
Mustache Dom 39b8ebc42d Update functions.lua 2024-09-28 10:02:36 -07:00
Mustache Dom 861a210dfe Update meth.lua 2024-09-28 10:01:58 -07:00
Mustache Dom 37ba74a700 Update functions.lua 2024-09-28 09:58:56 -07:00
Mustache Dom 5c88857368 Update meth.lua 2024-09-28 09:52:26 -07:00
Mustache Dom 20c24f7424 Update qb-inventory.txt 2024-09-27 21:27:35 -07:00
Mustache Dom 472eba3c0c Update ox_inventory.txt 2024-09-27 21:23:34 -07:00
Mustache Dom ca494fc88d Update functions.lua 2024-09-26 14:39:06 -07:00
Mustache Dom 018bc15419 Update recipes.lua 2024-09-26 09:44:31 -07:00
Mustache Dom ff810f1379 Update weed.lua 2024-09-26 09:43:32 -07:00
Mustache Dom 5a392fe0fe Update deliveries.lua 2024-09-25 11:46:40 -07:00
Mustache Dom df7804c2de Update functions.lua 2024-09-24 18:42:02 -07:00
Mustache Dom cbadec6e25 Update fxmanifest.lua 2024-09-24 18:41:28 -07:00
Mustache Dom 028c5f771f big update. i prob broke something, let me know in discord 2024-09-24 15:07:41 -07:00
61 changed files with 4120 additions and 6501 deletions

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
{
"Lua.diagnostics.disable": [
"missing-parameter",
"param-type-mismatch"
],
"Lua.diagnostics.globals": [
"lib",
"progressbar",
"loadParticle",
"makeMenu",
"minigame",
"tele",
"sorter",
"MySQL",
"trays",
"heroinkit",
"getPlayer",
"dist",
"sortTab",
"getRep",
"heroinCooldown",
"checkLoc",
"getRandW",
"shroomsCooldown"
]
}
+206 -425
View File
@@ -1,5 +1,3 @@
local QBCore = exports['qb-core']:GetCoreObject()
local started = nil local started = nil
local function loadParticle(dict) local function loadParticle(dict)
@@ -12,96 +10,74 @@ local function loadParticle(dict)
SetPtfxAssetNextCall(dict) SetPtfxAssetNextCall(dict)
end end
function MethCooking() function MethCooking()
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
lib.requestAnimDict(animDict, 500) lib.requestAnimDict(animDict, 500)
dict = "scr_ornate_heist" SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
local ped = PlayerPedId() local targetPosition = GetEntityCoords(PlayerPedId())
SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524)) local animDuration = GetAnimDuration(animDict, animName) * 800
Wait(1) FreezeEntityPosition(PlayerPedId(), true)
local targetPosition = GetEntityCoords(ped) local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0)
local animDuration = GetAnimDuration(animDict, animName) * 800 local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
FreezeEntityPosition(ped, true) NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0) local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
local sacid = CreateObjectNoOffset(`bkr_prop_meth_sacid`, targetPosition, 1, 1, 0) NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1) NetworkStartSynchronisedScene(netScene)
local ammonia = CreateObjectNoOffset(`bkr_prop_meth_ammonia`, targetPosition, 1, 1, 0) Wait(animDuration)
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1) NetworkStopSynchronisedScene(netScene)
NetworkStartSynchronisedScene(netScene) DeleteObject(sacid) DeleteObject(ammonia)
Wait(animDuration) FreezeEntityPosition(PlayerPedId(), false)
NetworkStopSynchronisedScene(netScene) lib.requestModel('hei_prop_heist_thermite', 2000)
DeleteObject(sacid) loadParticle('scr_ornate_heist')
DeleteObject(ammonia) local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
FreezeEntityPosition(ped, false) FreezeEntityPosition(thermite, true)
lib.requestModel('hei_prop_heist_thermite', 2000) SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
loadParticle('scr_ornate_heist') 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)
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false) Wait(math.random(10000, 20000))
FreezeEntityPosition(thermite, true) StopParticleFxLooped(therm, true)
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
Wait(1000)
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
Wait(math.random(10000, 20000))
StopParticleFxLooped(therm, true)
end end
function SmashMeth() function SmashMeth()
local ver = "" local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02" local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
lib.requestAnimDict(animDict, 500) lib.requestAnimDict(animDict, 500)
local ped = PlayerPedId() local ped = PlayerPedId()
local targetPosition = vector3(1012.628, -3194.619, -39.589) local targetPosition = vector3(1012.628, -3194.619, -39.589)
SetEntityCoords(ped, targetPosition) SetEntityCoords(ped, targetPosition)
Wait(1) Wait(1)
local animDuration = GetAnimDuration(animDict, animName) * 800 local animDuration = GetAnimDuration(animDict, animName) * 800
FreezeEntityPosition(ped, true) FreezeEntityPosition(ped, true)
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08) local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
local objects, sceneObjects = {}, { local objects, sceneObjects = {}, {
{ { hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
hash = `w_me_hammer`, { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
animName = "break_weigh_"..ver.."hammer" { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
}, { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
{ { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, }
animName = "break_weigh_"..ver.."tray01" for i=1, #sceneObjects, 1 do
}, local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
{ NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
hash = `bkr_Prop_Meth_Tray_02a`, objects[#objects+1] = obj
animName = "break_weigh_"..ver.."tray01^1" end
}, NetworkStartSynchronisedScene(netScene)
{ Wait(animDuration)
hash = `bkr_Prop_Meth_Tray_02a`, NetworkStopSynchronisedScene(netScene)
animName = "break_weigh_"..ver.."tray01^2" for i=1, #objects, 1 do
}, DeleteObject(objects[i])
{ end
hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, RemoveAnimDict(animDict)
animName = "break_weigh_"..ver.."tray01^3" FreezeEntityPosition(ped, false)
},
}
for i=1, #sceneObjects, 1 do
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
objects[#objects+1] = obj
end
NetworkStartSynchronisedScene(netScene)
Wait(animDuration)
NetworkStopSynchronisedScene(netScene)
for i=1, #objects, 1 do
DeleteObject(objects[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end end
function BagMeth() function BagMeth()
local ver = "" local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
lib.requestAnimDict(animDict, 500) lib.requestAnimDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000 local animDuration = GetAnimDuration(animDict, animName) * 1000
@@ -110,70 +86,28 @@ local ver = ""
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08) local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
local scenes = { local scenes = {
{ {
{ { hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
hash = `bkr_prop_meth_bigbag_04a`, { hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
animName = "break_weigh_"..ver.."box01" { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
},
{
hash = `bkr_prop_meth_bigbag_03a`,
animName = "break_weigh_"..ver.."box01^1"
},
{
hash = `bkr_prop_meth_openbag_02`,
animName = "break_weigh_"..ver.."methbag01"
}
}, },
{ {
{ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
hash = `bkr_prop_meth_openbag_02`, { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
animName = "break_weigh_"..ver.."methbag01^1" { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
hash = `bkr_prop_meth_openbag_02`,
animName = "break_weigh_"..ver.."methbag01^2"
},
{
hash = `bkr_prop_meth_openbag_02`,
animName = "break_weigh_"..ver.."methbag01^3"
}
}, },
{ {
{ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
hash = `bkr_prop_meth_openbag_02`, { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
animName = "break_weigh_"..ver.."methbag01^4" { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
},
{
hash = `bkr_prop_meth_openbag_02`,
animName = "break_weigh_"..ver.."methbag01^5"
},
{
hash = `bkr_prop_meth_openbag_02`,
animName = "break_weigh_"..ver.."methbag01^6"
}
}, },
{ {
{ { hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
hash = `bkr_prop_meth_scoop_01a`, { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
animName = "break_weigh_"..ver.."scoop" { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
hash = `bkr_prop_coke_scale_01`,
animName = "break_weigh_"..ver.."scale"
},
{
hash = `bkr_prop_fakeid_penclipboard`,
animName = "break_weigh_"..ver.."pen"
}
}, },
{ {
{ { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
hash = `bkr_prop_fakeid_clipboard_01a`, { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
animName = "break_weigh_"..ver.."clipboard"
},
{
hash = `bkr_Prop_Meth_Tray_02a`,
animName = "break_weigh_"..ver.."tray01^5"
}
} }
} }
local scenesList, entitiesList = {}, {} local scenesList, entitiesList = {}, {}
@@ -200,7 +134,6 @@ for i=1, #scenesList, 1 do
end end
Wait(animDuration-11000) Wait(animDuration-11000)
-- Citizen.Wait(45000)
for i=1, #scenesList, 1 do for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i]) NetworkStopSynchronisedScene(scenesList[i])
end end
@@ -212,21 +145,19 @@ FreezeEntityPosition(ped, false)
end end
function Tray() function Tray()
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@') RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7) Wait(7)
end
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
RequestModel("bkr_prop_meth_tray_02a")
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
Wait(0)
end
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
end end
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
RequestModel("bkr_prop_meth_tray_02a")
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
Wait(0)
end
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
end
function CutCoke() function CutCoke()
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter" local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
@@ -237,65 +168,53 @@ function CutCoke()
local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00) local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00)
local scenes = { local scenes = {
{ {
{ { hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
hash = `bkr_prop_coke_bakingsoda_o`, { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
animName = "coke_cut_v5_bakingsoda" { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
},
{
hash = `prop_cs_credit_card`,
animName = "coke_cut_v5_creditcard"
},
{
hash = `prop_cs_credit_card`,
animName = "coke_cut_v5_creditcard^1"
}
}, },
} }
local scenesList, entitiesList = {}, {} local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do for j=1, #scenes[i], 1 do
local s = scenes[i][j] local s = scenes[i][j]
RequestModel(s.hash) RequestModel(s.hash)
while not HasModelLoaded(s.hash) do while not HasModelLoaded(s.hash) do
Wait(0) Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true) scenesList[#scenesList+1] = scene
SetModelAsNoLongerNeeded(s.hash) end
entitiesList[#entitiesList+1] = obj DisableCamCollisionForEntity(ped)
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1) FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000) Wait(animDuration-11000)
for i=1, #scenesList, 1 do for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i]) NetworkStopSynchronisedScene(scenesList[i])
end end
for i=1, #entitiesList, 1 do for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i]) DeleteEntity(entitiesList[i])
end end
RemoveAnimDict(animDict) RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false) FreezeEntityPosition(ped, false)
end end
CreateThread(function() CreateThread(function()
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject() BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade) BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade) BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true) BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
end) end)
function BagCoke() function BagCoke()
local ver = "" local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
lib.requestAnimDict(animDict, 500) lib.requestAnimDict(animDict, 500)
@@ -305,52 +224,22 @@ local ver = ""
local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08) local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08)
local scenes = { local scenes = {
{ {
{ { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
hash = `bkr_prop_coke_cutblock_01`, { hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
animName = "break_weigh_"..ver.."box01" { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
},
{
hash = `bkr_prop_coke_fullmetalbowl_02`,
animName = "break_weigh_"..ver.."box01^1"
},
{
hash = `bkr_prop_coke_cutblock_01`,
animName = "break_weigh_"..ver.."methbag01"
}
}, },
{ {
{ { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
hash = `xm3_prop_xm3_bag_coke_01a`, { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
animName = "break_weigh_"..ver.."methbag01^1" { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
hash = `xm3_prop_xm3_bag_coke_01a`,
animName = "break_weigh_"..ver.."methbag01^2"
},
{
hash = `xm3_prop_xm3_bag_coke_01a`,
animName = "break_weigh_"..ver.."methbag01^3"
}
}, },
{ {
{ { hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
hash = `bkr_prop_coke_fullscoop_01a`, { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
animName = "break_weigh_"..ver.."scoop" { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
hash = `bkr_prop_coke_scale_01`,
animName = "break_weigh_"..ver.."scale"
},
{
hash = `bkr_prop_fakeid_penclipboard`,
animName = "break_weigh_"..ver.."pen"
}
}, },
{ {
{ { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
hash = `bkr_prop_fakeid_clipboard_01a`,
animName = "break_weigh_"..ver.."clipboard"
},
} }
} }
@@ -378,7 +267,6 @@ for i=1, #scenesList, 1 do
end end
Wait(animDuration-11000) Wait(animDuration-11000)
-- Citizen.Wait(45000)
for i=1, #scenesList, 1 do for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i]) NetworkStopSynchronisedScene(scenesList[i])
end end
@@ -477,19 +365,21 @@ function AlienEffect()
StopScreenEffect("DrugsMichaelAliensFightOut") StopScreenEffect("DrugsMichaelAliensFightOut")
end end
local hit = 0
function SpawnCarPedChase() function SpawnCarPedChase()
local ped = GetEntityCoords(PlayerPedId()) local stoploc = vector3(-1157.63, -3056.71, 13.94)
local stoploc = vector3(-1157.63, -3056.71, 13.94) local config = lib.callback.await('md-drugs:server:getLocs', false)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)] local start = config.StartLoc[math.random(1,#config.StartLoc)]
if started then -- checks if active if started then
else Notify(Lang.lean.act,'error')
else
started = true started = true
lib.requestModel(`pounder`, Config.RequestModelTime) lib.requestModel("pounder", Config.RequestModelTime)
lib.requestModel("ig_priest", Config.RequestModelTime) lib.requestModel("ig_priest", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.RequestModelTime) lib.requestModel("cargobob3", Config.RequestModelTime)
local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true) local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false) local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false) local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(pilot2, true) FreezeEntityPosition(pilot2, true)
SetEntityInvincible(pilot2, true) SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leancar) SetEntityAsMissionEntity(leancar)
@@ -497,68 +387,27 @@ else
SetPedIntoVehicle(driver, leancar, -1) SetPedIntoVehicle(driver, leancar, -1)
SetPedFleeAttributes(driver,false) SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0) TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(driver, true) -- everything above is ped/ veh spawn SetPedKeepTask(driver, true)
repeat -- repeats Wait(1000) only until repeat
Wait(1000) Wait(1000)
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0 -- either the distance is within 20 OR the driver is dead until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
if GetEntityHealth(driver) == 0 then -- once one of those thing ends, the loop breaks and carries on from here RemoveBlip(leancar)
if Config.oxtarget then if GetEntityHealth(driver) == 0 then
local options = { AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = Lang.targets.lean.st,
{ action = function()
name = 'leancar', hit = hit + 1
icon = 'fa-solid fa-car', if not minigame() then return end
label = 'Steal From Car', TriggerServerEvent('md-drugs:server:givelean')
onSelect = function() started = nil
if not minigame(2,8) then return end if math.random(1,100) <= 30 or hit == 4 then
TriggerServerEvent('md-drugs:server:givelean') hit = 0
started = nil DeleteVehicle(leancar)
if math.random(1,100) <= 30 then DeleteEntity(driver)
DeleteVehicle(leancar) DeleteEntity(pilot2)
DeleteEntity(driver) end
DeleteEntity(pilot2) end}, nil)
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 else
repeat -- this second loop is to spawn the helicopter when the truck is in distance DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
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)
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 end
end end
@@ -566,18 +415,20 @@ end
function SpawnMethCarPedChase() function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId()) local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94) local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = Config.StartLoc[math.random(1,#Config.StartLoc)] local config = lib.callback.await('md-drugs:server:getLocs', false)
local start = config.StartLoc[math.random(1,#config.StartLoc)]
local startedmeth = false local startedmeth = false
if startedmeth then if startedmeth then
Notify(Lang.meth.act,'error')
else else
startedmeth = true startedmeth = true
lib.requestModel(`journey`, Config.RequestModelTime) lib.requestModel("journey", Config.RequestModelTime)
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime) lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
lib.requestModel(`cargobob3`, Config.RequestModelTime) lib.requestModel("cargobob3", Config.RequestModelTime)
local methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true) local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, true, false) local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false) local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(methpilot, true) FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true) SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar) SetEntityAsMissionEntity(methcar)
@@ -590,118 +441,48 @@ else
Wait(1000) Wait(1000)
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0 until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
if GetEntityHealth(methdriver) == 0 then if GetEntityHealth(methdriver) == 0 then
if Config.oxtarget then AddSingleModel(methcar,{
local options = { name = 'methcar',
{ icon = 'fa-solid fa-car',
name = 'methcar', label = Lang.targets.meth.stealfromcar,
icon = 'fa-solid fa-car', action = function()
label = 'Steal From Car', if not minigame() then return end
onSelect = function() TriggerServerEvent('md-drugs:server:givemethingridients')
if not minigame(2,8) then return end startedmeth = false
TriggerServerEvent('md-drugs:server:givemethingridients') if math.random(1,100) <= 30 then
startedmeth = nil DeleteVehicle(methcar)
if math.random(1,100) <= 30 then DeleteEntity(methdriver)
DeleteVehicle(methcar) DeleteEntity(methpilot)
DeleteEntity(methdriver) end
DeleteEntity(methpilot) end,
end }, nil )
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 else
repeat DeleteVehicle(methcar)
Wait(1000) DeleteEntity(methdriver)
until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0 DeleteEntity(methpilot)
Wait( 3 * 1000)
local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
Wait(1000)
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 end
end end
function SetUpPeds() function SetUpPeds()
local ped = GetEntityCoords(PlayerPedId()) AddRelationshipGroup('setups')
local CokePed = CreatePed(0, "g_m_y_famdnf_01", ped.x+3, ped.y-5, ped.z-1, 90.0, true, true) local ped = GetEntityCoords(PlayerPedId())
local CokePed2 = CreatePed(0,"g_m_y_famdnf_01", ped.x+6, ped.y-10, ped.z-1, 90.0, true, true) local peds = {
local CokePed3 = CreatePed(0,"g_m_y_famdnf_01", ped.x+-2, ped.y+5, ped.z-1, 90.0, true, true) {x = ped.x+3, y = ped.y-5, z = ped.z-1, },
local CokePed4 = CreatePed(0,"g_m_y_famdnf_01", ped.x+8, ped.y-12, ped.z-1, 90.0, true, true) {x = ped.x+6, y = ped.y-10, z = ped.z-1,},
local CokePed5 = CreatePed(0,"g_m_y_famdnf_01", ped.x+5, ped.y-2, ped.z-1, 90.0, true, true) {x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
local CokePed6 = CreatePed(0,"g_m_y_famdnf_01", ped.x+2, ped.y-20, ped.z-1, 90.0, true, true) {x = ped.x+8, y = ped.y-12, z = ped.z-1,},
local CokePed7 = CreatePed(0,"g_m_y_famdnf_01", ped.x+1, ped.y-10, ped.z-1, 90.0, true, true) {x = ped.x+5, y = ped.y-2, z = ped.z-1, },
AddRelationshipGroup('setups') {x = ped.x+2, y = ped.y-20, z = ped.z-1,},
local peds = {CokePed, CokePed2,CokePed3, CokePed4, CokePed5,CokePed6, CokePed7} {x = ped.x+1, y = ped.y-10, z = ped.z-1,},
for k, v in pairs (ped) do }
SetPedRelationshipGroupDefaultHash(v, 'setups') for i = 1, #peds do
end local k = peds[i]
SetPedArmour(CokePed, 200) i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
SetPedCanSwitchWeapon(CokePed, true) SetPedRelationshipGroupHash(i, 'setups')
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true) GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed, PlayerPedId(), 0, 16) TaskCombatPed(i, PlayerPedId(), 0, 16)
GiveWeaponToPed(CokePed2, "weapon_pistol", 1, false, true) SetPedCombatAttributes(i, 46, true)
TaskCombatPed(CokePed2, PlayerPedId(), 0, 16) end
GiveWeaponToPed(CokePed3, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed3, PlayerPedId(), 0, 16)
GiveWeaponToPed(CokePed4, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed4, PlayerPedId(), 0, 16)
GiveWeaponToPed(CokePed5, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed5, PlayerPedId(), 0, 16)
GiveWeaponToPed(CokePed6, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed6, PlayerPedId(), 0, 16)
GiveWeaponToPed(CokePed7, "weapon_pistol", 1, false, true)
TaskCombatPed(CokePed7, PlayerPedId(), 0, 16)
SetPedCombatAttributes(CokePed, 46, true)
SetPedCombatAttributes(CokePed2, 46, true)
SetPedCombatAttributes(CokePed3, 46, true)
SetPedCombatAttributes(CokePed4, 46, true)
SetPedCombatAttributes(CokePed5, 46, true)
SetPedCombatAttributes(CokePed6, 46, true)
SetPedCombatAttributes(CokePed7, 46, true)
end 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)
+20 -116
View File
@@ -1,12 +1,11 @@
local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {} local CocaPlant = {}
local cuttingcoke = nil local cuttingcoke = nil
local baggingcoke = nil local baggingcoke = nil
local function pick(loc) local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc) TriggerServerEvent("coke:pickupCane", loc)
return true return true
end end
RegisterNetEvent('coke:respawnCane', function(loc) RegisterNetEvent('coke:respawnCane', function(loc)
@@ -14,31 +13,8 @@ RegisterNetEvent('coke:respawnCane', function(loc)
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not CocaPlant[loc] then if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true) CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(CocaPlant[loc], true, v.heading) Freeze(CocaPlant[loc], true, v.heading)
local options = { AddSingleModel(CocaPlant[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc)
{
icon = "fas fa-hand",
label = "pick Cocaine",
action = function()
if not pick(loc) then return end
end
}
}
local optionsox = {
{
icon = "fas fa-hand",
label = "pick Cocaine",
distance = 2.5,
onSelect = function()
if not pick(loc) then return end
end
}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(CocaPlant[loc], optionsox)
else
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {options = options, distance = 2.5})
end
end end
end) end)
@@ -50,50 +26,15 @@ end)
RegisterNetEvent("coke:init", function() RegisterNetEvent("coke:init", function()
for k, v in pairs (GlobalState.CocaPlant) do for k, v in pairs (GlobalState.CocaPlant) do
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end LoadModel(hash)
if not v.taken then if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading) Freeze(CocaPlant[k], true, v.heading)
local options = { AddSingleModel(CocaPlant[k], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k)
{
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
end
end) end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('prop_plant_01a')
TriggerEvent('coke:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_plant_01a')
TriggerEvent('coke:init')
end)
AddEventHandler('onResourceStop', function(resourceName) AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a')) SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
@@ -111,7 +52,7 @@ RegisterNetEvent("md-drugs:client:makepowder", function(data)
TriggerServerEvent("md-drugs:server:makepowder", data.data) TriggerServerEvent("md-drugs:server:makepowder", data.data)
end) end)
RegisterNetEvent("md-drugs:client:cutcokeone", function() RegisterNetEvent("md-drugs:client:cutcokeone", function(data)
if not ItemCheck('bakingsoda') then return end if not ItemCheck('bakingsoda') then return end
cuttingcoke = true cuttingcoke = true
if Config.FancyCokeAnims then if Config.FancyCokeAnims then
@@ -119,68 +60,31 @@ RegisterNetEvent("md-drugs:client:cutcokeone", function()
else else
if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
end end
TriggerServerEvent("md-drugs:server:cutcokeone") TriggerServerEvent("md-drugs:server:cutcokeone", data.data)
cuttingcoke = nil cuttingcoke = nil
end) end)
RegisterNetEvent("md-drugs:client:bagcoke", function() RegisterNetEvent("md-drugs:client:bagcoke", function(data)
if not ItemCheck('empty_weed_bag') then return end if not ItemCheck('empty_weed_bag') then return end
baggingcoke = true baggingcoke = true
if Config.FancyCokeAnims then if Config.FancyCokeAnims then
BagCoke() BagCoke()
else else
if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
end end
TriggerServerEvent("md-drugs:server:bagcoke") TriggerServerEvent("md-drugs:server:bagcoke", data.data)
baggingcoke = nil baggingcoke = nil
end) end)
CreateThread(function() CreateThread(function()
local options = { local config = lib.callback.await('md-drugs:server:getLocs', false)
{ 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 if Config.FancyCokeAnims == false then
for k, v in pairs (Config.CuttingCoke) do AddBoxZoneMulti('cuttcoke', config.CuttingCoke, { type = "client",event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end AddBoxZoneMulti('baggcoke', config.BaggingCoke, { type = "client",event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
local options = { else
{ type = "client", event = "md-drugs:client:cutcokeone", icon = "fas fa-sign-in-alt", label = "Cut Coke", data = k, distance = 2.0, AddBoxZoneSingle('cutcoke', config.singleSpot.cutcoke,
canInteract = function() { data = config.singleSpot.cutcoke, type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut, canInteract = function() if cuttingcoke == nil and baggingcoke == nil then return true end end })
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end AddBoxZoneSingle('bagcokepowder', config.singleSpot.bagcokepowder,
}, { data = config.singleSpot.bagcokepowder, type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag, canInteract = function() if baggingcoke == nil and cuttingcoke == nil 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
end) end)
+56 -11
View File
@@ -1,17 +1,62 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, statval, item)
lib.callback.register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
TriggerServerEvent('md-drugs:server:removeconsum', item) for k, v in pairs (status) do
if status == "armor" then if k == 'health' then
TriggerServerEvent('hospital:server:SetArmor', statval) local cur = GetEntityHealth(PlayerPedId())
TriggerServerEvent('consumables:server:useArmor') SetEntityHealth(PlayerPedId(), cur + v)
SetPedArmour(PlayerPedId(), statval) elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
else TriggerServerEvent('md-drugs:server:updatestatus', k, v)
TriggerServerEvent('md-drugs:server:updatestatus', status, statval) elseif k == "armor" then
TriggerServerEvent('hospital:server:SetArmor', v)
TriggerServerEvent('consumables:server:useArmor')
SetPedArmour(PlayerPedId(), v)
elseif k == 'speed' then
TriggerEvent('md-drugs:client:recievebuff', k, v)
elseif k == 'strength' then
TriggerEvent('md-drugs:client:recievebuff', k, v)
end
end end
TriggerEvent('evidence:client:SetStatus', 'widepupils', 200) 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 TriggerEvent('md-drugs:client:applyFeeling', effect)
if status == nil then return end return true
end) end)
RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
if type == 'speed' then
local count = 0
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49)
repeat
count = count + 1
Wait(1000)
until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end
if type == 'strength' then
local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat
strength = strength + 1
Wait(1000)
until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end
end)
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
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
end)
+88 -118
View File
@@ -1,145 +1,115 @@
local QBCore = exports['qb-core']:GetCoreObject()
local sell = false local sell = false
local sold = false
local targbusy = false
local inZone = false
local active = false
local function reset(targ)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
local coords = GetEntityCoords(targ)
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
active = false
end
local function walkAway(targ)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
local coords = GetEntityCoords(targ)
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
Wait(10000)
DeletePed(targ)
targbusy = false
active = false
end
local function sellDrug(item, amount, price, targ)
PoliceCall(20)
targbusy = true
if IsPedInAnyVehicle(PlayerPedId(), true) then
Notify(Lang.Cornerselling.inveh, 'error')
reset(targ)
return end
if not progressbar(string.format(Lang.Cornerselling.selling, GetLabel(item), price), 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
reset(targ)
end
local function deny(targ)
PoliceCall(20)
targbusy = true
if not progressbar(Lang.Cornerselling.deny, 4000, 'argue5') then return end
reset(targ)
end
function Cornersell() function Cornersell()
if active then return false end
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8) local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
if targ == nil then return end if targ == nil then return end
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 then return end if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
local sold = false local data = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
if data.item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) active = false return false end
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0) TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
active = true
repeat repeat
Wait(1000) Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
lib.requestAnimDict("rcmme_tracey1") lib.requestAnimDict("rcmme_tracey1")
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true)
FreezeEntityPosition(targ, true) AddMultiModel(data.ped, {
local item, amount = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false) { label = string.format(Lang.targets.CornerSell.sell, data.amount, GetLabel(data.item), data.price), icon ="fa-solid fa-money-bill",
if item == 'nothing' then Notify(' You Aint Got Shit', 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end action = function() sellDrug(data.item, data.amount, data.price, targ) end,
local bagAmount = math.random(1, amount) canInteract = function()
if bagAmount > 15 then bagAmount = math.random(1,15) end if not targbusy then return true end end,
local table = QBConfig.DrugsPrice[item] },
local price = math.random(table['min'], table['max'] ) * bagAmount { label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
local targbusy = false action = function() deny(targ) end,
local options = { canInteract = function()
{ label = 'Sell ' .. bagAmount .. ' Of ' .. GetLabel(item) .. ' For $' .. price .. '!', icon = "fas fa-eye", if not targbusy then return true end end,
onSelect = function() }}, nil)
PoliceCall(20) local timer = 45
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",
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
exports['qb-target']:AddTargetEntity(targ, { options = optionsqb, distance = 2.0})
end
repeat repeat
Wait(1000) Wait(1000)
until sold timer = timer - 1
until sold or timer == 0
if sold then sold = false return true end if sold then sold = false return true end
if timer == 0 then Notify(Lang.Cornerselling.timeout, 'error') targbusy = true walkAway(targ) return false end
end end
RegisterNetEvent('md-drugs:client:cornerselling', function() RegisterNetEvent('md-drugs:client:cornerselling', function()
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
local item, amount = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false) if inZone then Notify(Lang.Cornerselling.no, 'error') return end
if item ~= 'nothing' then local has = lib.callback.await('md-drugs:server:hasDrugs', false)
if sell then if has then
Notify('Lazy Ass Cant Even Sell Drugs', 'error') if sell then
TriggerServerEvent('md-drugs:server:cornerselling:stop')
Notify(Lang.Cornerselling.stop, 'error')
sell = false sell = false
active = false
else else
sell = true sell = true
Notify('Go Make That Paper', 'success') Notify(Lang.Cornerselling.start, 'success')
repeat repeat
Wait(1000) Wait(1000)
if not Cornersell() then end Cornersell()
until sell == false until not sell
end end
else else
Notify('You Cant Sell Air', 'error') Notify(Lang.Cornerselling.nodrugs, 'error')
end end
end) end)
CreateThread(function()
for k, v in pairs (QBConfig.NoSellZones) do
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
onEnter = function() inZone = true end, onExit = function() inZone = false end})
end
end)
RegisterNetEvent('md-drugs:client:cornerselling:remove', function(ped)
DeletePed(ped)
end)
+2 -8
View File
@@ -1,18 +1,12 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:makecrackone", function(data) RegisterNetEvent("md-drugs:client:makecrackone", function(data)
if not ItemCheck('bakingsoda') then return end if not ItemCheck('bakingsoda') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makecrackone", data.data) TriggerServerEvent("md-drugs:server:makecrackone", data.data)
end) end)
RegisterNetEvent("md-drugs:client:bagcrack", function(data) RegisterNetEvent("md-drugs:client:bagcrack", function(data)
if not ItemCheck('empty_weed_bag') then return end if not ItemCheck('empty_weed_bag') then return end
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", data.data) TriggerServerEvent("md-drugs:server:bagcrack", data.data)
end) end)
+51 -347
View File
@@ -1,360 +1,64 @@
local QBCore = exports['qb-core']:GetCoreObject() local isActive = false
local currentDealer = nil local dealer = {}
local dealerIsHome = false
local waitingDelivery = nil
local activeDelivery = nil
local deliveryTimeout = 0
local waitingKeyPress = false
local dealerCombo = nil
local drugDeliveryZone
-- Handlers
AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
if value then
QBCore.Functions.TriggerCallback('md-drugs:server:RequestConfig', function(DealerConfig)
QBConfig.Dealers = DealerConfig
end)
Wait(1000)
InitZones()
else
if dealerCombo then dealerCombo:destroy() end
end
end)
-- Functions
local function GetClosestDealer()
local ped = PlayerPedId()
local pCoords = GetEntityCoords(ped)
for k, v in pairs(QBConfig.Dealers) do
local dealerCoords = vector3(v.coords.x, v.coords.y, v.coords.z)
if #(pCoords - dealerCoords) < 2.0 then
currentDealer = k
break
end
end
end
RegisterNetEvent('md-drugs:client:opendealermenu', function() RegisterNetEvent('md-drugs:client:opendealermenu', function()
local dealermenu = {} local rep = GetRep()
if Config.StupidassNewQbItemName then makeMenu('dealermenu', rep)
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
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,
table = QBConfig.ProductsStupidNameRewrite,
num = k,
}
}
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
end
end
else
for k, v in pairs (QBConfig.Products) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
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,
table = QBConfig.Products,
num = k,
}
}
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
end
end
end
lib.showContext('dealermenu') lib.showContext('dealermenu')
end) end)
local function RandomDeliveryItemOnRep()
local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
local availableItems = {}
for k, _ in pairs(QBConfig.DeliveryItems) do
if QBConfig.DeliveryItems[k]["minrep"] <= myRep then
availableItems[#availableItems+1] = k
end
end
return availableItems[math.random(1, #availableItems)]
end
local function RequestDelivery() local function SpawnDealer()
if not waitingDelivery then local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
GetClosestDealer() for k,v in pairs(getDealers) do
local amount = math.random(1, 3)
local item = RandomDeliveryItemOnRep()
Notify(Lang.Delivery.search, 'success')
if Config.NearbyDeliveries == true then
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local nearbyLocations = {}
-- Filter out the nearby locations
for _, location in ipairs(Config.DeliveryLocations) do
local distance = #(playerCoords - location.coords)
if distance <= Config.DeliveryWithin then
nearbyLocations[#nearbyLocations + 1] = location
end
end
-- Select a random location from the nearby locations
if #nearbyLocations > 0 then
local selectedLocation = nearbyLocations[math.random(1, #nearbyLocations)]
waitingDelivery = {
["coords"] = selectedLocation.coords,
["locationLabel"] = selectedLocation.label,
["amount"] = amount,
["dealer"] = currentDealer,
["itemData"] = Config.DeliveryItems[item],
["item"] = item
}
else
Notify(Lang.Delivery.none, 'error')
end
else
local location = math.random(1, #QBConfig.DeliveryLocations)
waitingDelivery = {
["coords"] = QBConfig.DeliveryLocations[location]["coords"],
["locationLabel"] = QBConfig.DeliveryLocations[location]["label"],
["amount"] = amount,
["dealer"] = currentDealer,
["itemData"] = QBConfig.DeliveryItems[item],
["item"] = item
}
if QBConfig.Debug == true then
print(QBConfig.DeliveryLocations[location]["coords"])
print(QBConfig.DeliveryLocations[location]["label"])
end
end
TriggerServerEvent('md-drugs:server:giveDeliveryItems', waitingDelivery)
SetTimeout(2000, function()
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = QBConfig.Dealers[currentDealer]["name"],
subject = "Delivery Location",
message = "Deliver This For Me",
})
end)
TriggerEvent("md-drugs:client:setLocation",waitingDelivery)
else
Notify(Lang.Delivery.busy, 'error')
end
end
local function DeliveryTimer()
CreateThread(function()
while deliveryTimeout - 1 > 0 do
deliveryTimeout = deliveryTimeout - 1
Wait(1000)
end
deliveryTimeout = 0
end)
end
local function DeliverStuff()
if deliveryTimeout > 0 then
Wait(500)
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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
deliveryTimeout = 0
end
local function SetMapBlip(x, y)
SetNewWaypoint(x, y)
Notify(Lang.Delivery.found, 'success');
end
function InitZones()
if next(QBConfig.Dealers) == nil then return end
for k,v in pairs(QBConfig.Dealers) do
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
RequestModel(Ped) lib.requestModel(Ped, Config.RequestModelTime)
while not HasModelLoaded(Ped) do local loc = json.decode(v.coords)
Wait(0) dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
end Freeze(dealer[k], true, loc.h)
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false) AddMultiModel(dealer[k], {
Freeze(testdealer, true, 90) { icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, { action = function()
name = "dealer_"..k, local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
heading = v.heading, if bool then
minZ = v.coords.z - 1, Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
maxZ = v.coords.z + 1, TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
debugPoly = false, end
}, { end,
options = { },
{ { icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
icon = 'fas fa-user-secret', action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
label = "Deliver", }}, dealer[k])
action = function() end
RequestDelivery()
end,
canInteract = function()
GetClosestDealer()
local hours = GetClockHours()
local min = QBConfig.Dealers[currentDealer]["time"]["min"]
local max = QBConfig.Dealers[currentDealer]["time"]["max"]
if max < min then
if hours <= max then
if not waitingDelivery then
return true
end
elseif hours >= min then
if not waitingDelivery then
return true
end
end
else
if hours >= min and hours <= max then
if not waitingDelivery then
return true
end
end
end
end
},
{
icon = 'fas fa-user-secret',
label = "Open Shop",
action = function()
TriggerEvent('md-drugs:client:opendealermenu')
end,
canInteract = function()
GetClosestDealer()
local hours = GetClockHours()
local min = QBConfig.Dealers[currentDealer]["time"]["min"]
local max = QBConfig.Dealers[currentDealer]["time"]["max"]
if max < min then
if hours <= max then
return true
elseif hours >= min then
return true
end
else
if hours >= min and hours <= max then
return true
end
end
end
}
},
distance = 1.5
})
end
end end
-- Events RegisterNetEvent('md-drugs:client:RefreshDealers', function()
SpawnDealer()
RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData)
if dealerCombo then dealerCombo:destroy() end
QBConfig.Dealers = DealerData
Wait(1000)
InitZones()
end) end)
RegisterNetEvent('md-drugs:client:updateDealerItems', function(itemData, amount) CreateThread(function()
TriggerServerEvent('md-drugs:server:updateDealerItems', itemData, amount, currentDealer) SpawnDealer()
end) end)
RegisterNetEvent('md-drugs:client:setDealerItems', function(itemData, amount, dealer) RegisterNetEvent('md-drugs:client:setLocation', function(data)
QBConfig.Dealers[dealer]["products"][itemData.slot].amount = QBConfig.Dealers[dealer]["products"][itemData.slot].amount - amount local coord = json.decode(data.coords)
SetNewWaypoint(coord.x, coord.y)
if isActive then return end
isActive = true
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
Freeze(Buyer, true, coord.w)
AddSingleModel(Buyer, {
icon = 'fas fa-user-secret',
label = Lang.targets.Delivery.hand,
action = function()
if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
isActive = false
DeletePed(Buyer)
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
end,
canInteract = function()
if isActive then
return true
end
end
}, nil)
end) end)
RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
if activeDelivery then
SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"])
Notify(Lang.Delivery.already, 'error')
return
end
activeDelivery = locationData
deliveryTimeout = 300
DeliveryTimer()
SetMapBlip(activeDelivery["coords"].x, activeDelivery["coords"].y)
local Ped = "g_m_y_famdnf_01"
RequestModel(Ped)
while not HasModelLoaded(Ped) do
Wait(0)
end
Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false)
Freeze(Buyer, true, 180)
exports['qb-target']:AddTargetEntity(Buyer, {
options = {
{
icon = 'fas fa-user-secret',
label = "Hand Off",
action = function()
DeliverStuff()
Wait(4000)
DeleteEntity(Buyer)
waitingDelivery = nil
end,
canInteract = function()
if waitingDelivery then
return true
end
end
}
},
distance = 1.5
})
end)
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
if type == 'perfect' then
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
subject = "Delivery",
message = "You did it"
})
elseif type == 'bad' then
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
subject = "Delivery",
message = "You Fucked Me Over"
})
elseif type == 'late' then
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
subject = "Delivery",
message = "Better Late Than Dead"
})
end
end)
RegisterCommand('checkrep', function()
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
Notify(Lang.Delivery.checkrep..drugrep)
end, false)
+531 -68
View File
@@ -5,6 +5,14 @@ local minigametype = Config.minigametype
local notifytype = Config.Notify local notifytype = Config.Notify
local dispatch = Config.Dispatch local dispatch = Config.Dispatch
function getJobType()
return QBCore.Functions.GetPlayerData().job.type
end
function getJobName()
return QBCore.Functions.GetPlayerData().job.name
end
function progressbar(text, time, anim) function progressbar(text, time, anim)
TriggerEvent('animations:client:EmoteCommandStart', {anim}) TriggerEvent('animations:client:EmoteCommandStart', {anim})
if progressbartype == 'oxbar' then if progressbartype == 'oxbar' then
@@ -49,30 +57,125 @@ function progressbar(text, time, anim)
until cancelled or test until cancelled or test
if test then return true end if test then return true end
else else
print"dude, it literally tells you what you need to set it as in the config" print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
end end
end end
function minigame(num1, num2) function loadParticle(dict)
local check if not HasNamedPtfxAssetLoaded(dict) then
if minigametype == 'ps' then RequestNamedPtfxAsset(dict)
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
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end end
function LoadModel(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(0)
end
end
function minigame()
local time = 0
local game = Config.Minigames
if minigametype == 'ps_circle' then
local check
exports['ps-ui']:Circle(function(success)
check = success
end, game['ps_circle'].amount, game['ps_circle'].speed)
return check
elseif minigametype == 'ps_maze' then
local check
exports['ps-ui']:Maze(function(success)
check = success
end, game['ps_maze'].timelimit)
repeat Wait(10) until check ~= nil
return check
elseif minigametype == 'ps_scrambler' then
local check
exports['ps-ui']:Scrambler(function(success)
check = success
end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
repeat Wait(10) until check ~= nil
return check
elseif minigametype == 'ps_var' then
local check
exports['ps-ui']:VarHack(function(success)
check = success
end, game['ps_var'].numBlocks, game['ps_var'].time)
repeat Wait(10) until check ~= nil
return check
elseif minigametype == 'ps_thermite' then
local check
exports['ps-ui']:Thermite(function(success)
check = success
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
repeat Wait(10) until check ~= nil
return check
elseif minigametype == 'ox' then
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
return success
elseif minigametype == 'blcirprog' then
local success = exports.bl_ui:CircleProgress(game['blcirprog'].amount, game['blcirprog'].speed)
return success
elseif minigametype == 'blprog' then
local success = exports.bl_ui:Progress(game['blprog'].amount, game['blprog'].speed)
return success
elseif minigametype == 'blkeyspam' then
local success = exports.bl_ui:KeySpam(game['blkeyspam'].amount, game['blprog'].difficulty)
return success
elseif minigametype == 'blkeycircle' then
local success = exports.bl_ui:KeyCircle(game['blkeycircle'].amount, game['blkeycircle'].difficulty, game['blkeycircle'].keynumbers)
return success
elseif minigametype == 'blnumberslide' then
local success = exports.bl_ui:NumberSlide(game['blnumberslide'].amount, game['blnumberslide'].difficulty, game['blnumberslide'].keynumbers)
return success
elseif minigametype == 'blrapidlines' then
local success = exports.bl_ui:RapidLines(game['blrapidlines'].amount, game['blrapidlines'].difficulty, game['blrapidlines'].numberofline)
return success
elseif minigametype == 'blcircleshake' then
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
return success
elseif minigametype == 'glpath' then
local settings = {gridSize = game['glpath'].gridSize, lives = game['glpath'].lives, timeLimit = game['glpath'].timelimit}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then successes = true else successes = false end
end, "path", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
if successes then return true end
elseif minigametype == 'glspot' then
local settings = {gridSize = game['glspot'].gridSize, timeLimit = game['glspot'].gridSize, charSet = game['glspot'].charSet, required = game['glspot'].required}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then successes = true else successes = false end
end, "spot", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
elseif minigametype == 'glmath' then
local settings = {timeLimit = game['glmath'].timeLimit}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then successes = true else successes = false end
end, "math", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
elseif minigametype == 'none' then
return true
else
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
end
end
function Notify(text, type) function Notify(text, type)
if notifytype =='ox' then if notifytype =='ox' then
@@ -81,56 +184,126 @@ end
QBCore.Functions.Notify(text, type) QBCore.Functions.Notify(text, type)
elseif notifytype == 'okok' then elseif notifytype == 'okok' then
exports['okokNotify']:Alert('', text, 4000, type, false) exports['okokNotify']:Alert('', text, 4000, type, false)
else else
print"dude, it literally tells you what you need to set it as in the config" print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
end end
end end
function GetImage(img) function GetImage(img)
if GetResourceState('ox_inventory') == 'started' then if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items() local Items = exports['ox_inventory']:Items()
if Items[img]['client'] then if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end
if Items[img]['client']['image'] then local itemClient = Items[img] and Items[img]['client']
return Items[img]['client']['image'] if itemClient and itemClient['image'] then
else return itemClient['image']
return "nui://ox_inventory/web/images/".. img.. '.png' else
end return "nui://ox_inventory/web/images/" .. img .. '.png'
else end
return "nui://ox_inventory/web/images/".. img.. '.png' end
end local invs = {
elseif GetResourceState('ps-inventory') == 'started' then ['ps-inventory'] = "nui://ps-inventory/html/images/",
return "nui://ps-inventory/html/images/".. QBCore.Shared.Items[img].image ['lj-inventory'] = "nui://lj-inventory/html/images/",
elseif GetResourceState('lj-inventory') == 'started' then ['qb-inventory'] = "nui://qb-inventory/html/images/",
return "nui://lj-inventory/html/images/".. QBCore.Shared.Items[img].image ['qs-inventory'] = "nui://qs-inventory/html/imgages/",
elseif GetResourceState('qb-inventory') == 'started' then ['origen_inventory'] = "nui://origen_inventory/html/img/",
return "nui://qb-inventory/html/images/".. QBCore.Shared.Items[img].image ['core_inventory'] = "nui://core_inventory/html/img/"
elseif GetResourceState('qs-inventory') == 'started' then }
return "nui://qs-inventory/html/img/".. QBCore.Shared.Items[img].image for k, v in pairs(invs) do
elseif GetResourceState('origen_inventory') == 'started' then if not QBCore.Shared.Items[img] then print(' You Are Missing: ' .. img .. ' From Your QB items.lua') return end
return "nui://origen_inventory/html/img/".. QBCore.Shared.Items[img].image if GetResourceState(k) == 'started' then
elseif GetResourceState('core_inventory') == 'started' then return v .. QBCore.Shared.Items[img].image
return "nui://core_inventory/html/img/".. QBCore.Shared.Items[img].image end
end end
end end
function GetLabel(label) function GetLabel(label)
if GetResourceState('ox_inventory') == 'started' then if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items() local Items = exports['ox_inventory']:Items()
if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end
return Items[label]['label'] return Items[label]['label']
else else
if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end
return QBCore.Shared.Items[label]['label'] return QBCore.Shared.Items[label]['label']
end end
end end
function GetRep()
local rep = lib.callback.await('md-drugs:server:GetRep', false)
return rep
end
function sorter(sorting, value)
table.sort(sorting, function(a, b) return a[value] < b[value] end)
end
function makeMenu(name, rep)
local menu = {}
local data = lib.callback.await('md-drugs:server:menu', false, name)
for k, v in pairs (data.table) do
local allow = false
if rep == nil then
allow = true
else
if rep.dealerrep >= v.minrep then allow = true end
end
if allow then
menu[#menu + 1] = {
icon = GetImage(v.name),
description = '$'.. v.price,
title = GetLabel(v.name),
onSelect = function()
local settext = "Cost: $"..v.price
local dialog = exports.ox_lib:inputDialog(v.name .."!", {
{ type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
})
if not dialog[1] then return end
TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
end,
}
end
end
sorter(menu, 'title')
lib.registerContext({id = data.id, title = data.title, options = menu})
end
function ItemCheck(item) function ItemCheck(item)
local success if GetResourceState('ox_inventory') == 'started' then
if GetResourceState('ox_inventory') == 'started' then if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') end else
else if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
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 return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
if QBCore.Functions.HasItem(item) then success = item return success else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') end end
end end
function hasItem(item)
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false 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 return true else return false end
end
end
function ItemCheckMulti(item)
local need = 0
local has = 0
for k,v in pairs (item) do
need = need + 1
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
else
if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
end
end
if need == has then
return true
else
return false
end
end end
function Email(sender, subject, message) function Email(sender, subject, message)
@@ -141,7 +314,6 @@ function Email(sender, subject, message)
sender = sender, sender = sender,
senderDisplayName = sender, senderDisplayName = sender,
content = message, content = message,
}, 'phoneNumber', receiver) }, 'phoneNumber', receiver)
elseif Config.Phone == 'qs' then elseif Config.Phone == 'qs' then
TriggerServerEvent('qs-smartphone:server:sendNewMail', { TriggerServerEvent('qs-smartphone:server:sendNewMail', {
@@ -157,7 +329,7 @@ function Email(sender, subject, message)
message = message, message = message,
}) })
end end
end end
function PoliceCall(chance) function PoliceCall(chance)
local math = math.random(1,100) local math = math.random(1,100)
@@ -174,15 +346,7 @@ function PoliceCall(chance)
flash = 0, flash = 0,
unique_id = data.unique_id, unique_id = data.unique_id,
sound = 1, sound = 1,
blip = { blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
sprite = 431,
scale = 1.2,
colour = 3,
flashes = false,
text = '420-69 Drug Sale',
time = 5,
radius = 0,
}
}) })
elseif dispatch == 'core' then elseif dispatch == 'core' then
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", { exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
@@ -192,10 +356,19 @@ function PoliceCall(chance)
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'}) exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
elseif dispatch == 'qs' then elseif dispatch == 'qs' then
exports['qs-dispatch']:DrugSale() exports['qs-dispatch']:DrugSale()
elseif dispatch == 'codem' then
local Data = {
type = 'Drug Sale',
header = 'Someone Selling Drugs',
text = 'Hurry up and save the community',
code = '420-69',
}
exports['codem-dispatch']:CustomDispatch(Data)
else else
print('Congrats, You Choose 0 of the options :)') print('Congrats, You Choose 0 of the options :)')
end end
else else
return
end end
end end
@@ -207,9 +380,299 @@ end
function Freeze(entity, toggle, head) function Freeze(entity, toggle, head)
SetEntityInvincible(entity, toggle) SetEntityInvincible(entity, toggle)
SetEntityAsMissionEntity(entity, toggle, toggle) SetEntityAsMissionEntity(entity, toggle, toggle)
FreezeEntityPosition(entity, toggle) FreezeEntityPosition(entity, toggle)
SetEntityHeading(entity, head) SetEntityHeading(entity, head)
SetBlockingOfNonTemporaryEvents(entity, toggle) SetBlockingOfNonTemporaryEvents(entity, toggle)
end end
function tele(coords)
DoScreenFadeOut(500)
Wait(1000)
SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
Wait(1000)
DoScreenFadeIn(500)
end
function AddBoxZoneSingle(name, loc, data)
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name, loc, 1.5, 1.75, {name = name, minZ = loc.z-1,maxZ = loc.z +1},
{ options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = data.data,
canInteract = data.canInteract,
}
},
distance = 2.0
})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
distance = 2.5,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = data.data,
canInteract = data.canInteract,
}
}, })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({
coords = vector3(loc.x, loc.y, loc.z),
distance = 2.5,
interactDst = 2,
id = name,
options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
distance = 2.5,
label = data.label,
data = data.data,
canInteract = data.canInteract,
},
}
})
end
end
function AddBoxZoneMulti(name, table, data)
for k, v in pairs (table) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name .. k, v.loc, 1.5, 1.75, {name = name..k, minZ = v.loc.z-1.50,maxZ = v.loc.z +1.5},
{ options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = k,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
},
distance = 2.5
})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = k,
distance = 2.5,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}, })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({
coords = vector3(v.loc.x, v.loc.y, v.loc.z),
distance = 2.5,
interactDst = 2,
id = name,
options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
distance = 2.5,
label = data.label or "fa-solid fa-eye",
data = k,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
}
})
end
end
end
function AddBoxZoneMultiOptions(name, loc, data)
local options = {}
for k, v in pairs (data) do
table.insert(options, {
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
})
end
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
{ options = options, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = options })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = options})
end
end
function AddSingleModel(model, data, num)
if Config.Target == 'qb' then
exports['qb-target']:AddTargetEntity(model, {options = {
{icon = data.icon or "fa-solid fa-eye", label = data.label, event = data.event or nil, action = data.action or nil, data = num }
}, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addLocalEntity(model, {icon = data.icon, label = data.label, event = data.event or nil, onSelect = data.action or nil, data = num, distance = 2.5 })
elseif Config.Target == 'interact' then
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugs'..model,distance = 2.5,interactDst = 2.5, options = {label = data.label, event = data.event or nil, action = data.action or nil, data = num, distance = 2.5 }})
end
end
function AddMultiModel(model, data, num)
local options = {}
for k, v in pairs (data) do
table.insert(options, {
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
})
end
if Config.Target == 'qb' then
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addLocalEntity(model, options)
elseif Config.Target == 'interact' then
local loc = GetEntityCoords(model)
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugss'..model,distance = 2.5,interactDst = 2.5, options = data})
end
end
local created = false
local heading = 180.0
function StartRay()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
lib.requestModel('v_ret_ml_tablea', 30000)
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
if not created then
created = true
lib.showTextUI([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
else
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
SetEntityHeading(table, heading)
SetEntityCollision(table, false, false)
SetEntityAlpha(table, 100)
end
if IsControlPressed(0, 174) then
heading = heading - 2
end
if IsControlPressed(0, 175) then
heading = heading + 2
end
if IsControlPressed(0, 38) then
lib.hideTextUI()
run = false
DeleteObject(table)
created = false
return endCoords, heading
end
if IsControlPressed(0, 178) then
lib.hideTextUI()
run = false
created = false
DeleteObject(table)
return nil, nil
end
Wait(0)
until run == false
end
function StartRay2()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
lib.requestModel('bkr_prop_coke_press_01aa', 30000)
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
if not created then
created = true
lib.showTextUI([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
else
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
SetEntityHeading(table, heading)
SetEntityCollision(table, false, false)
SetEntityAlpha(table, 100)
end
if IsControlPressed(0, 174) then
heading = heading - 2
end
if IsControlPressed(0, 175) then
heading = heading + 2
end
if IsControlPressed(0, 38) then
lib.hideTextUI()
run = false
DeleteObject(table)
created = false
return endCoords, heading
end
if IsControlPressed(0, 178) then
lib.hideTextUI()
run = false
created = false
DeleteObject(table)
return nil, nil
end
Wait(0)
until run == false
end
CreateThread(function()
LoadModel('prop_plant_01b')
LoadModel('prop_plant_01a')
LoadModel('prop_cactus_03')
LoadModel('prop_weed_01')
TriggerEvent('weed:init')
TriggerEvent('heroin:init')
TriggerEvent('coke:init')
TriggerEvent('Mescaline:init')
TriggerEvent('shrooms:init')
TriggerEvent('weed:init')
end)
lib.callback.register('md-drugs:client:uncuff', function(data)
if not progressbar(data, 4000, 'uncuff') then return end
return true
end)
RegisterCommand('DrugRep', function()
if not Config.TierSystem then return end
local rep = lib.callback.await('md-drugs:server:GetRep', false)
lib.registerContext({
id = 'DrugRep',
title = 'Drug Reputation',
options = {
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
}
})
lib.showContext('DrugRep')
end, false)
+44 -124
View File
@@ -1,64 +1,37 @@
local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
local PoppyPlants = {} local PoppyPlants = {}
local herointable = false local herointable = false
local function loadParticle(dict) local dirty = false
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict) local function createLabKit(coord, head)
end local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
while not HasNamedPtfxAssetLoaded(dict) do SetEntityHeading(heroinlabkit, head)
Wait(0) PlaceObjectOnGroundProperly(heroinlabkit)
end AddMultiModel(heroinlabkit, {
SetPtfxAssetNextCall(dict) {data = heroinlabkit, event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, canInteract = function() if not dirty then return true end end},
end {data = heroinlabkit, event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, canInteract = function() if not dirty then return true end end},
CreateThread(function() {data = heroinlabkit, event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean,canInteract = function() if dirty then return true end end}},heroinlabkit)
local Ped = "g_m_y_famdnf_01" end
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local labkitlocation = Config.buyheroinlabkit local function pickher(loc)
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false) if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
Freeze(heroinkitdealer, true, labkitlocation.w) TriggerServerEvent("heroin:pickupCane", loc)
local options = { end
{ 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) RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc] local v = GlobalState.PoppyPlants[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not PoppyPlants[loc] then if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true) PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(PoppyPlants[loc], true, v.heading) Freeze(PoppyPlants[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], { AddSingleModel(PoppyPlants[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
options = { {
icon = "fas fa-hand",
label = "pick Poppies",
action = function()
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
end
}
},
distance = 2.5
})
end end
end) end)
RegisterNetEvent('heroin:removeCane', function(loc) RegisterNetEvent('heroin:removeCane', function(loc)
if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
PoppyPlants[loc] = nil PoppyPlants[loc] = nil
end) end)
RegisterNetEvent("heroin:init", function() RegisterNetEvent("heroin:init", function()
for k, v in pairs (GlobalState.PoppyPlants) do for k, v in pairs (GlobalState.PoppyPlants) do
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
@@ -66,35 +39,11 @@ RegisterNetEvent("heroin:init", function()
if not v.taken then if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(PoppyPlants[k], true, v.heading) Freeze(PoppyPlants[k], true, v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[k], { AddSingleModel(PoppyPlants[k], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
options = { {
icon = "fas fa-hand",
label = "Pick Poppies",
action = function()
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", k)
end
}
},
distance = 2.5
})
end end
end end
end) end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('prop_plant_01b')
TriggerEvent('heroin:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_plant_01b')
TriggerEvent('heroin:init')
end)
AddEventHandler('onResourceStop', function(resourceName) AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b')) SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
@@ -104,11 +53,7 @@ AddEventHandler('onResourceStart', function(resource)
end end
end end
end end
DeleteObject(heroinlabkit)
DeleteObject(dirtylabkitheroin)
end) end)
---- plant stop end
RegisterNetEvent("md-drugs:client:dryplant", function(data) RegisterNetEvent("md-drugs:client:dryplant", function(data)
if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
@@ -126,70 +71,48 @@ RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
TriggerServerEvent("md-drugs:server:getheroinlabkit") TriggerServerEvent("md-drugs:server:getheroinlabkit")
end) end)
RegisterNetEvent("md-drugs:client:setheroinlabkit") lib.callback.register("md-drugs:client:setheroinlabkit", function()
AddEventHandler("md-drugs:client:setheroinlabkit", function() if herointable then
if herointable then Notify(Lang.Heroin.tableout, 'error')
Notify(Lang.Heroin.tableout, 'error') return false
else
local PedCoords = GetEntityCoords(PlayerPedId())
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
herointable = true
local heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(heroinlabkit)
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 else
exports['qb-target']:AddTargetEntity(heroinlabkit, {options = options}) herointable = true
end local location, head = StartRay()
end if not location then herointable = false return end
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then return end
createLabKit(location, head)
return true, location
end
end) end)
RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data) RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
local PedCoords = GetEntityCoords(PlayerPedId()) local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
if not ItemCheck('emptyvial') then return end if not ItemCheck('emptyvial') then return end
if not minigame(2, 8) then if not minigame() then
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin") TriggerServerEvent("md-drugs:server:failheatingheroin")
DeleteObject(data.data)
Wait(100)
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
loadParticle("core") loadParticle("core")
heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0) SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0) SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
local options = {
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkitheroin,options )
else
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {options = options})
end
return end return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin") TriggerServerEvent("md-drugs:server:heatliquidheroin")
end) end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data) RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
if not ItemCheck('cleaningkit') then return end if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data) local done = lib.callback.await('removeCleaningkit', false)
if done then dirty = false end
end) end)
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data) RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
DeleteObject(data) local location,head = GetEntityCoords(data), GetEntityHeading(data)
herointable = false DeleteObject(data)
Wait(1000) createLabKit(location, head)
TriggerEvent("md-drugs:client:setheroinlabkit")
end) end)
RegisterNetEvent("md-drugs:client:getheroinkitback", function(data) RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
herointable = false herointable = false
@@ -197,11 +120,8 @@ RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
TriggerServerEvent("md-drugs:server:getheroinlabkitback") TriggerServerEvent("md-drugs:server:getheroinlabkitback")
end) end)
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
RegisterNetEvent("md-drugs:client:fillneedle", function(data) if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
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
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillneedle", data.data) TriggerServerEvent("md-drugs:server:fillneedle", data.data)
end) end)
+38 -19
View File
@@ -1,22 +1,41 @@
local QBCore = exports['qb-core']:GetCoreObject() RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
Notify(Lang.Lean.marked, "success")
CreateThread(function() SpawnCarPedChase()
local current = "s_m_m_doctor_01"
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) end)
RegisterNetEvent('md-drugs:client:leancraft', function()
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function() local store = {}
Notify(Lang.Lean.marked, "success") local label = {}
SpawnCarPedChase() local items = lib.callback.await('md-drugs:server:GetRecipe', false,'lean', 'cups')
for k, v in pairs (items) do
label = {}
local item = ''
for m, d in pairs (items[k].take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
for m,d in pairs (items[k].give) do item = m end
store[#store + 1] = {
icon = GetImage(item),
description = table.concat(label, ", "),
title = GetLabel(item),
event = 'md-drugs:client:stirlean',
args = {
item = item,
recipe = 'lean',
num = k,
label = 'Cooking Up ' .. GetLabel(item),
table = 'cups'
}
}
sorter(store, 'title')
lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store})
end
lib.showContext('leanCraft')
end) end)
local busy = false
RegisterNetEvent('md-drugs:client:stirlean', function(data)
if busy then return end
busy = true
if not progressbar(data.label, 4000, 'uncuff') then busy = false return end
TriggerServerEvent('md-drugs:server:finishcup', data)
busy = false
end)
+47 -85
View File
@@ -1,70 +1,55 @@
local QBCore = exports['qb-core']:GetCoreObject()
local tableout = false local tableout = false
local dirtylsd = false
local function createLabKit(coord, head)
local function loadParticle(dict) local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
if not HasNamedPtfxAssetLoaded(dict) then SetEntityHeading(labkit, head)
RequestNamedPtfxAsset(dict) PlaceObjectOnGroundProperly(labkit)
end local options = {
while not HasNamedPtfxAssetLoaded(dict) do { event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit, canInteract = function() if not dirtylsd then return true end end },
Wait(0) { event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit,canInteract = function() if not dirtylsd then return true end end },
end { event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit, canInteract = function() if not dirtylsd then return true end end },
SetPtfxAssetNextCall(dict) { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if not dirtylsd then return true end end },
{icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = labkit,
action = function()
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
local check = lib.callback.await('md-drugs:server:removecleaningkit')
if check then
dirtylsd = false
end
end,
canInteract = function() if dirtylsd then return true end end
}
}
AddMultiModel(labkit, options, labkit)
end end
CreateThread(function()
local Ped = "g_m_y_famdnf_01"
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", function(data) RegisterNetEvent("md-drugs:client:getlysergic", function(data)
if not minigame(2, 8) then return end if not minigame() then return end
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic",data.data) TriggerServerEvent("md-drugs:server:getlysergic",data.data)
end) end)
RegisterNetEvent("md-drugs:client:getdiethylamide", function(data) RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
if not minigame(2, 8) then return end if not minigame() then return end
if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data) TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
end) end)
RegisterNetEvent("md-drugs:client:setlsdlabkit")
AddEventHandler("md-drugs:client:setlsdlabkit", function() lib.callback.register("md-drugs:client:setlsdlabkit", function()
if tableout then if tableout then
Notify(Lang.lsd.tableout, 'error') Notify(Lang.lsd.tableout, 'error')
TriggerServerEvent('md-drugs:server:getlabkitback') return false
else
tableout = true
local PedCoords = GetEntityCoords(PlayerPedId())
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},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(labkit, options)
else else
exports['qb-target']:AddTargetEntity(labkit, {options = options}) tableout = true
end local loc, head = StartRay()
end if not loc then tableout = false return end
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then return end
createLabKit(loc, head)
return true, loc
end
end) end)
RegisterNetEvent("md-drugs:client:getlabkitback", function(data) RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
@@ -75,55 +60,33 @@ RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
end) end)
RegisterNetEvent("md-drugs:client:heatliquid", function(data) RegisterNetEvent("md-drugs:client:heatliquid", function(data)
local PedCoords = GetEntityCoords(PlayerPedId()) local PedCoords, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
dict = "scr_ie_svm_technical2" local dict = "scr_ie_svm_technical2"
if not ItemCheck('lysergic_acid') then return end if not ItemCheck('lysergic_acid') then return end
if not ItemCheck('diethylamide') then return end if not ItemCheck('diethylamide') then return end
if not minigame(2, 8) then if not minigame() then
TriggerServerEvent("md-drugs:server:failheating") dirtylsd = true
DeleteObject(data.data)
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
loadParticle(dict) loadParticle(dict)
exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0) SetParticleFxLoopedAlpha(exitPtfx, 3.0)
local options = { Wait(100)
{ event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit }, AddMultiModel(dirtylabkit, {{event = "md-drugs:client:cleanlabkit", icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit}}, nil )
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkit, options)
else
exports['qb-target']:AddTargetEntity(dirtylabkit, { options = options})
end
return end return end
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid") TriggerServerEvent("md-drugs:server:heatliquid")
end) 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", function(data)
DeleteObject(data)
TriggerEvent("md-drugs:client:setlsdlabkit")
end)
RegisterNetEvent("md-drugs:client:refinequalityacid", function() RegisterNetEvent("md-drugs:client:refinequalityacid", function()
if not ItemCheck('lsd_one_vial') then return end if not ItemCheck('lsd_one_vial') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failrefinequality") return end if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid") TriggerServerEvent("md-drugs:server:refinequalityacid")
end) end)
RegisterNetEvent("md-drugs:client:maketabpaper", function() RegisterNetEvent("md-drugs:client:maketabpaper", function()
if not ItemCheck('tab_paper') then return end if not ItemCheck('tab_paper') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failtabs") return end if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper") TriggerServerEvent("md-drugs:server:maketabpaper")
end) end)
@@ -133,9 +96,8 @@ RegisterNetEvent("md-drugs:client:buytabs", function(data)
TriggerServerEvent("md-drugs:server:gettabpaper", data.data) TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
end) end)
RegisterNetEvent("md-drugs:client:buylabkit", function() RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify('You Have One Idiot', 'error') return end if hasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlabkit") TriggerServerEvent("md-drugs:server:getlabkit")
end) end)
+17 -62
View File
@@ -1,13 +1,9 @@
local QBCore = exports['qb-core']:GetCoreObject()
local Mescaline = {} local Mescaline = {}
function LoadModel(hash) local function pick(loc)
hash = GetHashKey(hash) if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
RequestModel(hash) TriggerServerEvent("Mescaline:pickupCane", loc)
while not HasModelLoaded(hash) do end
Wait(3000)
end
end
RegisterNetEvent('Mescaline:respawnCane', function(loc) RegisterNetEvent('Mescaline:respawnCane', function(loc)
local v = GlobalState.Mescaline[loc] local v = GlobalState.Mescaline[loc]
@@ -15,24 +11,15 @@ RegisterNetEvent('Mescaline:respawnCane', function(loc)
if not Mescaline[loc] then if not Mescaline[loc] then
Mescaline[loc] = CreateObject(hash, v.location, false, true, true) Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(Mescaline[loc], true, v.heading) Freeze(Mescaline[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[loc], { AddSingleModel(Mescaline[loc], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
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
end) end)
RegisterNetEvent('Mescaline:removeCane', function(loc) RegisterNetEvent('Mescaline:removeCane', function(loc)
if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end
Mescaline[loc] = nil Mescaline[loc] = nil
end) end)
RegisterNetEvent("Mescaline:init", function() RegisterNetEvent("Mescaline:init", function()
for k, v in pairs (GlobalState.Mescaline) do for k, v in pairs (GlobalState.Mescaline) do
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
@@ -40,29 +27,12 @@ RegisterNetEvent("Mescaline:init", function()
if not v.taken then if not v.taken then
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(Mescaline[k], true, v.heading) Freeze(Mescaline[k], true, v.heading)
exports['qb-target']:AddTargetEntity(Mescaline[k], { AddSingleModel(Mescaline[k], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick,action = function() pick(k) end}, k)
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
end end
end) end)
AddEventHandler('onResourceStart', function(resource) AddEventHandler('onResourceStop', function(resourceName)
if resource == GetCurrentResourceName() then
LoadModel('prop_cactus_03')
TriggerEvent('Mescaline:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_cactus_03')
TriggerEvent('Mescaline:init')
end)
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03')) SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
for k, v in pairs(Mescaline) do for k, v in pairs(Mescaline) do
@@ -73,43 +43,28 @@ AddEventHandler('onResourceStart', function(resource)
end end
end) end)
RegisterNetEvent("md-drugs:client:drymescaline", function() RegisterNetEvent("md-drugs:client:drymescaline", function()
if not ItemCheck('cactusbulb') then return end if not ItemCheck('cactusbulb') then return end
if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:drymescaline") TriggerServerEvent("md-drugs:server:drymescaline")
end) end)
RegisterNetEvent("md-drugs:client:takemescaline", function() RegisterNetEvent("md-drugs:client:takemescaline", function()
local chance = math.random(1,100) local chance, chance2 = math.random(1,100), math.random(1,100)
local chance2 = math.random(1,100) local weapon = ''
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
if chance <= Config.Badtrip then if chance <= Config.Badtrip then
AlienEffect() AlienEffect()
clone = ClonePed(PlayerPedId(), false, false, true) local clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone) SetEntityAsMissionEntity(clone)
SetEntityVisible(clone, true)
SetPedRelationshipGroupHash(clone)
SetPedAccuracy(clone)
SetPedArmour(clone)
SetPedCanSwitchWeapon(clone, true)
SetPedFleeAttributes(clone, false) SetPedFleeAttributes(clone, false)
if chance2 <= 99 then GiveWeaponToPed(clone, weapon, 1, false, true)
GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true) TaskCombatPed(clone, PlayerPedId(), 0, 16)
TaskCombatPed(clone, PlayerPedId(), 0, 16) SetPedCombatAttributes(clone, 46, true)
SetPedCombatAttributes(clone, 46, true) Wait(1000 * 30)
Wait(1000 * 30) DeleteEntity(clone)
DeleteEntity(clone)
else
GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
TaskCombatPed(clone, PlayerPedId(), 0, 16)
SetPedCombatAttributes(clone, 46, true)
Wait(1000 * 30)
DeleteEntity(clone)
end
else else
AlienEffect() AlienEffect()
end end
end) end)
+46 -145
View File
@@ -1,10 +1,12 @@
local QBCore = exports['qb-core']:GetCoreObject()
local amonia = nil local amonia = nil
local tray = nil local tray = nil
local heated = nil local heated = nil
local active = nil local active = nil
local function startcook() local function startcook()
if not ItemCheck('empty_weed_bag') then return end
if not ItemCheck('acetone') then return end
if not ItemCheck('ephedrine') then return end
if amonia == nil then if amonia == nil then
active = true active = true
TriggerServerEvent("md-drugs:server:startcook") TriggerServerEvent("md-drugs:server:startcook")
@@ -17,8 +19,8 @@ end
local function dials() local function dials()
if amonia == true then if amonia == true then
if not minigame(2, 8) then if not minigame() then
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true)
ClearPedTasks(PlayerPedId()) ClearPedTasks(PlayerPedId())
amonia = nil amonia = nil
active = nil active = nil
@@ -34,50 +36,21 @@ local function smash()
if tray then if tray then
tray = false tray = false
DeleteObject(trays) DeleteObject(trays)
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) local bucket = CreateObject("bkr_prop_meth_bigbag_03a", vector3(1012.85, -3194.29, -39.2), true, true, true)
SetEntityHeading(bucket, 90.0) Freeze(bucket, true, 90.0)
SmashMeth() SmashMeth()
Wait(100)
local options = { AddSingleModel(bucket,
{ {name = 'bucket',icon = "fa-solid fa-sack-xmark",label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
name = 'bucket', action = function()
icon = 'fa-solid fa-car', active = nil
label = 'Bag Meth', DeleteObject(bucket)
action = function() amonia = nil
DeleteObject(bucket) heated = nil
amonia = nil tray = nil
heated = nil BagMeth()
tray = nil TriggerServerEvent('md-drugs:server:getmeth')
active = nil end,}, bucket)
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
end end
@@ -109,109 +82,39 @@ CreateThread(function()
end) end)
CreateThread(function() CreateThread(function()
exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { name = "methteleout", heading = 11.0, debugPoly = false, minZ = Config.MethTeleIn.z - 2, maxZ = Config.MethTeleIn.z + 2,}, { local config = lib.callback.await('md-drugs:server:getLocs', false)
options = { AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
{name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end}, AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
}, local options = {
distance = 2.5 { name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
})
exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, {name = "methtelein",heading = 11.0,debugPoly = false,minZ = Config.MethTeleOut.z - 2,maxZ = Config.MethTeleOut.z + 2,}, {
options = {
{ name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end },
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { name = "maze", heading = 11.0, debugPoly = false, minZ = 44 - 2, maxZ = 44 + 2, }, {
options = {
{ name = 'die', icon = "fas fa-sign-in-alt", label = "dont click this", action = function() SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93)) end},
},
distance = 2.5
})
local itemreqcook = { "ephedrine", "acetone" }
exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75,{ name = "ingridientsmeth", heading = 11.0, debugPoly = false, minZ = -39 - 2, maxZ = -39 + 2,}, {
options = {
{ name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", item = itemreqcook, action = function() startcook() end,
canInteract = function() canInteract = function()
if amonia == nil and active == nil then if amonia == nil and active == nil then
return true return true
end end
end, end,
},
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 5, action = function() trayscarry() end,
canInteract = function()
if heated and amonia and tray == nil then return true end
end,
},
}, },
distance = 2.5 { name = 'grabtray', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.tray, distance = 2.5, action = function() trayscarry() end,
}) canInteract = function()
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,}, { if heated and amonia and tray == nil then return true end
options = { end,
{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,}, { AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options )
options = { AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fa-solid fa-weight-scale",label = Lang.targets.meth.box,action = function() smash()end,
{ name = 'adjustdials', icon = "fas fa-sign-in-alt", label = "Adjust Dials", distance = 5, action = function() dials() end, canInteract = function()
canInteract = function() if tray then return true end
if amonia and heated == nil then return true end end end})
}, AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fa-solid fa-temperature-three-quarters", label = Lang.targets.meth.adjust,
}, distance = 5, action = function() dials() end,
}) canInteract = function()
if amonia and heated == nil then return true end end
})
if Config.MethHeist == false then if Config.MethHeist == false then
for k, v in pairs (Config.MethEph) do AddBoxZoneMulti('methep', config.MethEph, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end AddBoxZoneMulti('methace', config.Methace, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
exports['qb-target']:AddBoxZone("methep"..k, v.loc, v.l, v.w, { name = "methep"..k, heading = v.rot, minZ = v.loc.z - 1.0, maxZ = v.loc.z + 2.0,}, {
options = {
{icon = "fas fa-sign-in-alt", label = "Steal Ephedrine", event = 'md-drugs:client:stealeph', data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
},
distance = 2.5
})
end
for k, v in pairs (Config.Methace) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
exports['qb-target']:AddBoxZone("methace"..k, v.loc, v.l, v.w, { name = "methace"..k, heading = v.rot, minZ = v.loc.z - 1.0, maxZ = v.loc.z + 2.0,}, {
options = {
{icon = "fas fa-sign-in-alt", label = "Steal Acetone", event = 'md-drugs:client:stealace', data = k,
canInteract = function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
},
distance = 2.5
})
end
end end
end) end)
CreateThread(function()
if Config.MethHeist == false then
else
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.MethHeistStart
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()
end,
},
}
})
end
end)
RegisterNetEvent("md-drugs:client:stealeph", function(data) RegisterNetEvent("md-drugs:client:stealeph", function(data)
if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:geteph", data.data) TriggerServerEvent("md-drugs:server:geteph", data.data)
@@ -220,6 +123,4 @@ end)
RegisterNetEvent("md-drugs:client:stealace", function(data) RegisterNetEvent("md-drugs:client:stealace", function(data)
if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getace", data.data) TriggerServerEvent("md-drugs:server:getace", data.data)
end) end)
+38 -73
View File
@@ -1,74 +1,45 @@
local QBCore = exports['qb-core']:GetCoreObject()
local deliveryBlip = nil
local carryPackage = nil local carryPackage = nil
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
RegisterNetEvent("md-drugs:client:getoxytruck", function() lib.requestModel("burrito3", Config.RequestModelTime)
if TriggerServerEvent('md-drugs:server:payfortruck') then local paid = lib.callback.await('md-drugs:server:payfortruck', false)
end if not paid then return end
end) local loca = lib.callback.await('md-drugs:server:getLocs', false)
local loc = loca.singleSpot.truckspawn
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
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)
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) exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar)) TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
Notify(Lang.oxy.truck, 'success') Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute") TriggerEvent("md-drugs:client:getoxylocationroute")
SetVehicleEngineOn(oxycar, true, true) AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
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) end)
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
RegisterNetEvent("md-drugs:client:getoxylocationroute", function() local loc = config.oxylocations[math.random(#config.oxylocations)]
Wait(100) if loc ~= nil then
local unlucky = math.random(1,100) SetNewWaypoint(loc.x, loc.y)
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] local current = "g_m_y_famdnf_01"
local unluck = math.random(1,100) lib.requestModel(current, Config.RequestModelTime)
if deliveryBlip ~= nil then local oxybuyer = CreatePed(0, current,loc.x,loc.y,loc.z-1, loc.w, false, false)
RemoveBlip(deliveryBlip) Freeze(oxybuyer, true, loc.w)
end repeat
if CurrentLocation ~= nil then Wait(1000)
deliveryBlip = AddBlipForCoord(CurrentLocation) until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x,loc.y,loc.z)) < 5.0
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)
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) PoliceCall(Config.PoliceAlertOxy)
local options = { AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign",
{ type = "client", label = "Talk To Buyer", icon = "fas fa-eye", event = "md-drugs:client:giveoxybox", ped = oxybuyer}, action = function()
} if carryPackage then
if Config.oxtarget then if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
exports.ox_target:addLocalEntity(oxybuyer, options) TriggerServerEvent("md-drugs:server:giveoxybox")
else DeleteEntity(oxybuyer)
exports['qb-target']:AddTargetEntity(oxybuyer, {options = options, distance = 2.0}) DetachEntity(carryPackage, true, true)
end DeleteObject(carryPackage)
carryPackage = nil
else
Notify(Lang.oxy.empty, "error")
end
end}, oxybuyer)
end end
end) end)
@@ -76,21 +47,15 @@ end)
RegisterNetEvent("md-drugs:client:getfromtrunk", function() RegisterNetEvent("md-drugs:client:getfromtrunk", function()
if carryPackage then if carryPackage then
Notify(Lang.oxy.cantcarry, "error") Notify(Lang.oxy.cantcarry, "error")
else else
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@') lib.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) TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
RequestModel("hei_prop_drug_statue_box_big") lib.RequestModel("hei_prop_drug_statue_box_big")
while not HasModelLoaded("hei_prop_drug_statue_box_big") do
Wait(0)
end
local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true) local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true) AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
carryPackage = object carryPackage = object
end end
end) end)
+27
View File
@@ -0,0 +1,27 @@
CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
local num = lib.callback.await('md-drugs:server:GetMerchant', false)
local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01', "prop_cooker_03"}
for k, v in pairs (model) do
lib.requestModel(v, Config.RequestModelTime)
end
local tabdealer = CreatePed(0, 'g_m_y_famdnf_01',config.singleSpot.buylsdlabkit.x,config.singleSpot.buylsdlabkit.y,config.singleSpot.buylsdlabkit.z-1,config.singleSpot.buylsdlabkit.w, false, false)
local heroinkitdealer = CreatePed(0,"g_m_y_famdnf_01",config.singleSpot.buyheroinlabkit.x, config.singleSpot.buyheroinlabkit.y, config.singleSpot.buyheroinlabkit.z-1, config.singleSpot.buyheroinlabkit.w, false, false)
local SyrupLocation = CreatePed(0, 's_m_m_doctor_01', config.singleSpot.SyrupVendor.x,config.singleSpot.SyrupVendor.y,config.singleSpot.SyrupVendor.z-1, config.singleSpot.SyrupVendor.w, false, false)
local WeedGuy = CreatePed(0,'u_m_m_jesus_01',config.singleSpot.WeedSaleman.x,config.singleSpot.WeedSaleman.y,config.singleSpot.WeedSaleman.z-1, config.singleSpot.WeedSaleman.w, false, false)
local methdealer = CreatePed(0, "g_m_y_famdnf_01", config.singleSpot.MethHeistStart.x, config.singleSpot.MethHeistStart.y, config.singleSpot.MethHeistStart.z - 1, false, false)
local travellingmerchant = CreatePed(0, "g_m_y_famdnf_01",num.x,num.y,num.z-1, num.w, false, false)
Freeze(tabdealer, true,config.singleSpot.buylsdlabkit.w)
Freeze(SyrupLocation, true, config.singleSpot.SyrupVendor.w)
Freeze(heroinkitdealer, true, config.singleSpot.buyheroinlabkit.w)
Freeze(WeedGuy, true, config.singleSpot.WeedSaleman.w)
Freeze(methdealer, true, 220.0)
Freeze(travellingmerchant, true, num.w)
AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fa-solid fa-cannabis", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() Notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
AddSingleModel(travellingmerchant, {label = Lang.targets.travel.travel, icon = "fa-solid fa-cart-shopping", action = function() makeMenu('travellingMerchant') lib.showContext('travellingMerchant') end}, nil)
end)
+10 -46
View File
@@ -1,56 +1,20 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:prescriptionpad", function(args) lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then if getJobType() ~= 'ems' then return end
lib.registerContext({ local input = lib.inputDialog('Who To Give A Prescription To?',{
id = 'prescriptionpad', {type = 'select', label = 'Player Name', options = data},
title = "Prescription Pad", {type = 'select', label = 'Prescription', options = op}})
options = { if not input[1] then return end
{title = 'Give Vics', description = 'Give Vics ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'vicodin_prescription'}}, if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
{title = 'Give Madderal', description = 'Give Madderal ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'adderal_prescription'}}, return {who = input[1], what = input[2]}
{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')
else
Notify(Lang.Pharma.notems, "error")
end
end) 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:fillprescription", function(data) RegisterNetEvent("md-drugs:client:fillprescription", function(data)
if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data) TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end) end)
lib.callback.register("md-drugs:client:unbottle", function()
RegisterNetEvent("md-drugs:client:unbottle", function(item)
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
if item.name == 'vicodinbottle' then item = 'vicodin' end return true
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)
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) end)
+14 -32
View File
@@ -1,13 +1,18 @@
local QBCore = exports['qb-core']:GetCoreObject()
local shrooms = {} local shrooms = {}
local function LoadModels(hash)
function LoadModel(hash)
hash = GetHashKey(hash) hash = GetHashKey(hash)
RequestModel(hash) RequestModel(hash)
while not HasModelLoaded(hash) do local timeout = GetGameTimer() + 5000 -- 5-second timeout
Wait(3000) while not HasModelLoaded(hash) and GetGameTimer() < timeout do
Wait(10)
end end
if HasModelLoaded(hash) then return true end
end
local function pick(loc)
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc)
end end
RegisterNetEvent('shrooms:respawnCane', function(loc) RegisterNetEvent('shrooms:respawnCane', function(loc)
@@ -16,20 +21,9 @@ RegisterNetEvent('shrooms:respawnCane', function(loc)
if not shrooms[loc] then if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true) shrooms[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(shrooms[loc], true, v.heading) Freeze(shrooms[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[loc], { AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(loc) end }, loc )
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
end) end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
Wait(3000)
LoadModel('mushroom')
TriggerEvent('shrooms:init')
end
end)
AddEventHandler('onResourceStop', function(resourceName) AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then if GetCurrentResourceName() == resourceName then
@@ -47,30 +41,18 @@ RegisterNetEvent('shrooms:removeCane', function(loc)
shrooms[loc] = nil shrooms[loc] = nil
end) end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() RegisterNetEvent("shrooms:init", function()
Wait(3000)
LoadModel('mushroom')
TriggerEvent('shrooms:init')
end)
RegisterNetEvent("shrooms:init", function()
for k, v in pairs (GlobalState.shrooms) do for k, v in pairs (GlobalState.shrooms) do
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModels(hash) end
if not v.taken then if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(shrooms[k], true, v.heading) Freeze(shrooms[k], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[k], { AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(k) end }, k )
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
end end
end) end)
RegisterNetEvent('md-drugs:client:takeshrooms', function() RegisterNetEvent('md-drugs:client:takeshrooms', function()
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
TriggerEvent("evidence:client:SetStatus", "widepupils", 300) TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
+21 -295
View File
@@ -1,298 +1,24 @@
local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function() CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
if Config.oxtarget then if not config then print('Yo Dawg You Broke Your Locations.lua') return end
coketelein = exports.ox_target:addBoxZone({ coords = Config.CokeTeleIn, size = vec(1,1,3), rotation = 0, debug = false, AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
options = { AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
{name = 'teleout',icon = "fas fa-sign-in-alt",label = "Enter Building",distance = 5, AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
onSelect = function() AddBoxZoneMulti('steallysergic', config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.lys}) -- lsd
DoScreenFadeOut(500) AddBoxZoneMulti('stealdiethylamide', config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.die}) -- lsd
Wait(1000) AddBoxZoneMulti('gettabs', config.gettabs, {event = "md-drugs:client:buytabs", icon = "fa-solid fa-eye-dropper", label = Lang.targets.lsd.buyt}) -- lsd
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z) AddBoxZoneMulti('dryheroin', config.dryplant, {event = "md-drugs:client:dryplant", icon = "fa-solid fa-temperature-full", label = Lang.targets.heroin.dry}) -- heroin
Wait(1000) AddBoxZoneMulti('cutheroin', config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = "fa-solid fa-flask", label = Lang.targets.heroin.cut}) -- heroin
DoScreenFadeIn(500) AddBoxZoneMulti('fillneedle', config.fillneedle, {event = "md-drugs:client:fillneedle", icon = "fa-solid fa-syringe", label = Lang.targets.heroin.fill}) -- heroin
end AddBoxZoneMulti('makecrack', config.makecrack, {event = "md-drugs:client:makecrackone", icon = "fa-solid fa-temperature-high", label = Lang.targets.crack.cook}) -- crack
}, AddBoxZoneMulti('bagcrack', config.bagcrack, {event = "md-drugs:client:bagcrack", icon = "fa-solid fa-weight-scale", label = Lang.targets.crack.bag}) -- crack
}, AddBoxZoneMulti('fillprescription', config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = "fa-solid fa-prescription", label = Lang.targets.pha.fill}) -- pharma
}) AddBoxZoneSingle('payfortruck', config.singleSpot.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = "fa-solid fa-truck-moving", label = Lang.targets.oxy.pay}) -- oxy runs
coketeleout = exports.ox_target:addBoxZone({ coords = Config.CokeTeleOut, size = vec(1,1,3), rotation = 0, debug = false, AddBoxZoneSingle('drymescaline', config.singleSpot.DryOut, {event = "md-drugs:client:drymescaline", icon = "fa-solid fa-temperature-full", label = Lang.targets.mescaline.dry}) -- mescaline
options = { AddBoxZoneMulti('stealisosafrole', config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = "fa-solid fa-vial", label = Lang.targets.xtc.iso}) -- xtc
{name = 'teleout',icon = "fas fa-sign-in-alt",label = "Exit Building",distance = 5, AddBoxZoneMulti('stealmdp2p', config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = "fa-solid fa-vial", label = Lang.targets.xtc.mdp}) -- xtc
onSelect = function() AddBoxZoneMulti('rawxtcloc', config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.raw}) -- xtc
DoScreenFadeOut(500) AddBoxZoneSingle('buypress', config.singleSpot.buypress, {event = "md-drugs:client:buypress", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.xtc.press}) -- xtc
Wait(500) AddBoxZoneMulti('stamp', config.stamp, {event = "md-drugs:client:stampwhite", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.stamp}) -- xtc
SetEntityCoords(PlayerPedId(),Config.CokeTeleIn)
Wait(500)
DoScreenFadeIn(500)
end,
},
},
})
else
exports['qb-target']:AddBoxZone("coketelein",Config.CokeTeleIn,1.5, 1.75, { name = "coketelein",heading = 156.0,debugPoly = false,minZ = Config.CokeTeleIn.z-2,maxZ = Config.CokeTeleIn.z+2,}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Enter Building",
action = function()
DoScreenFadeOut(500)
Wait(500)
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut)
Wait(500)
DoScreenFadeIn(500)
end,
},
},
})
exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, {name = "CokeTeleOut",heading = 156.0,debugPoly = false,minZ = Config.CokeTeleOut.z-2,maxZ = Config.CokeTeleOut.z+2,}, {
options = {
{
name = 'teleout',
icon = "fas fa-sign-in-alt",
label = "Exit Building",
action = function()
DoScreenFadeOut(500)
Wait(500)
SetEntityCoords(PlayerPedId(),Config.CokeTeleIn)
Wait(500)
DoScreenFadeIn(500)
end,
},
},
})
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
},
}
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
end) end)
-61
View File
@@ -1,61 +0,0 @@
local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function()
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.RequestModelTime)
local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)]
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
exports['qb-target']:AddTargetEntity(travellingmerchant, {
options = {
{ label = "Travelling Merchant", icon = "fas fa-eye", action = function() lib.showContext('travellingmerchant') end},
}
})
end
end)
CreateThread(function()
local ShopMenu = {}
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
end)
RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data) local dialog
local price = data.cost
local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price
local max = data.amount
local dialog = exports.ox_lib:inputDialog(data.item .."!", {
{ type = 'select', label = "Payment Type", default = "cash",
options = {
{ value = "cash"},
{ value = "bank"},
}
},
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
})
if data.cost == "Free" then data.cost = 0 end
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost, data.table, data.num )
end)
+138 -358
View File
@@ -1,14 +1,18 @@
local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {} local WeedPlant = {}
local exploded = nil local exploded, drying = false, false
local drying = false
function LoadModel(hash) local function hasJob()
hash = GetHashKey(hash) if Config.Joblock then
RequestModel(hash) if getJobName() == Config.weedjob then
while not HasModelLoaded(hash) do return true else return false end
Wait(3000) else
end return true end
end end
local function pick(loc)
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
end
RegisterNetEvent('weed:respawnCane', function(loc) RegisterNetEvent('weed:respawnCane', function(loc)
local v = GlobalState.WeedPlant[loc] local v = GlobalState.WeedPlant[loc]
@@ -16,26 +20,8 @@ RegisterNetEvent('weed:respawnCane', function(loc)
if not HasModelLoaded(hash) then LoadModel(hash) end if not HasModelLoaded(hash) then LoadModel(hash) end
if not WeedPlant[loc] then if not WeedPlant[loc] then
WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
Freeze(WeedPlant[loc],true, v.heading) Freeze(WeedPlant[loc],true, v.heading)
exports['qb-target']:AddTargetEntity(WeedPlant[loc], { AddSingleModel(WeedPlant[loc], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(loc) end}, loc)
options = {
{
icon = "fas fa-hand",
label = "Pick Weed",
action = function()
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
}
},
distance = 2.5
})
end end
end) end)
@@ -47,45 +33,16 @@ end)
RegisterNetEvent("weed:init", function() RegisterNetEvent("weed:init", function()
for k, v in pairs (GlobalState.WeedPlant) do for k, v in pairs (GlobalState.WeedPlant) do
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end lib.requestModel('prop_weed_01', 1000)
if not v.taken then if not v.taken then
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
Freeze(WeedPlant[k],true, v.heading) print(WeedPlant[k])
exports['qb-target']:AddTargetEntity(WeedPlant[k], { Freeze(WeedPlant[k],true, v.heading)
options = { AddSingleModel(WeedPlant[k], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(k) end}, k)
{
icon = "fas fa-hand",
label = "Pick Weed",
action = function()
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", k)
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
}
},
distance = 2.5
})
end end
end end
end) end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('bkr_prop_weed_lrg_01b')
TriggerEvent('weed:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('bkr_prop_weed_lrg_01b')
TriggerEvent('weed:init')
end)
AddEventHandler('onResourceStop', function(resourceName) AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b')) SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b'))
@@ -98,234 +55,78 @@ AddEventHandler('onResourceStop', function(resourceName)
end) end)
CreateThread(function() CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
AddBoxZoneMulti('weeddry', config.WeedDry, {
name = 'dryweed',
icon = "fas fa-sign-in-alt",
label = Lang.targets.weed.dry,
distance = 1,
action = function()
if not ItemCheck('wetcannabis') then return end
if drying then
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)
Notify(Lang.Weed.wait, "success")
Wait(math.random(1000,5000))
Notify(Lang.Weed.take, "success")
AddSingleModel(weedplant, {
icon = "fa-solid fa-cannabis",
label = Lang.targets.weed.dpick,
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
canInteract = function()
if hasJob() then return true end end
}, nil)
end
end,
canInteract = function()
if hasJob() then return true end end
})
AddBoxZoneSingle('teleinweedout', config.singleSpot.weedTeleout, { name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTelein) end,
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('teleinweedin', config.singleSpot.weedTelein, { name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTeleout) end,
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fa-solid fa-cookie",
canInteract = function() if hasJob() then return true end end
})
for k, v in pairs (Config.WeedDry) do AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
name = 'Oil',
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,}, { icon = "fa-solid fa-oil-can",
options = { label = Lang.targets.weed.oil,
{ action = function()
name = 'dryweed', if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
icon = "fas fa-sign-in-alt", if not minigame() then
label = "Dry Weed", local loc = GetEntityCoords(PlayerPedId())
distance = 1, AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true)
item = "wetcannabis", exploded = true
action = function() Notify(Lang.Weed.stovehot, "error")
if drying then Wait(1000 * 30)
Notify(Lang.Weed.busy, "error") exploded = false
else return end
local loc = GetEntityCoords(PlayerPedId()) if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false) TriggerServerEvent("md-drugs:server:makeoil")
drying = true end,
FreezeEntityPosition(weedplant, true) canInteract = function()
Notify("Wait A little Bit To Dry", "success") if hasJob() and exploded == false then return true end
Wait(math.random(1000,5000)) end,
Notify("Take Down The Weed", "success") })
local options = { local stove = CreateObject("prop_cooker_03",config.singleSpot.MakeButter.x, config.singleSpot.MakeButter.y, config.singleSpot.MakeButter.z-1, true, false)
{ SetEntityHeading(stove, 270.00)
icon = "fas fa-sign-in-alt", FreezeEntityPosition(stove, true)
label = "Pick Up Weed", local stove2 = CreateObject("prop_cooker_03",config.singleSpot.MakeOil.x,config.singleSpot.MakeOil.y, config.singleSpot.MakeOil.z-1, true, false)
action = function() SetEntityHeading(stove2, 90.00)
DeleteEntity(weedplant) FreezeEntityPosition(stove2, true)
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
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, {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)
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
},
})
exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { 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 = 2.0,
action = function()
SetEntityCoords(PlayerPedId(),Config.Telein)
end,
canInteract = function()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
},
})
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()
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
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
{
name = 'makebrownies',
icon = "fas fa-sign-in-alt",
label = "Make Brownies",
item = "cannabutter",
action = function()
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
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
{
name = 'makecookies',
icon = "fas fa-sign-in-alt",
label = "Make Cookies",
item = "cannabutter",
action = function()
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
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
{
name = 'makechocolate',
icon = "fas fa-sign-in-alt",
label = "Make Chocolate",
item = "cannabutter",
action = function()
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
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
{
name = 'makemuffin',
icon = "fas fa-sign-in-alt",
label = "Make Muffin",
item = "cannabutter",
action = function()
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
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true end
else
return true end end,
},
},
})
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()
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
end,
},
},
})
end) end)
CreateThread(function() CreateThread(function()
@@ -334,80 +135,59 @@ CreateThread(function()
BikerWeedFarm.Security.Set(BikerWeedFarm.Security.upgrade) BikerWeedFarm.Security.Set(BikerWeedFarm.Security.upgrade)
BikerWeedFarm.Details.Enable(BikerWeedFarm.Details.chairs, true) BikerWeedFarm.Details.Enable(BikerWeedFarm.Details.chairs, true)
BikerWeedFarm.Details.Enable({BikerWeedFarm.Details.production, BikerWeedFarm.Details.chairs, BikerWeedFarm.Details.drying}, true) BikerWeedFarm.Details.Enable({BikerWeedFarm.Details.production, BikerWeedFarm.Details.chairs, BikerWeedFarm.Details.drying}, true)
BikerWeedFarm.Plant1.Clear(false) BikerWeedFarm.Plant1.Clear(false) BikerWeedFarm.Plant2.Clear(false) BikerWeedFarm.Plant3.Clear(false)
BikerWeedFarm.Plant2.Clear(false) BikerWeedFarm.Plant4.Clear(false) BikerWeedFarm.Plant5.Clear(false) BikerWeedFarm.Plant6.Clear(false)
BikerWeedFarm.Plant3.Clear(false) BikerWeedFarm.Plant7.Clear(false) BikerWeedFarm.Plant8.Clear(false) BikerWeedFarm.Plant9.Clear(false)
BikerWeedFarm.Plant4.Clear(false)
BikerWeedFarm.Plant5.Clear(false)
BikerWeedFarm.Plant6.Clear(false)
BikerWeedFarm.Plant7.Clear(false)
BikerWeedFarm.Plant8.Clear(false)
BikerWeedFarm.Plant9.Clear(false)
RefreshInterior(BikerWeedFarm.interiorId) RefreshInterior(BikerWeedFarm.interiorId)
stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false)
SetEntityHeading(stove, 270.00)
FreezeEntityPosition(stove, true)
stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false)
SetEntityHeading(stove2, 90.00)
FreezeEntityPosition(stove2, true)
end) end)
RegisterNetEvent('md-drugs:client:bluntwraps', function(args)
lib.registerContext({
id = 'bluntroll',
title = 'Blunt Types',
menu = 'bluntroll',
options = {
{ title = 'Roll Blunt', description = 'Roll A Regular Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollblunt'},
{ title = 'Dip Blunt Wrap In Lean', description = 'Roll A Lean Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollleanblunt'},
{ title = 'Dip Blunt Wrap In Dextro', description = 'Roll A Dextro Blunt', icon = 'check', serverEvent = 'md-drugs:server:rolldextroblunt'},
{ title = 'Roll A Chewy Blunt', description = 'Roll A Chewy Blunt', icon = 'check', serverEvent = 'md-drugs:server:rollchewyblunt'},
},
})
lib.showContext('bluntroll')
end)
RegisterNetEvent("md-drugs:client:rollanim", function()
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() RegisterNetEvent("md-drugs:client:dodabs", function()
if not progressbar('Doing Dabs', 4000, 'bong2') then return end if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect() AlienEffect()
end) end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
local options = {}
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed',tableName)
for k, v in pairs(items) do
local label = {}
local item = ''
for m, d in pairs(v.take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
for m, d in pairs(v.give) do item = m end
options[#options + 1] = {
icon = GetImage(item),
description = table.concat(label, ", "),
title = GetLabel(item),
event = "md-drugs:client:MakeWeedItems",
args = {
item = item,
recipe = 'weed',
num = k,
label = eventLabelPrefix .. GetLabel(item),
table = tableName
}
}
end
sorter(options, 'title')
lib.registerContext({ id = contextId, title = contextTitle, options = options})
end
CreateThread(function() CreateThread(function()
local WeedShop = {} createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
local current = "u_m_m_jesus_01" createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
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 = 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,
table = Config.Weed.items,
num = k,
}
}
lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop})
end
end) end)
RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
if not minigame() then return end
if not progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:MakeWeedItems', data)
end)
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
lib.showContext('mddrugsbluntwraps')
end)
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
lib.showContext('mddrugsblunts')
end)
+41 -85
View File
@@ -1,92 +1,48 @@
local QBCore = exports['qb-core']:GetCoreObject()
local miss = false local miss = false
local deliveryBlip = nil
RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify) RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end if not GetCops(Config.PoliceCount) then return end
if miss then if miss then
Notify('Already Called Someone', 'error') Notify(Lang.Wholesale.al, 'error')
else else
TriggerServerEvent('md-drugs:server:RemoveBurner', drug) local loc = drug.location
Notify(notify, 'success') local timer = 0
local unlucky = math.random(1,100) miss = true
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] SetNewWaypoint(loc.x, loc.y)
local timer = 0 lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
miss = true local current = "g_m_y_famdnf_01"
deliveryBlip = AddBlipForCoord(CurrentLocation) local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
SetBlipSprite(deliveryBlip, 1) FreezeEntityPosition(drugdealer, true)
SetBlipDisplay(deliveryBlip, 2) SetEntityInvincible(drugdealer, true)
SetBlipScale(deliveryBlip, 1.0) AddMultiModel(drugdealer, {{
SetBlipAsShortRange(deliveryBlip, false) label = Lang.targets.Wholesale.talk,
SetBlipColour(deliveryBlip, 27) icon = "fas fa-eye",
BeginTextCommandSetBlipName("STRING") action = function()
AddTextComponentSubstringPlayerName("drug Meet") local luck = math.random(1,100)
EndTextCommandSetBlipName(deliveryBlip) if luck <= Config.SuccessfulChance then
SetBlipRoute(deliveryBlip, true) if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
repeat TriggerServerEvent("md-drugs:server:SuccessSale", drug)
Wait(1000) else
timer = timer + 1 progressbar("YOU FUCKED NOW", 4000, 'uncuff')
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1 SetUpPeds()
PoliceCall(Config.AlertPoliceWholesale) end
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 then Wait(3000)
timer = 0 DeleteEntity(drugdealer)
RemoveBlip(deliveryBlip) miss = false
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime) end
local current = "g_m_y_famdnf_01" }},drugdealer )
local drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false) repeat
FreezeEntityPosition(drugdealer, true) Wait(1000)
SetEntityInvincible(drugdealer, true) timer = timer + 1
exports['qb-target']:AddTargetEntity(drugdealer, { until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
options = { PoliceCall(Config.AlertPoliceWholesale)
{ if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
type = "client", timer = 0
label = "Talk To Buyer", else
icon = "fas fa-eye", Notify('The Buyer Waited To Long', 'error')
action = function() DeleteEntity(drugdealer)
local luck = math.random(1,100) end
local ped = GetEntityCoords(PlayerPedId())
if luck <= Config.SuccessfulChance then
TriggerEvent("md-drugs:client:SuccessSale", drug)
Wait(4000)
DeleteEntity(drugdealer)
else
TriggerEvent("md-drugs:client:SetUp")
Wait(3000)
SetUpPeds()
Wait(4000)
DeleteEntity(drugdealer)
end
miss = false
end,
},
},
distance = 2.0
})
else
Notify('The Buyer Waited To Long')
RemoveBlip(deliveryBlip)
end end
end
end) end)
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:SetUp", function()
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
end)
+69 -124
View File
@@ -1,126 +1,85 @@
local QBCore = exports['qb-core']:GetCoreObject()
local xtcpress = false local xtcpress = false
RegisterNetEvent("md-drugs:client:setpress", function(type) RegisterNetEvent("md-drugs:client:setpress", function(type)
if xtcpress then if xtcpress then
Notify(Lang.xtc.out, 'error') Notify(Lang.xtc.out, 'error')
else else
local PedCoords = GetEntityCoords(PlayerPedId()) local coords, head = StartRay2()
xtcpress = true xtcpress = true
progressbar('Setting Press On The Ground', 4000, 'uncuff') progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press) PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = { local options = {
{ { icon = "fas fa-eye", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
icon = "fas fa-eye", canInteract = function() if xtcpress then return true end end
label = "Make XTC",
action = function()
TriggerEvent("md-drugs:client:XTCMenu", type)
end,
canInteract = function()
if xtcpress then return true end end
}, },
{ {icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
icon = "fas fa-eye", canInteract = function() if xtcpress then return true end end
label = "Pick Up",
action = function()
TriggerEvent("md-drugs:client:GetPressBack", type, press)
end,
canInteract = function()
if xtcpress then return true end end
}, },
} }
local optionsox = { AddMultiModel(press, options, nil)
{
icon = "fas fa-eye",
label = "Make XTC",
onSelect = function()
TriggerEvent("md-drugs:client:XTCMenu", type)
end,
canInteract = function()
if xtcpress then return true end end
},
{
icon = "fas fa-eye",
label = "Pick Up",
onSelect = function()
TriggerEvent("md-drugs:client:GetPressBack", type, press)
end,
canInteract = function()
if xtcpress then return true end end
},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(press, optionsox)
else
exports['qb-target']:AddTargetEntity(press, { options = options})
end
end end
end) end)
lib.callback.register('md-drugs:client:setpress', function(type)
if xtcpress then
Notify(Lang.xtc.out, 'error')
return false
else
local coords, head = StartRay2()
xtcpress = true
progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = {
{ icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
canInteract = function() if xtcpress then return true end end
},
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
canInteract = function() if xtcpress then return true end end
},
}
AddMultiModel(press, options, nil)
return true, GetEntityCoords(press)
end
end)
RegisterNetEvent("md-drugs:client:XTCMenu", function(type) RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
local event = "md-drugs:client:MakeXTC"
lib.registerContext({ lib.registerContext({
id = 'XTCmenu', id = 'XTCmenu',
title = 'XTC Menu', title = 'XTC Menu',
options = { options = {
{ {icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
icon = GetImage('white_xtc'), {icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
title = 'White XTC', {icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
description = '1 X Raw XTC', {icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'white'}
},
{
icon = GetImage('red_xtc'),
title = 'Red XTC',
description = '1 X Raw XTC and 1 X Loose Coke',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'red'}
},
{
icon = GetImage('orange_xtc'),
title = 'Orange XTC',
description = '1 X Raw XTC and 1 X Heroin Vial',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'orange'}
},
{
icon = GetImage('blue_xtc'),
title = 'Blue XTC',
description = '1 X Raw XTC and 1 X Crack Rock',
event = "md-drugs:client:MakeXTC",
args = { data = type, color = 'blue'}
},
} }
}) })
lib.showContext('XTCmenu') lib.showContext('XTCmenu')
end) end)
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press) RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
if not progressbar('Packing Up The Press', 5000, 'uncuff') then return end if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
DeleteObject(press) DeleteObject(press)
xtcpress = false xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback", type) TriggerServerEvent("md-drugs:server:getpressback", type)
end) end)
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data) RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data) TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
end) end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data) RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data) TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end) end)
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data) RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
if not ItemCheck('isosafrole') then return end if not ItemCheck('isosafrole') then return end
if not ItemCheck('mdp2p') then return end if not ItemCheck('mdp2p') then return end
@@ -134,78 +93,64 @@ RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
TriggerServerEvent("md-drugs:server:makextc",data) TriggerServerEvent("md-drugs:server:makextc",data)
end) end)
------------------------------------------------------------------ Stamping
RegisterNetEvent("md-drugs:client:stampwhite", function(data) RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.registerContext({ lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
id = 'stampxtc',
title = 'Stamp XTC Menu',
options = { options = {
{ { icon = GetImage('white_xtc'), title = 'White XTC',
icon = GetImage('white_xtc'),
title = 'White XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping White Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampwhite",data.data) TriggerServerEvent("md-drugs:server:stampwhite",data.data)
end end
}, },
{ { icon = GetImage('red_xtc'), title = 'Red XTC',
icon = GetImage('red_xtc'),
title = 'Red XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Red Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampred", data.data) TriggerServerEvent("md-drugs:server:stampred", data.data)
end end
}, },
{ { icon = GetImage('orange_xtc'), title = 'Orange XTC',
icon = GetImage('orange_xtc'),
title = 'Orange XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Orange Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamporange", data.data) TriggerServerEvent("md-drugs:server:stamporange", data.data)
end, end,
}, },
{ { icon = GetImage('blue_xtc'), title = 'Blue XTC',
icon = GetImage('blue_xtc'),
title = 'Blue XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Blue Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampblue", data.data) TriggerServerEvent("md-drugs:server:stampblue", data.data)
end end
}, },
} }
}) })
lib.showContext('stampxtc') lib.showContext('stampxtc')
end) end)
RegisterNetEvent("md-drugs:client:getsinglepress", function() RegisterNetEvent("md-drugs:client:getsinglepress", function()
if not progressbar('Buying Press', 4000, 'uncuff') then return end if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:buypress") TriggerServerEvent("md-drugs:server:buypress")
end) end)
RegisterNetEvent("md-drugs:client:exchangepresses", function(data) RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
if not progressbar('Buying Press', 4000, 'uncuff') then return end if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:upgradepress", data.data) TriggerServerEvent("md-drugs:server:upgradepress", data.data)
end) end)
RegisterNetEvent("md-drugs:client:buypress", function() RegisterNetEvent("md-drugs:client:buypress", function()
local img = GetImage('singlepress'), local img = GetImage('singlepress')
lib.registerContext({ lib.registerContext({
id = 'buypresses', id = 'buypresses',
title = 'Purchase Presses', title = 'Purchase Presses',
options = { options = {
{ title = 'Single Press', description = 'Buy a single press for 20k', icon = img, event = 'md-drugs:client:getsinglepress'}, {title = Lang.xtc.press.title.single, description = Lang.xtc.press.des.single, icon = img, event = 'md-drugs:client:getsinglepress'},
{ title = 'Exchange Single For Dual', description = '20 of each unstamped single stack pill and your single press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}}, {title = Lang.xtc.press.title.dual, description = Lang.xtc.press.des.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
{ title = 'Exchange Dual For Triple', description = '50 of each unstamped dual stack pill and your dual press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}}, {title = Lang.xtc.press.title.triple, description = Lang.xtc.press.des.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
{ title = 'Exchange Triple For Quad', description = '150 of each unstamped Triple stack pill and your triple press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}} {title = Lang.xtc.press.title.quad, description = Lang.xtc.press.des.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
} }
}) })
lib.showContext('buypresses') lib.showContext('buypresses')
end) end)
+6 -10
View File
@@ -3,32 +3,28 @@ author "mustache_dom"
description "drugs by mustache dom" description "drugs by mustache dom"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"
version '3.5.9' version '3.9.0'
client_scripts { client_scripts {
'client/**.lua', 'client/**.lua',
'@PolyZone/client.lua',
'@PolyZone/CircleZone.lua',
} }
server_scripts { server_scripts {
'server/**.lua', 'server/functions.lua',
'server/**.lua',
'@oxmysql/lib/MySQL.lua', '@oxmysql/lib/MySQL.lua',
} }
shared_scripts { shared_scripts {
'shared/config.lua',
'@ox_lib/init.lua', '@ox_lib/init.lua',
'shared/**.lua', 'shared/**.lua',
} }
lua54 'yes' lua54 'yes'
dependency 'bob74_ipl'
files { files {
'stream/mushroom.ytyp' 'stream/mushroom.ytyp',
'stream/mushroom.ydr'
} }
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp' data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
@@ -1,8 +1,9 @@
--md-drugs copy and paste below items to ox_inventory/data/items.lua --md-drugs copy and paste below items to ox_inventory/data/items.lua
```
["coke"] = { ["coke"] = {
label = "Raw Cocaine", label = "Raw Cocaine",
weight = 1000, weight = 1000,
stack = false, stack =true,
close = false, close = false,
description = "Raw Cocaine", description = "Raw Cocaine",
client = { client = {
@@ -12,7 +13,7 @@
["cokebaggy"] = { ["cokebaggy"] = {
label = "Bag Of Cocaine", label = "Bag Of Cocaine",
weight = 1000, weight = 1000,
stack = false, stack =true,
close = false, close = false,
description = "A Small Bag Of Weak Cocaine", description = "A Small Bag Of Weak Cocaine",
client = { client = {
@@ -22,7 +23,7 @@
["empty_weed_bag"] = { ["empty_weed_bag"] = {
label = "Empty Bag", label = "Empty Bag",
weight = 1000, weight = 1000,
stack = false, stack =true,
close = false, close = false,
description = "Empty Bag To Put Product In", description = "Empty Bag To Put Product In",
client = { client = {
@@ -32,7 +33,7 @@
["coca_leaf"] = { ["coca_leaf"] = {
label = "Cocaine leaves", label = "Cocaine leaves",
weight = 1500, weight = 1500,
stack = false, stack =true,
close = false, close = false,
description = "Cocaine leaves that must be processed !", description = "Cocaine leaves that must be processed !",
client = { client = {
@@ -42,7 +43,7 @@
["poppyresin"] = { ["poppyresin"] = {
label = "Poppy resin", label = "Poppy resin",
weight = 2000, weight = 2000,
stack = false, stack =true,
close = false, close = false,
description = "It sticks to your fingers when you handle it.", description = "It sticks to your fingers when you handle it.",
client = { client = {
@@ -52,7 +53,7 @@
["heroin"] = { ["heroin"] = {
label = "Weak Heroin Powder", label = "Weak Heroin Powder",
weight = 500, weight = 500,
stack = false, stack =true,
close = true, close = true,
description = "Dragon Chasin?", description = "Dragon Chasin?",
client = { client = {
@@ -62,7 +63,7 @@
["bakingsoda"] = { ["bakingsoda"] = {
label = "Baking Soda", label = "Baking Soda",
weight = 300, weight = 300,
stack = false, stack =true,
close = false, close = false,
description = "Household Baking Soda!", description = "Household Baking Soda!",
client = { client = {
@@ -72,7 +73,7 @@
["loosecoke"] = { ["loosecoke"] = {
label = "Loose Coke", label = "Loose Coke",
weight = 100, weight = 100,
stack = false, stack =true,
close = true, close = true,
description = "Cut Cocaine", description = "Cut Cocaine",
client = { client = {
@@ -82,7 +83,7 @@
["loosecokestagetwo"] = { ["loosecokestagetwo"] = {
label = "More Pure Loose Coke", label = "More Pure Loose Coke",
weight = 100, weight = 100,
stack = false, stack =true,
close = true, close = true,
description = "Cut Cocaine", description = "Cut Cocaine",
client = { client = {
@@ -92,7 +93,7 @@
["loosecokestagethree"] = { ["loosecokestagethree"] = {
label = "Purest Loose Coke", label = "Purest Loose Coke",
weight = 100, weight = 100,
stack = false, stack =true,
close = true, close = true,
description = "Cut Cocaine", description = "Cut Cocaine",
client = { client = {
@@ -122,7 +123,7 @@
["cokestagetwo"] = { ["cokestagetwo"] = {
label = "Better Raw Cocaine", label = "Better Raw Cocaine",
weight = 100, weight = 100,
stack = false, stack =true,
close = false, close = false,
description = "Raw cocaine", description = "Raw cocaine",
client = { client = {
@@ -132,7 +133,7 @@
["cokestagethree"] = { ["cokestagethree"] = {
label = "Best Raw Cocaine", label = "Best Raw Cocaine",
weight = 100, weight = 100,
stack = false, stack =true,
close = false, close = false,
description = "Raw cocaine", description = "Raw cocaine",
client = { client = {
@@ -362,7 +363,7 @@
["heroinstagetwo"] = { ["heroinstagetwo"] = {
label = "Better Heroin", label = "Better Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Raw Heroin", description = "Raw Heroin",
client = { client = {
@@ -372,7 +373,7 @@
["heroinstagethree"] = { ["heroinstagethree"] = {
label = "Best Heroin", label = "Best Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Raw Heroin", description = "Raw Heroin",
client = { client = {
@@ -382,7 +383,7 @@
["heroincut"] = { ["heroincut"] = {
label = "Cut Heroin", label = "Cut Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Cut Heroin", description = "Cut Heroin",
client = { client = {
@@ -392,7 +393,7 @@
["heroincutstagetwo"] = { ["heroincutstagetwo"] = {
label = "Better Cut Heroin", label = "Better Cut Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Cut Heroin", description = "Cut Heroin",
client = { client = {
@@ -402,7 +403,7 @@
["heroincutstagethree"] = { ["heroincutstagethree"] = {
label = "Best Cut Heroin", label = "Best Cut Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Cut Heroin", description = "Cut Heroin",
client = { client = {
@@ -412,7 +413,7 @@
["heroinlabkit"] = { ["heroinlabkit"] = {
label = "Heroin Lab Kit", label = "Heroin Lab Kit",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "How Can A Big Ass Table Fit In One Slot", description = "How Can A Big Ass Table Fit In One Slot",
client = { client = {
@@ -422,7 +423,7 @@
["heroinvial"] = { ["heroinvial"] = {
label = "Vial Of Heroin", label = "Vial Of Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Hmm, Maybe A Needle Can Help", description = "Hmm, Maybe A Needle Can Help",
client = { client = {
@@ -432,7 +433,7 @@
["heroinvialstagetwo"] = { ["heroinvialstagetwo"] = {
label = "Better Vial of Heroin", label = "Better Vial of Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Hmm, Maybe A Needle Can Help", description = "Hmm, Maybe A Needle Can Help",
client = { client = {
@@ -442,7 +443,7 @@
["heroinvialstagethree"] = { ["heroinvialstagethree"] = {
label = "Best Vial Of Heroin", label = "Best Vial Of Heroin",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Hmm, Maybe A Needle Can Help", description = "Hmm, Maybe A Needle Can Help",
client = { client = {
@@ -492,7 +493,7 @@
["needle"] = { ["needle"] = {
label = "Syringe", label = "Syringe",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "I Swear Officer, Its For Diabetes", description = "I Swear Officer, Its For Diabetes",
client = { client = {
@@ -502,7 +503,7 @@
["crackrock"] = { ["crackrock"] = {
label = "Crack Rock", label = "Crack Rock",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "This Isnt The Rock The Hippie Girl Told Me About", description = "This Isnt The Rock The Hippie Girl Told Me About",
client = { client = {
@@ -512,7 +513,7 @@
["crackrockstagetwo"] = { ["crackrockstagetwo"] = {
label = "Better Crack Rock", label = "Better Crack Rock",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "This Rocks!", description = "This Rocks!",
client = { client = {
@@ -522,7 +523,7 @@
["crackrockstagethree"] = { ["crackrockstagethree"] = {
label = "Best Crack Rock", label = "Best Crack Rock",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "This Rocks!", description = "This Rocks!",
client = { client = {
@@ -582,7 +583,7 @@
["vicodin_prescription"] = { ["vicodin_prescription"] = {
label = "Vicie Prescription", label = "Vicie Prescription",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "If Only This Helped With The Pain inside", description = "If Only This Helped With The Pain inside",
client = { client = {
@@ -592,7 +593,7 @@
["adderal_prescription"] = { ["adderal_prescription"] = {
label = "Mdderal Prescription", label = "Mdderal Prescription",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "I CAN DO EVERYTHING", description = "I CAN DO EVERYTHING",
client = { client = {
@@ -602,7 +603,7 @@
["morphine_prescription"] = { ["morphine_prescription"] = {
label = "Morphin Prescription", label = "Morphin Prescription",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "I Cant Feel Anything", description = "I Cant Feel Anything",
client = { client = {
@@ -612,7 +613,7 @@
["xanax_prescription"] = { ["xanax_prescription"] = {
label = "Zany Prescription", label = "Zany Prescription",
weight = 250, weight = 250,
stack = false, stack =true,
close = false, close = false,
description = "Ahhh Sweet Comfort", description = "Ahhh Sweet Comfort",
client = { client = {
@@ -2157,5 +2158,16 @@
description = "", description = "",
client = { client = {
image = "gta5phone.png", image = "gta5phone.png",
}, }
}, },
["dextrobluntwrap"] = {
label = "Dextro Blunt Wrap",
weight = 100,
stack = true,
close = true,
description = "",
client = {
image = "dextrobluntwrap.png",
}
},
```
@@ -1,4 +1,7 @@
------------------ md-drugs Add the following Items to qb-core/shared/items.lua and - Add item images to your inventory script ------------------
### md-drugs Add the following Items to qb-core/shared/items.lua and - Add item images to your inventory script
```
coke = {name = "coke", label = "Raw Cocaine", weight = 1000, type = "item", image = "coke.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Raw Cocaine"}, coke = {name = "coke", label = "Raw Cocaine", weight = 1000, type = "item", image = "coke.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Raw Cocaine"},
coca_leaf = {name = "coca_leaf", label = "Cocaine leaves", weight = 1500, type = "item", image = "coca_leaf.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Cocaine leaves that must be processed !"}, coca_leaf = {name = "coca_leaf", label = "Cocaine leaves", weight = 1500, type = "item", image = "coca_leaf.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Cocaine leaves that must be processed !"},
poppyresin = {name = "poppyresin", label = "Poppy resin", weight = 2000, type = "item", image = "poppyresin.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "It sticks to your fingers when you handle it."}, poppyresin = {name = "poppyresin", label = "Poppy resin", weight = 2000, type = "item", image = "poppyresin.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "It sticks to your fingers when you handle it."},
@@ -216,7 +219,7 @@
bluntwrap = {name = "bluntwrap", label = "Blunt Wrap", weight = 100, type = "item", image = "bluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, bluntwrap = {name = "bluntwrap", label = "Blunt Wrap", weight = 100, type = "item", image = "bluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
leanbluntwrap = {name = "leanbluntwrap", label = "Lean Blunt Wrap", weight = 100, type = "item", image = "leanbluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, leanbluntwrap = {name = "leanbluntwrap", label = "Lean Blunt Wrap", weight = 100, type = "item", image = "leanbluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
dextroblunt = {name = "dextroblunt", label = "Dextro Blunt Wrap", weight = 100, type = "item", image = "dextroblunt.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, dextroblunt = {name = "dextroblunt", label = "Dextro Blunt Wrap", weight = 100, type = "item", image = "dextroblunt.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
--dextrobluntwrap = {name = "dextrobluntwrap", label = "Dextro Blunt Wrap", weight = 100, type = "item", image = "dextrobluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, dextrobluntwrap = {name = "dextrobluntwrap", label = "Dextro Blunt Wrap", weight = 100, type = "item", image = "dextrobluntwrap.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
leanblunts = {name = "leanblunts", label = "Lean Blunts", weight = 100, type = "item", image = "leanblunts.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, leanblunts = {name = "leanblunts", label = "Lean Blunts", weight = 100, type = "item", image = "leanblunts.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
dextroblunts = {name = "dextroblunts", label = "Dextro Blunts", weight = 100, type = "item", image = "dextroblunts.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, dextroblunts = {name = "dextroblunts", label = "Dextro Blunts", weight = 100, type = "item", image = "dextroblunts.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
chewyblunt = {name = "chewyblunt", label = "Chewy", weight = 100, type = "item", image = "blunt.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, chewyblunt = {name = "chewyblunt", label = "Chewy", weight = 100, type = "item", image = "blunt.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
@@ -224,4 +227,5 @@
leancup = {name = "leancup", label = "Empty Cup", weight = 100, type = "item", image = "leancup.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, leancup = {name = "leancup", label = "Empty Cup", weight = 100, type = "item", image = "leancup.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
cupoflean = {name = "cupoflean", label = "Lean Cup", weight = 100, type = "item", image = "cupoflean.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, cupoflean = {name = "cupoflean", label = "Lean Cup", weight = 100, type = "item", image = "cupoflean.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
cupofdextro = {name = "cupofdextro", label = "Dextro Cup", weight = 100, type = "item", image = "cupofdextro.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, cupofdextro = {name = "cupofdextro", label = "Dextro Cup", weight = 100, type = "item", image = "cupofdextro.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
xtcburner = {name = "xtcburner", label = "XTC Burner", weight = 100, type = "item", image = "gta5phone.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, xtcburner = {name = "xtcburner", label = "XTC Burner", weight = 100, type = "item", image = "gta5phone.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
```
-161
View File
@@ -1,161 +0,0 @@
Lang = {}
Lang.Coke = {
-- شريط تقدم العميل
picking = "جمع الأوراق",
makepow = 'تقطيع الأوراق إلى مسحوق',
-- نهاية شريط التقدم
cut = "قمت بتقطيع بعض الكوكا",
nocutcoke = "لا يمكنك تقطيع الكوكا بدونها، أحمق",
bagcoke = "لقد قمت بتعبئة الكوكا",
nobagcoke = "لا يمكنك تعبئة الكوكا بدونها، أحمق",
}
Lang.Crack = {
-- العميل
cookcrack = "طهي الكراك",
bagcrack = 'تعبئة هذا',
-- الخادم
makecrack = 'كراك جيد',
nocoke = 'لا يمكنك صنع هذا بدون الكوكا'
}
Lang.Cornerselling = {
-- إشعارات العميل
toofar = "بعيد جدًا عن زاويتك، صديقي",
inacar = "لا يمكنك البيع أثناء الجلوس في السيارة",
deny = "إلى الجحيم بهذا العرض",
start = "احصل على تلك الأموال",
stop = "لا يمكن للشخص الكسول حتى بيع المخدرات",
nodrugs = "ماذا ستبيع؟ هواء؟",
notcops = "لا يوجد عدد كاف من رجال الشرطة",
-- نهاية إشعارات العميل
-- شريط التقدم
sell = "بيع المخدرات",
}
Lang.Delivery = {
-- العميل
search = "البحث عن توصيل ...",
none = "لا شيء قريب",
busy = "لم تنه أيضًا الذي قلت لك أن تنهيه",
found = "محدد على خريطتك",
already = "بالفعل توصيل",
checkrep = "سمعة البائع الحالية: ",
-- شريط التقدم
pack = 'تسليم الحزمة',
-- نهاية العميل
}
Lang.Heroin = {
-- العميل
pick = "جمع الأفيون",
tableout = 'لديك بالفعل طاولة معدة',
dryout = "تجفيف الأفيون",
cutting = "تقطيع الهيروين مع الصودا الخبز",
secret = "ششششش",
table = "وضع الطاولة",
success = "تسخين الهيروين بشكل جيد",
clean = 'تنظيف طاولة الهيروين',
needles = 'ملء الحقنة',
-- تعيين سيناريو الشخصيات المتوقع إرجاعها بالأمر التالي
cutheroin = 'قمت بتحضير بعض الهيروين المقطوع',
noheroin = "كيف يمكنك تقطيع الهيروين بدونه، أحمق",
vial = 'قمت بصنع قارورة هيروين',
novial = "كيف يمكنك صنع قوارير هيروين بدونه، أحمق",
fail = 'لقد سخنتهم كثيرًا، أحمق',
fill = 'تم ملء الحقنة',
nofill = 'كيف ستملأ الإبر بالهيروين بدونه'
}
Lang.Lean = {
marked = 'تم وضع علامة على السيارة على خريطتك',
lean = 'لقد حصلت على Lean الأرجواني',
dextro = 'لقد حصلت على ديكسترو أحمر'
}
Lang.lsd = {
steallys = 'سرقة حمض الليزرجيك',
stealdie = 'سرقة حمض الليزرجيك',
tableout = 'لديك بالفعل طاولة معدة',
tablepack = 'تعبئة الطاولة',
heat = 'تسخين السوائل',
clean = 'تنظيف الطاولة',
refine = 'تنقية الجودة',
dip = 'تغميس حمض الليزرجيك في الورق',
buypaper = 'شراء ورق التبن',
buykit = 'شراء مجموعة مختبر',
-- الخادم
lys = 'لقد حصلت على حمض الليزرجيك',
die = 'لقد حصلت على الديثيلاميد',
cleaned = 'لقد قمت بتنظيفه بشكل مثالي',
madelsd = 'لقد صنعت الإل إس دي!',
failed = 'لقد سخنتهم كثيرًا، أحمق',
refined = 'لقد قمت بتنقيتهم!',
broke = 'لا يمكنك تحمل هذا الآن!',
novial = 'لا يوجد قوارير إل إس دي، أحمق',
}
Lang.mescaline = {
pick = "جمع الصبار",
dry = 'تجفيف الصبار',
nocactus = 'لا توجد بصيلات صبار'
}
Lang.meth = {
inside = 'يوجد بالفعل شيء في الداخل',
increaseheat = 'زيادة الحرارة',
mission = 'تم وضع علامة على السيارة على خريطتك',
ace = 'لقد حصلت على بعض الأستون',
eph = 'لقد حصلت على بعض الإيفيدرين',
mix = 'إضافة أشياء إلى الخليط',
nobag = 'لا توجد حقائب'
}
Lang.oxy = {
truck = 'سيارتك هنا',
cantcarry = 'أنت لست قويًا لهذا، يمكنك حمل واحد فقط',
hand = 'تسليم الأكسيجين',
empty = 'لا يمكنك أن تكون بلا شيء في يدك، أحمق',
broke = 'لا يمكنك تحمل هذا المبلغ!',
hot = 'السيارة ساخنة، ارمها الآن',
next = 'انتقل إلى الموقع التالي'
}
Lang.Pharma = {
notems = 'أنت لست شخصًا طبيًا',
write = 'كتابة الوصفة الطبية',
fill = 'ملء الوصفة الطبية',
open = 'فتح الزجاجة',
pills = 'لقد حصلت على بعض الحبوب!',
no = 'ليس لديك وصفة طبية'
}
Lang.Shrooms = {
pick = 'جمع الفطر',
eat = 'أكل الفطر',
trip = 'رحلة ممتعة!'
}
Lang.Weed = {
pick = 'حصاد الحشيش',
busy = 'بالفعل تجفيف واحد',
canna = 'صنع زبدة الكانابينويد',
brown = 'صنع براونيز خاصة',
cook = 'صنع كوكيز خاصة',
Choc = 'صنع شوكولاتة خاصة',
muff = 'صنع مافن خاصة',
stovehot = 'الموقد ساخن جدًا، انتظر 30 ثانية ليبرد',
shat = 'صنع شاتر',
roll = 'لف السجائر',
--
nodry = 'تحتاج إلى حشيش رطب لتجفيفه',
noweed = 'لا يمكنك لف السجائر بالهواء',
noshat = 'تحتاج إلى شاتر للقيام بـ Dab',
notorch = 'تحتاج إلى شعلة بوتان'
}
Lang.xtc = {
out = 'لديك بالفعل ماكينة برس جاهزة',
pressing = 'ضغط الحبوب',
raw = 'صنع XTC خام',
mdp2p = 'سرقة MDP2P',
iso = 'سرقة إيزوسافرول',
fail = 'رفيق، إنه دائرة ليست علم صواريخ',
--
cash = 'أحتاج 20 ألف نقدًا'
}
-167
View File
@@ -1,167 +0,0 @@
Lang = {}
Lang.Coke = {
-- klient side progressbarer
picking = "Plukker Blade",
makepow = 'Hakker Blade Til Pulver',
cutting = 'Blander Kokain Med Bagepulver',
bagging = "Pakker Denne Lort",
-- slut progressbarer
cut = "Du Har Skåret Noget Kokain",
nocutcoke = "Du Kan Ikke Skære Kokain Uden Kokain, Idiot",
bagcoke = "Du Har Pakket Kokain",
nobagcoke = "Du Kan Ikke Pakke Kokain Uden Kokain, Idiot",
}
Lang.Crack = {
--klient side
cookcrack = "Koger Noget Crack",
bagcrack = 'Pakker Denne Lort',
-- server
makecrack = 'Godt Crack',
nocoke = 'Du Kan Ikke Lave Dette Uden Kokain'
}
Lang.Cornerselling = {
-- klient side beskeder
toofar = "For Langt Væk Fra Dit Hjørne, Homie",
inacar = "Du Kan Ikke Sælge Mens Du Er I En Bil",
deny = "Fuck Det Tilbud",
start = "Tjen De Penge",
stop = "Doven Røv Kan Ikke Engang Sælge Stoffer",
nodrugs = "Hvad Vil Du Sælge? Luft?",
notcops = "Ikke Nok Betjente",
-- slut klient side beskeder
-- progressbarer
sell = "Sælger Stoffer",
}
Lang.Delivery = {
-- klient side
search = "Søger Efter En Levering ...",
none = "Intet I Nærheden",
busy = "Du Har Ikke Engang Færdiggjort Den Jeg Sagde Til Dig",
found = "Markeret På Dit Kort",
already = "Allerede Levering",
checkrep = "Nuværende Forhandler Repræsentation: ",
-- progressbarer
pack = 'Overrækker Pakke',
-- slut klient side
}
Lang.Heroin = {
--klient
pick = "Plukker Valmuer",
tableout = 'Du Har Allerede Et Bord Ude',
dryout = "Tørrer Valmuer",
cutting = "Blander Heroin Med Bagepulver",
secret = "SHHHHHHHHH",
table = "Sætter Bord Ned",
success = "Opvarmede Heroin Rigtigt",
clean = 'Rengør Heroin Bord',
needles = 'Fylder Sprøjte',
pickup = 'Tager Heroin Bord Op',
--
cutheroin = 'Du Lavede Noget Blandingsheroin',
noheroin = "Hvordan Kan Du Skære Heroin Uden Heroin, Idiot",
vial = 'Du Lavede Et Vial Med Heroin',
novial = "Hvordan Kan Du Lave Heroin Vialer Uden Heroin, Idiot",
fail = 'Du Overophedede Dem, Idiot',
fill = 'Fyldte Sprøjten',
nofill = 'Hvordan Vil Du Fylde Sprøjter Med Heroin Uden Heroin'
}
Lang.Lean = {
marked = 'Bil Er Markeret På Dit Kort',
lean = 'Du Har Purple Lean',
dextro = 'Du Har Rød Dextro'
}
Lang.lsd = {
steallys = 'Stjæler Lyserginsyre',
stealdie = 'Stjæler Lyserginsyre',
tableout = 'Du Har Allerede Et Bord Ude',
tablepack = 'Pakker Bord',
heat = 'Opvarmer Væsker',
clean = 'Rengør Bordet',
refine = 'Forfiner Kvaliteten',
dip = 'Dypper LSD På Papir',
buypaper = 'Køber Tab Papir',
buykit = 'Køber Lab Kit',
place = 'Sætter Bord Ned',
-- server
lys = 'Du Har Lyserginsyre',
die = 'Du Har Diethylamid',
cleaned = 'Du Rengjorde Det Perfekt',
madelsd = 'Du Lavede LSD!',
failed = 'Du Overophedede Dem, Idiot',
refined = 'Du Forfinede Dem!',
broke = 'Din Fattige Røv Har Ikke Råd Til Disse!',
novial = 'Ingen LSD Vialer, Idiot',
}
Lang.mescaline = {
pick = "Plukker Kaktus",
dry = 'Tørrer Kaktus',
nocactus = 'Ingen Kaktus Bulbs',
eat = 'Spiser Mescaline'
}
Lang.meth = {
inside = 'Ting Indeni Allerede',
increaseheat = 'Øger Varme',
mission = 'Bil Er Markeret På Dit Kort',
ace = 'Du Har Noget Aceton',
eph = 'Du Har Noget Efedrin',
mix = 'Tilsætter Ting Til Blandingen',
nobag = 'Ingen Poser'
}
Lang.oxy = {
truck = 'Din Lastbil Er Her',
cantcarry = 'Du Er Ikke Så Stærk, Du Kan Kun Bære En',
hand = 'Overrækker Oxy',
empty = 'Du Kan Ikke Være Tomhændet, Idiot',
broke = 'Din Fattige Røv Har Ikke Råd Til Dette',
hot = 'Bilen Er Hot, Dump Den Nu',
next = 'Kom Til Den Næste Lokation'
}
Lang.Pharma = {
notems = 'Du Er Ikke En Medicinsk Person',
write = 'Skriver Recept',
fill = 'Fylder Recept',
open = 'Åbner Flaske',
pills = 'Du Har Nogle Piller!',
no = 'Du Har Ingen Recept'
}
Lang.Shrooms = {
pick = 'Plukker Svampe',
eat = 'Spiser Svampe',
trip = 'Hav En God Tur!'
}
Lang.Weed = {
pick = 'Høster Weed',
busy = 'Tørrer Allerede En Ud',
canna = 'Laver Cannabis-smør',
brown = 'Laver Specielle Brownies',
cook = 'Laver Specielle Cookies',
Choc = 'Laver Speciel Chokolade',
muff = 'Laver Speciel Muffin',
stovehot = 'Komfuret Er For Varmt, Vent 30 Sekunder På At Køle Ned',
shat = 'Laver Shatter',
roll = 'Ruller Blunts',
--
nodry = 'Du Har Brug For Våd Cannabis Til At Tørre',
noweed = 'Kan Ikke Rulle En Blunt Med Luft',
noshat = 'Du Har Brug For Shatter Til At Lave En Dab',
notorch = 'Du Har Brug For En Butanbrænder'
}
Lang.xtc = {
out = 'Du Har Allerede En Presser Ude',
pressing = 'Presser Piller',
raw = 'Laver Rå XTC',
mdp2p = 'Stjæler MDP2P',
iso = 'Stjæler Isosafrol',
fail = 'Dude, Det Er En Cirkel, Ikke Raketteknologi',
--
cash = 'Jeg har brug for 20k i kontanter'
}
-154
View File
@@ -1,154 +0,0 @@
Lang = {}
Lang.Coke = {
picking = "Bladeren plukken",
makepow = 'Bladeren tot poeder malen',
cutting = 'Coke snijden met bakpoeder',
bagging = "Coke in zakken doen",
cut = "Je hebt wat coke gesneden",
nocutcoke = "Je kunt geen coke snijden zonder coke, idioot",
bagcoke = "Je hebt coke in zakken gedaan",
nobagcoke = "Je kunt geen coke in zakken doen zonder coke, idioot",
}
Lang.Crack = {
cookcrack = "Crack aan het maken",
bagcrack = 'Crack in zakken doen',
makecrack = 'Goede crack',
nocoke = 'Je kunt dit niet maken zonder coke'
}
Lang.Cornerselling = {
toofar = "Te ver van je hoek, maat",
inacar = "Je kunt niet verkopen terwijl je in een auto zit",
deny = "Fuck dat bod",
start = "Verdien wat geld",
stop = "Luie reet, kan niet eens drugs verkopen",
nodrugs = "Wat ga je verkopen? Lucht?",
notcops = "Niet genoeg agenten",
sell = "Drugs verkopen",
}
Lang.Delivery = {
search = "Op zoek naar een bezorging...",
none = "Niets in de buurt",
busy = "Je hebt nog niet eens degene afgemaakt die ik je vertelde",
found = "Gemarkeerd op je kaart",
already = "Al bezig met bezorgen",
checkrep = "Huidige handelaarsreputatie: ",
pack = 'Pakket overhandigen',
}
Lang.Heroin = {
pick = "Papaver plukken",
tableout = 'Je hebt al een tafel uitstaan',
dryout = "Papaver laten drogen",
cutting = "Heroin snijden met bakpoeder",
secret = "SSSTTTT",
table = "Tafel neerzetten",
success = "Heroin goed verwarmd",
clean = 'Heroïnetafel schoonmaken',
needles = 'Spuit vullen',
pickup = 'Heroïnetafel oppakken',
cutheroin = 'Je hebt wat gesneden heroïne gemaakt',
noheroin = "Hoe kun je heroïne snijden zonder heroïne, idioot",
vial = 'Je hebt een flacon heroïne gemaakt',
novial = "Hoe kun je heroïneflacons maken zonder heroïne, idioot",
fail = 'Je hebt ze te veel verhit, idioot',
fill = 'Vul de spuit',
nofill = 'Hoe ga je heroïne-naalden vullen zonder heroïne'
}
Lang.Lean = {
marked = 'Auto staat op je kaart',
lean = 'Je hebt paarse lean gekregen',
dextro = 'Je hebt rode dextro gekregen'
}
Lang.lsd = {
steallys = 'Lyserginezuur stelen',
stealdie = 'Lyserginezuur stelen',
tableout = 'Je hebt al een tafel uitstaan',
tablepack = 'Tafel inpakken',
heat = 'Vloeistoffen verwarmen',
clean = 'Tafel schoonmaken',
refine = 'Kwaliteit verfijnen',
dip = 'LSD op papier dippen',
buypaper = 'Tab-papier kopen',
buykit = 'Lab-kit kopen',
place = 'Tafel neerzetten',
lys = 'Je hebt lyserginezuur',
die = 'Je hebt di-ethylamide',
cleaned = 'Je hebt het perfect schoongemaakt',
madelsd = 'Je hebt LSD gemaakt!',
failed = 'Je hebt ze te veel verhit, idioot',
refined = 'Je hebt ze verfijnd!',
broke = 'Je arme reet kan dit niet betalen!',
novial = 'Geen LSD-flesjes, idioot',
}
Lang.mescaline = {
pick = "Cactus plukken",
dry = 'Cactus laten drogen',
nocactus = 'Geen cactusbollen',
eat = 'Mescaline eten'
}
Lang.meth = {
inside = 'Al iets binnen',
increaseheat = 'Hitte verhogen',
mission = 'Auto staat op je kaart',
ace = 'Je hebt wat aceton gekregen',
eph = 'Je hebt wat efedrine gekregen',
mix = 'Dingen toevoegen aan de mix',
nobag = 'Geen tassen'
}
Lang.oxy = {
truck = 'Je vrachtwagen is hier',
cantcarry = 'Je bent niet zo sterk, je kunt er maar één dragen',
hand = 'Oxy overhandigen',
empty = 'Je kunt niet met lege handen staan, idioot',
broke = 'Je arme reet kan dit niet betalen',
hot = 'Auto is heet, dump het nu',
next = 'Ga naar de volgende locatie'
}
Lang.Pharma = {
notems = 'Je bent geen medisch persoon',
write = 'Recept schrijven',
fill = 'Recept vullen',
open = 'Fles openen',
pills = 'Je hebt wat pillen!',
no = 'Je hebt geen recept'
}
Lang.Shrooms = {
pick = 'Paddenstoelen plukken',
eat = 'Paddenstoelen eten',
trip = 'Fijne reis!'
}
Lang.Weed = {
pick = 'Wiet oogsten',
busy = 'Ben al bezig met eentje te drogen',
canna = 'Wietboter maken',
brown = 'Speciale bruine maken',
cook = 'Speciale koekjes maken',
Choc = 'Speciale chocolade maken',
muff = 'Speciale muffin maken',
stovehot = 'Het fornuis is te heet, wacht 30 seconden om af te koelen',
shat = 'Shatter maken',
roll = 'Blunts rollen',
nodry = 'Je hebt natte cannabis nodig om te drogen',
noweed = 'Kan geen joint rollen zonder wiet',
noshat = 'Je hebt shatter nodig om te dabben',
notorch = 'Je hebt een gasbrander nodig'
}
Lang.xtc = {
out = 'Je hebt al een persmachine',
pressing = 'Pillen persen',
raw = 'Ruwe XTC maken',
mdp2p = 'MDP2P stelen',
iso = 'Iso safrole stelen',
fail = 'Dude, het is een cirkel, geen raketwetenschap',
cash = 'Ik heb 20k in contanten nodig'
}
-154
View File
@@ -1,154 +0,0 @@
Lang = {}
Lang.Coke = {
picking = "葉を摘む",
makepow = '葉を粉にする',
cutting = 'ベーキングソーダでコカインを切る',
bagging = "コカインを袋詰めする",
cut = "コカインを切った",
nocutcoke = "コカインがないと切れないよ、アホ",
bagcoke = "コカインを袋詰めした",
nobagcoke = "コカインがないと袋詰めできないよ、アホ",
}
Lang.Crack = {
cookcrack = "クラックを作る",
bagcrack = 'クラックを袋詰めする',
makecrack = 'いいクラック',
nocoke = 'コカインなしではこれは作れない'
}
Lang.Cornerselling = {
toofar = "あなたのコーナーから遠すぎる",
inacar = "車の中で売ることはできない",
deny = "そのオファーはダメだ",
start = "お金を稼ごう",
stop = "怠け者、薬さえ売れないのか",
nodrugs = "何を売るつもり?空気?",
notcops = "警官が足りない",
sell = "薬を売る",
}
Lang.Delivery = {
search = "配達を検索中...",
none = "近くに何もない",
busy = "まだ完成していないものを終えていない",
found = "あなたの地図にマークされた",
already = "すでに配達中",
checkrep = "現在のディーラーの評判:",
pack = 'パッケージを渡す',
}
Lang.Heroin = {
pick = "アヘンを摘む",
tableout = 'すでにテーブルが出ている',
dryout = "アヘンを乾燥させる",
cutting = "ベーキングソーダでヘロインを切る",
secret = "ひそかに",
table = "テーブルを置く",
success = "ヘロインを正しく加熱した",
clean = 'ヘロインテーブルを掃除する',
needles = '注射器を満たす',
pickup = 'ヘロインテーブルを拾う',
cutheroin = 'ヘロインを切った',
noheroin = "アヘンがないとヘロインを切れないよ、アホ",
vial = 'ヘロインのびんを作った',
novial = "アヘンがないとヘロインのびんを作れないよ、アホ",
fail = '加熱しすぎた、アホ',
fill = '注射器を満たす',
nofill = 'アヘンがないとヘロインの注射器を満たせないよ、アホ'
}
Lang.Lean = {
marked = '車が地図にマークされた',
lean = '紫色のリーンを手に入れた',
dextro = '赤いデキストロを手に入れた'
}
Lang.lsd = {
steallys = 'リゼルグ酸を盗む',
stealdie = 'リゼルグ酸を盗む',
tableout = 'すでにテーブルが出ている',
tablepack = 'テーブルをパッキングする',
heat = '液体を加熱する',
clean = 'テーブルを掃除する',
refine = '品質を高める',
dip = '紙にLSDを浸す',
buypaper = 'タブ用紙を購入する',
buykit = 'ラボキットを購入する',
place = 'テーブルを置く',
lys = 'リゼルグ酸を手に入れた',
die = 'ジエチルアミドを手に入れた',
cleaned = '完璧にきれいにした',
madelsd = 'LSDを作った!',
failed = '加熱しすぎた、アホ',
refined = '高めた!',
broke = 'あなたはこれを買うお金がありません!',
novial = 'LSDのびんがありません、アホ',
}
Lang.mescaline = {
pick = "サボテンを摘む",
dry = 'サボテンを乾燥させる',
nocactus = 'サボテンの球根がありません',
eat = 'メスカリンを食べる'
}
Lang.meth = {
inside = '中にはすでに何かある',
increaseheat = '熱を上げる',
mission = '車が地図にマークされた',
ace = 'アセトンを手に入れた',
eph = 'エフェドリンを手に入れた',
mix = '混ぜ物を追加する',
nobag = '袋がない'
}
Lang.oxy = {
truck = 'あなたのトラックはここにあります',
cantcarry = 'あなたはそんなに強くない、あなたは1つしか運べない',
hand = '酸素を手渡す',
empty = 'あなたは空手ではいられない、アホ',
broke = 'あなたはこれを払うお金がありません',
hot = '車が熱い、すぐにそれを投げ捨てる',
next = '次の場所に行く'
}
Lang.Pharma = {
notems = '医療関係者ではありません',
write = '処方箋を書く',
fill = '処方箋を埋める',
open = 'ボトルを開ける',
pills = 'いくつかの錠剤を手に入れた!',
no = '処方箋がありません'
}
Lang.Shrooms = {
pick = 'キノコを摘む',
eat = 'キノコを食べる',
trip = 'いい旅を!'
}
Lang.Weed = {
pick = '大麻を収穫する',
busy = 'すでに1つを乾かしています',
canna = 'キャナバターを作る',
brown = '特製ブラウニーを作る',
cook = '特製クッキーを作る',
Choc = '特製チョコレートを作る',
muff = '特製マフィンを作る',
stovehot = 'ストーブが熱すぎるので、30秒待って冷ます',
shat = 'シャターを作る',
roll = 'ブラントを巻く',
nodry = '乾燥させるためには湿った大麻が必要です',
noweed = '大麻なしではブラントを巻けません',
noshat = 'ダブするにはシャターが必要です',
notorch = 'ガスバーナーが必要です'
}
Lang.xtc = {
out = 'すでにプレスがあります',
pressing = '錠剤を押す',
raw = '生のXTCを作る',
mdp2p = 'MDP2Pを盗む',
iso = 'イソサフロールを盗む',
fail = '兄ちゃん、それは円形だ、ロケットサイエンスじゃない',
cash = '現金20kが必要です'
}
-154
View File
@@ -1,154 +0,0 @@
Lang = {}
Lang.Coke = {
picking = "采摘叶子",
makepow = '将叶子研磨成粉末',
cutting = '用苏打粉切割可乐',
bagging = "包装可乐",
cut = "你切了一些可乐",
nocutcoke = "你不能没有可乐就切可乐,笨蛋",
bagcoke = "你装袋了可乐",
nobagcoke = "你不能没有可乐就装袋可乐,笨蛋",
}
Lang.Crack = {
cookcrack = "制作一些 crack",
bagcrack = '包装 crack',
makecrack = '不错的 crack',
nocoke = '没有可乐不能制作这个'
}
Lang.Cornerselling = {
toofar = "离你的拐角太远了,兄弟",
inacar = "你不能在车里卖东西",
deny = "拒绝那个出价",
start = "赚点钱",
stop = "懒鬼,甚至连卖毒品都不想做",
nodrugs = "你打算卖什么?空气吗?",
notcops = "警察不够",
sell = "正在销售毒品",
}
Lang.Delivery = {
search = "正在寻找交付...",
none = "附近没有东西",
busy = "你甚至还没有完成我告诉你的一个",
found = "标记在你的地图上",
already = "已经在交付中",
checkrep = "当前交易员声誉:",
pack = '交接包裹',
}
Lang.Heroin = {
pick = "采摘罂粟",
tableout = '你已经摆出了一张桌子',
dryout = "晾干罂粟",
cutting = "用苏打粉切割海洛因",
secret = "嘘",
table = "放置桌子",
success = "正确加热海洛因",
clean = '清洁海洛因桌',
needles = '填充针筒',
pickup = '捡起海洛因桌',
cutheroin = '你制造了一些剪切过的海洛因',
noheroin = "没有海洛因怎么能剪切海洛因?笨蛋",
vial = '你制作了一个海洛因小瓶',
novial = "没有海洛因怎么能制作海洛因小瓶?笨蛋",
fail = '你把它们加热过头了,笨蛋',
fill = '填充针筒',
nofill = '没有海洛因怎么填充海洛因的针筒?'
}
Lang.Lean = {
marked = '车子已标记在你的地图上',
lean = '你得到了紫色的瘾',
dextro = '你得到了红色的右旋'
}
Lang.lsd = {
steallys = '偷窃溴酸',
stealdie = '偷窃溴酸',
tableout = '你已经摆出了一张桌子',
tablepack = '打包桌子',
heat = '加热液体',
clean = '清洁桌子',
refine = '提纯品质',
dip = '把 LSD 涂在纸上',
buypaper = '购买标签纸',
buykit = '购买实验室工具',
place = '放置桌子',
lys = '你得到了溴酸',
die = '你得到了二乙酰胺',
cleaned = '你清洁得很好',
madelsd = '你制造了 LSD!',
failed = '你加热过头了,笨蛋',
refined = '你提纯了它们!',
broke = '你穷得买不起这些!',
novial = '没有 LSD 小瓶,笨蛋',
}
Lang.mescaline = {
pick = "采摘仙人掌",
dry = '晾干仙人掌',
nocactus = '没有仙人掌球',
eat = '吃麦斯卡林'
}
Lang.meth = {
inside = '里面已经有东西了',
increaseheat = '加热中',
mission = '车子已标记在你的地图上',
ace = '你得到了一些乙酸',
eph = '你得到了一些麻黄碱',
mix = '加入混合物',
nobag = '没有袋子'
}
Lang.oxy = {
truck = '你的卡车在这里',
cantcarry = '你不那么强壮,你只能搬运一个',
hand = '交付氧气',
empty = '你不能空手,笨蛋',
broke = '你穷得买不起这个',
hot = '车子很热,现在倾倒它',
next = '去下一个地点'
}
Lang.Pharma = {
notems = '你不是医生',
write = '开具处方',
fill = '填写处方',
open = '打开瓶子',
pills = '你得到了一些药丸!',
no = '你没有处方'
}
Lang.Shrooms = {
pick = '采摘蘑菇',
eat = '吃蘑菇',
trip = '祝你旅途愉快!'
}
Lang.Weed = {
pick = '收获大麻',
busy = '已经在晾干一个了',
canna = '制作大麻黄油',
brown = '制作特制棕子',
cook = '制作特制饼干',
Choc = '制作特制巧克力',
muff = '制作特制松饼',
stovehot = '炉子太热了,请等待 30 秒冷却',
shat = '制作特制糖霜',
roll = '卷烟',
nodry = '你需要湿大麻才能晾干',
noweed = '不能用空气卷烟',
noshat = '你需要糖霜来吸食',
notorch = '你需要打火机'
}
Lang.xtc = {
out = '你已经有一个压片机了',
pressing = '压片',
raw = '制作原始 XTC',
mdp2p = '偷窃 MDP2P',
iso = '偷窃异亚硫酸酯',
fail = '哥们,这是圆的不是火箭科学',
cash = '我需要 20k 现金'
}
-154
View File
@@ -1,154 +0,0 @@
Lang = {}
Lang.Coke = {
picking = "Recogiendo hojas",
makepow = 'Moliendo hojas en polvo',
cutting = 'Cortando coca con bicarbonato de sodio',
bagging = "Empacando coca",
cut = "Has cortado algo de coca",
nocutcoke = "No puedes cortar coca sin coca, idiota",
bagcoke = "Has empacado coca",
nobagcoke = "No puedes empacar coca sin coca, idiota",
}
Lang.Crack = {
cookcrack = "Cocinando crack",
bagcrack = 'Empacando crack',
makecrack = 'Buen crack',
nocoke = 'No puedes hacer esto sin cocaína'
}
Lang.Cornerselling = {
toofar = "Demasiado lejos de tu esquina, amigo",
inacar = "No puedes vender mientras estás en un auto",
deny = "A la mierda esa oferta",
start = "Consigue ese dinero",
stop = "El culo perezoso ni siquiera puede vender drogas",
nodrugs = "¿Qué vas a vender? ¿Aire?",
notcops = "No hay suficientes policías",
sell = "Vendiendo drogas",
}
Lang.Delivery = {
search = "Buscando una entrega...",
none = "Nada cerca",
busy = "Ni siquiera has terminado el que te dije",
found = "Marcado en tu mapa",
already = "Ya entregando",
checkrep = "Reputación actual del vendedor: ",
pack = 'Entregando paquete',
}
Lang.Heroin = {
pick = "Recogiendo amapolas",
tableout = 'Ya tienes una mesa fuera',
dryout = "Secando amapolas",
cutting = "Cortando heroína con bicarbonato de sodio",
secret = "SHHHHHHHHH",
table = "Colocando mesa",
success = "Calentaste la heroína adecuadamente",
clean = 'Limpiando mesa de heroína',
needles = 'Rellenando jeringa',
pickup = 'Recogiendo mesa de heroína',
cutheroin = 'Hiciste algo de heroína cortada',
noheroin = "¿Cómo puedes cortar heroína sin heroína, idiota?",
vial = 'Hiciste una ampolla de heroína',
novial = "¿Cómo puedes hacer ampollas de heroína sin heroína, idiota?",
fail = 'Los calentaste demasiado, idiota',
fill = 'Llenaste la jeringa',
nofill = '¿Cómo vas a llenar agujas de heroína sin heroína?'
}
Lang.Lean = {
marked = 'El auto está marcado en tu mapa',
lean = 'Tienes lean morado',
dextro = 'Tienes dextro rojo'
}
Lang.lsd = {
steallys = 'Robando ácido lisérgico',
stealdie = 'Robando ácido lisérgico',
tableout = 'Ya tienes una mesa fuera',
tablepack = 'Empacando mesa',
heat = 'Calentando líquidos',
clean = 'Limpiando mesa',
refine = 'Refinando la calidad',
dip = 'Sumerjiendo LSD en papel',
buypaper = 'Comprando papel de tab',
buykit = 'Comprando kit de laboratorio',
place = 'Colocando mesa',
lys = 'Tienes ácido lisérgico',
die = 'Tienes dietilamida',
cleaned = 'Lo limpiaste perfectamente',
madelsd = '¡Hiciste LSD!',
failed = 'Los calentaste demasiado, idiota',
refined = '¡Los refinaste!',
broke = '¡Tu culo quebrado no puede pagarlo!',
novial = '¡No hay ampollas de LSD, idiota!',
}
Lang.mescaline = {
pick = "Recogiendo cactus",
dry = 'Secando cactus',
nocactus = 'Sin bulbos de cactus',
eat = 'Comiendo mescalina'
}
Lang.meth = {
inside = 'Ya hay algo dentro',
increaseheat = 'Aumentando el calor',
mission = 'El auto está marcado en tu mapa',
ace = 'Tienes acetona',
eph = 'Tienes efedrina',
mix = 'Agregando cosas a la mezcla',
nobag = 'No hay bolsas'
}
Lang.oxy = {
truck = 'Tu camión está aquí',
cantcarry = 'No eres tan fuerte, solo puedes llevar uno',
hand = 'Entregando oxy',
empty = 'No puedes estar vacío, idiota',
broke = '¡Tu culo quebrado no puede pagarlo!',
hot = 'El auto está caliente, tíralo ahora',
next = 'Ve a la siguiente ubicación'
}
Lang.Pharma = {
notems = 'No eres una persona médica',
write = 'Escribiendo receta',
fill = 'Llenando receta',
open = 'Abriendo botella',
pills = '¡Tienes algunas píldoras!',
no = 'No tienes una receta'
}
Lang.Shrooms = {
pick = 'Recogiendo hongos',
eat = 'Comiendo hongos',
trip = '¡Ten un buen viaje!'
}
Lang.Weed = {
pick = 'Cosechando marihuana',
busy = 'Ya estoy secando uno',
canna = 'Haciendo mantequilla de marihuana',
brown = 'Haciendo brownies especiales',
cook = 'Haciendo galletas especiales',
Choc = 'Haciendo chocolate especial',
muff = 'Haciendo muffin especial',
stovehot = 'La estufa está demasiado caliente, espera 30 segundos para enfriar',
shat = 'Haciendo shatter',
roll = 'Enrollando blunts',
nodry = 'Necesitas marihuana húmeda para secar',
noweed = 'No puedes enrollar un blunt sin marihuana',
noshat = 'Necesitas shatter para hacer un dab',
notorch = 'Necesitas un soplete de butano'
}
Lang.xtc = {
out = 'Ya tienes una prensa',
pressing = 'Prensando pastillas',
raw = 'Haciendo XTC crudo',
mdp2p = 'Robando MDP2P',
iso = 'Robando isosafrol',
fail = 'Tío, es un círculo, no ciencia de cohetes',
cash = 'Necesito 20k en efectivo'
}
-157
View File
@@ -1,157 +0,0 @@
Lang = {}
Lang.Coke = {
picking = "Plockar löv",
makepow = 'Mal löv till pulver',
cutting = 'Skär kokain med bikarbonat',
bagging = "Fyller på påsar med kokain",
cut = "Du skar lite kokain",
nocutcoke = "Du kan inte skära kokain utan kokain, idiot",
bagcoke = "Du fyllde på påsar med kokain",
nobagcoke = "Du kan inte fylla på påsar med kokain utan kokain, idiot",
}
Lang.Crack = {
cookcrack = "Kokar crack",
bagcrack = 'Fyller på påsar med crack',
makecrack = 'Bra crack',
nocoke = 'Du kan inte göra detta utan kokain'
}
Lang.Cornerselling = {
toofar = "För långt från din hörna, kompis",
inacar = "Du kan inte sälja medan du är i en bil",
deny = "Fuck det erbjudandet",
start = "Skaffa pengarna",
stop = "Lat röv kan inte ens sälja droger",
nodrugs = "Vad ska du sälja? Luft?",
notcops = "Inte tillräckligt med poliser",
sell = "Säljer droger",
}
Lang.Delivery = {
search = "Söker efter en leverans...",
none = "Inget nära",
busy = "Du har inte ens slutfört den jag sa till dig",
found = "Markerat på din karta",
already = "Redan levererande",
checkrep = "Nuvarande återförsäljares rykte: ",
pack = 'Överlämnar paket',
}
Lang.Heroin = {
pick = "Plockar opiumvallmo",
tableout = 'Du har redan ett bord ute',
dryout = "Torkar opiumvallmo",
cutting = "Skär heroin med bikarbonat",
secret = "SHHHHHHHHH",
table = "Placerar bord",
success = "Värmt upp heroinet ordentligt",
clean = 'Rengör heroinbordet',
needles = 'Fyller spruta',
pickup = 'Plockar upp heroinbordet',
cutheroin = 'Du gjorde lite skuret heroin',
noheroin = "Hur kan du skära heroin utan heroin, idiot",
vial = 'Du gjorde en flaska med heroin',
novial = "Hur kan du göra heroinflaskor utan heroin, idiot",
fail = 'Du överhettade dem, idiot',
fill = 'Fyllde sprutan',
nofill = 'Hur ska du fylla nålar med heroin utan heroin'
}
Lang.Lean = {
marked = 'Bilen är markerad på din karta',
lean = 'Du fick lila lean',
dextro = 'Du fick rött dextro'
}
Lang.lsd = {
steallys = 'Stjäl lysergsyra',
stealdie = 'Stjäl lysergsyra',
tableout = 'Du har redan ett bord ute',
tablepack = 'Packar upp bordet',
heat = 'Värmer upp vätskor',
clean = 'Rengör bordet',
refine = 'Förfinar kvaliteten',
dip = 'Doppa LSD på papper',
buypaper = 'Köp flikpapper',
buykit = 'Köp laboratoriekit',
place = 'Placerar bord',
lys = 'Du fick lysergsyra',
die = 'Du fick dietilamid',
cleaned = 'Du rengjorde det perfekt',
madelsd = 'Du gjorde LSD!',
failed = 'Du överhettade dem, idiot',
refined = 'Du förfinade dem!',
broke = 'Din fattiga röv kan inte ha råd med det här!',
novial = 'Inga LSD-flaskor, idiot'
}
Lang.mescaline = {
pick = "Plockar kaktus",
dry = 'Torkar ut kaktus',
nocactus = 'Inga kaktusknoppar',
eat = 'Äter mescalin'
}
Lang.meth = {
inside = 'Något inuti redan',
increaseheat = 'Öka värmen',
mission = 'Bilen är markerad på din karta',
ace = 'Du fick acetone',
eph = 'Du fick efedrin',
mix = 'Lägger till saker i blandningen',
nobag = 'Inga påsar'
}
Lang.oxy = {
truck = 'Din lastbil är här',
cantcarry = 'Du är inte så stark, du kan bara bära en',
hand = 'Ger över oxy',
empty = 'Du kan inte vara tomhänt, idiot',
broke = 'Din fattiga röv kan inte ha råd med det här',
hot = 'Bilen är het, släng den nu',
next = 'Gå till nästa plats'
}
Lang.Pharma = {
notems = 'Du är inte en medicinsk person',
write = 'Skriva recept',
fill = 'Fyller recept',
open = 'Öppnar flaska',
pills = 'Du fick några piller!',
no = 'Du har inget recept'
}
Lang.Shrooms = {
pick = 'Plockar svampar',
eat = 'Äter svampar',
trip = 'Ha en trevlig resa!'
}
Lang.Weed = {
pick = 'Skördar cannabis',
busy = 'Redan torkar en',
canna = 'Gör cannabis-smör',
brown = 'Gör speciella brownies',
cook = 'Gör speciella kakor',
Choc = 'Gör speciell choklad',
muff = 'Gör speciell muffin',
stovehot = 'Spisen är för varm, vänta 30 sekunder för att svalna',
shat = 'Gör shatter',
roll = 'Rullar blunts',
nodry = 'Du behöver fuktig cannabis för att torka',
noweed = 'Kan inte rulla en blunt utan cannabis',
noshat = 'Du behöver shatter för att göra en dab',
notorch = 'Du behöver en butangasbrännare'
}
Lang.xtc = {
out = 'Du har redan en press',
pressing = 'Pressar piller',
raw = 'Gör rå XTC',
mdp2p = 'Stjäl MDP2P',
iso = 'Stjäl isosafrol',
fail = 'Kille, det är en cirkel, inte raketvetenskap',
cash = 'Jag behöver 20k i kontanter'
}
+19
View File
@@ -0,0 +1,19 @@
CREATE TABLE IF NOT EXISTS `deliveriesdealer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` varchar(50) NOT NULL,
`itemdata` varchar(50) NOT NULL,
`timestart` varchar(50) NOT NULL,
`timestop` varchar(50) DEFAULT NULL,
`maxtime` varchar(50) NOT NULL,
`location` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `drugrep` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` varchar(50) DEFAULT NULL,
`drugrep` varchar(255) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
-43
View File
@@ -1,43 +0,0 @@
Notes from 3.5.2 -> 3.5.3
added easier calls for GetCops
added support for qs phone emails
added option for minigames 'none' so its not required
3.5.3 - > 3.5.4
1) Removed Config.imagelink - too tired of people not changing that and then asking me why images wont load.
- should work for qb, ps, lj, ox, qs, core, origen. if you use another inventory go to line 147 of the functions.lua in the client folder
- make this adjustment
```
elseif GetResourceState('yourinventoryname') == 'started' then
return "nui:/yourinventoryname/folder1/folder2/".. QBCore.Shared.Items[img].image
```
2 )small bug fixes in meth.lua client side
3) small bug fixes in pharma.lua server side
4) bug allowing to see target for drying weed when waiting for the weed to dry patched
3.5.4 - > 3.5.5
Updated small tweaks to client and server functions.lua
3.5.5 - > 3.5.6
updated mainly client/server functions.lua to include a check for if using scully emotes then use the export to cancel emote once done with progressbar, added support for a few other inventories and dispatch
added new item box events for additem and removeitem functions in the server/functions.lua
I left the original itembox event in, if you dont use the old event it will just trigger to a blank event and the next event will trigger, its a duct tape backwards compat method
3.5.6 - > 3.5.7
added a couple new functions to cut back on repeating natives needed ( Freeze() ) will now set an entitys heading, block temp events, freeze, and set invincible)
added better calls for GetImage and GetLabel for ox inventory
converted all callbacks to lib.callback to increase optimization
should be fully compatible with qbx without needing to make a couple edits now
3.5.7 - > 3.5.8
Added support for fivemerr logs
3.5.8 -> 3.5.9
added command /cornersell **you only need to update server/cornserselling.lua** from previous update
+215 -167
View File
@@ -1,156 +1,224 @@
<h1>md-drugs</h1> # MD-Drugs
<div align="center"> <div align="center">
<a href="https://discord.gg/sAMzrB4DDx"> <a href="https://discord.gg/sAMzrB4DDx">
<img align="center" src="https://i.imgur.com/t65G9Z0.png" width="100"> <img align="center" src="https://i.imgur.com/t65G9Z0.png" width="200">
</a><br> </a><br>
<a href="https://discord.gg/sAMzrB4DDx">Mustache Scripts Discord</a><br> <a href="https://discord.gg/sAMzrB4DDx"><strong>Mustache Scripts Discord</strong></a><br>
</div> </div>
<h1>Credits</h1> ## **Credits**
- I used [Samuel's development](https://fivem.samueldev.shop/) Christmas script global states and prop spawning (with permission obtained prior to release) in the development process. - **[Samuel's Development](https://fivem.samueldev.shop/):** Used their Christmas script global states and prop spawning (with permission).
- **[STACHY225](https://babiczind.tebex.io/category/2103836):** Meth network animations.
- **[Bostra](https://discord.gg/5ncbwMNq):** Free scripts, sanity checks, and those cute mushrooms!
- **[Feisty]():** Stunning visuals that make everything look amazing.
- **Beta Testers:** Your invaluable feedback made this possible.
- **[1of1 Servers](https://1of1servers.com/):** Top-notch hosting and support. Join their [Discord](https://discord.gg/1of1servers).
- **[Kamaryn](https://discord.gg/KPRmZqFS):** For the [installation guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd).
- Shout out to [STACHY225](https://babiczind.tebex.io/category/2103836) for working out the meth network animations!
- Huge credit to [Bostra](https://discord.gg/5ncbwMNq) for sharing free scripts and providing sanity checks during moments of confusion. Those cute mushrooms? His creation! ## **Dependencies**
- Special thanks to [Feisty]() for the stunning visuals. If it looks good, she probably had a hand in it. - **[ox_lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)**
- **[qb-target](https://github.com/qbcore-framework/qb-target)** or **[ox_target](https://github.com/overextended/ox_target)**
- Special shoutout to [Beta Testers]()Your feedback has been invaluable! - **Emote Scripts (supports animations):**
- [dpemotes](https://github.com/andristum/dpemotes) <-- seriously just use rpemotes. this is old and outdated
- Big Credit to [Bostra](https://discord.gg/5ncbwMNq). if you have been around you may have seen him post some free scripts and help people, There was definetly times I dm'd him saying what the fuck am I doing and he helped keep me sane. He also made the cute mushrooms! - [rpemotes](https://github.com/alberttheprince/rpemotes-reborn)
- [scully_emotemenu](https://github.com/Scullyy/scully_emotemenu)
- [Jim's Tebex](https://jimathy666.tebex.io/) for putting out open source resources that I was able to break and fix and learn how to code - **[Read](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html)**
- **Game Build 2944 or Later**
- [jixeltay](https://jixeltay.tebex.io/category/scripts) for putting out banger after banger. These people help the community learn so much more
- Our partner [1of1 Servers]( https://1of1servers.com/) and their [discord](https://discord.gg/1of1servers) for their amazing server hosting! absolutely top notch.
<h1>Special Thanks To Kamaryn For The Preview</h1>
- Thanks to Kamaryn for this [install guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd)
- join their [discord](https://discord.gg/KPRmZqFS) for other videos updates.
<h1>Dependencies</h1>
- [Ox Lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)
- [qb-target](https://github.com/qbcore-framework/qb-target) **or** ox_target
- emote script that uses the animations event (rpemotes, dpemotes, scully emotes all work)
- GAME BUILD 2944 OR LATER
<h1>Preview</h1> ## **Preview**
- [Preview link](https://www.youtube.com/watch?v=I_x7_oz_SAU) - **[Watch Preview](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
- **Preview**
![](https://cdn.discordapp.com/attachments/1164709522691076120/1185729686135910582/image.png?ex=6590abd2&is=657e36d2&hm=35c3b2d4f55473d65dd9197a69052b7ec7ac7b28528811f3f59d5f306b7237eb&)
<h1>How to install like a fuckin boss</h1>
- **STEP 1**
- qb-inventory users go to md-drugs/items_install/qb-inventory and add the Items to `qb-core/shared/items.lua` and - Add items from md-drugs/items_install/images to qb-inventory/html/images
- ox_inventory users go to md-drugs/items_install/ox_inventory and add the Items to `ox_inventory/data/items.lua` and - Add items from md-drugs/items_install/images to ox_inventory/web/images
- **STEP 2**
- delete `qb-drugs`
- **STEP 3**
- Inside the config file change **all** the locations for everything.
- **ps: All locations have been changed to make a preview video easier and with how big of a script this is, Im not going to config it for every city. THESE LOCATION DO NOT DO WELL FOR A LIVE SERVER SO CHANGE THEM**
- **STEP 4** ## **How to install like a fuckin boss**
### STEP 1
- qb-inventory users go to md-drugs/items_install/qb-inventory and add the Items to `qb-core/shared/items.lua` and - Add items from md-drugs/items_install/images to qb-inventory/html/images
- ox_inventory users go to md-drugs/items_install/ox_inventory and add the Items to `ox_inventory/data/items.lua` and - Add items from md-drugs/items_install/images to ox_inventory/web/images
### STEP 2
- delete `qb-drugs`
### STEP 3
- all locations, shops, pricings, and recipes are in the server files now utilizing callbacks to build targets and retrieve data
- shops.lua
- travelling merchant
- Weed Store
- Dealer Shops
- locations.lua
- holds all old config options for locations. edit what you need in here
- if you previously had them in the config copy and paste the <strong> INTERIOR </strong> guts of the options. example below
```lua
Config.MakePowder = {
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
```
is now
```lua
local Target = {
MakePowder = {
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
}
```
- see its a simple change.
- recipes.lua
- handles the vast majority of remove X get Y
- Cornerselling.lua
- now the drug table is inserted into this file.
- copy and paste your data inside of the
```lua
local Drugs = { -- for example
["weed_white-widow"] = {rep = 1,min = 15, max = 24 },
["weed_og-kush"] = {rep = 1,min = 15, max = 28 },
}
```
- all plant locations i.e. coke, heroin, weed, shrooms, mescaline are in the respective server files
- check server files to see drug specific settings now.
- heroin/lsd/ and xtc will have a setting table now at the top
### HOW TO CONVERT FROM OLD
- its simple really
- copy the data from your Config and paste it in locations.lua
- if the previous config option was a single location ( Not designed for multiples) then check target.singleSpot
- shops.lua will now hold all shops for md-drugs so edit the data needed there
- this is simple but tedious, but will handle security better in the long run
- if you want to be lazy you can delete everything from
```lua
local Targt = {
}
```
**besides singleSpot**
and copy and paste your
```lua
Config.MakePowder = {
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
and change the Config to Target like this BELOW the local Target = {
Target.MakePowder = {
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
```
### STEP 4
- Head to your emote script search for **uncuff** if it's missing add it - Head to your emote script search for **uncuff** if it's missing add it
- if rp or dpemotes then do this - if rpemotes do this
- go to client/animationListCustom.lua
```lua - add these to the CustomDP.Emotes = {}
["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = { EmoteLoop = true, EmoteMoving = true } }, ```lua
["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible", AnimationOptions = { EmoteLoop = false, EmoteMoving = true }}, ["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = { EmoteLoop = true, EmoteMoving = true } },
["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}}, ["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible", AnimationOptions = { EmoteLoop = false, EmoteMoving = true }},
``` ```
- Add This to CustomDP.PropEmotes = {}
- if scully emotes do this in emotes.lua ```lua
``` ["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}}
{ ```
Label = 'Uncuff', - elseif dpemotes add this to client/AnimationList.lua
Command = 'uncuff', - add these to DP.Emotes = {}
Animation = 'a_uncuff', ```lua
Dictionary = 'mp_arresting', ["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = { EmoteLoop = true, EmoteMoving = true } },
Options = { ["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible", AnimationOptions = { EmoteLoop = false, EmoteMoving = true }},
Flags = { ```
Loop = true, - add these to DP.PropEmotes = {}
Move = true, ```lua
}, ["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}}
} ```
}, - elseif scullyemotes then
{ - add this to emotes.lua
Label = 'Edibles', ```lua
Command = 'edible', {
Animation = 'mp_player_int_eat_burger', Label = 'Uncuff',
Dictionary = 'mp_player_inteat@burger', Command = 'uncuff',
Options = { Animation = 'a_uncuff',
Flags = { Dictionary = 'mp_arresting',
Loop = true, Options = {
Move = true, Flags = {
}, Loop = true,
} Move = true,
}, },
``` }
then in prop emotes do },
``` {
{ Label = 'Edibles',
Label = 'Shoot Up', Command = 'edible',
Command = 'shootup', Animation = 'mp_player_int_eat_burger',
Animation = "miranda_shooting_up", Dictionary = 'mp_player_inteat@burger',
Dictionary = "rcmpaparazzo1ig_4", Options = {
Options = { Flags = {
Flags = { Loop = true,
Loop = true, Move = true,
}, },
Props = { }
{ },
Bone = 18905, ```
Name = 'prop_syringe_01', - then in prop emotes do
Placement = { ```lua
vector3(0.11, 0.03, 0.0), {
vector3( -124.0, 0.0, 0.0), Label = 'Shoot Up',
Command = 'shootup',
Animation = "miranda_shooting_up",
Dictionary = "rcmpaparazzo1ig_4",
Options = {
Flags = {
Loop = true,
},
Props = {
{
Bone = 18905,
Name = 'prop_syringe_01',
Placement = {
vector3(0.11, 0.03, 0.0),
vector3( -124.0, 0.0, 0.0),
},
},
},
}, },
}, },
}, ```
},
},
```
- **STEP 5**
- check `qb-smallresources/config.lua` and if this exists, delete it
```
[2] = { --Coke Processing Enter/Exit
[1] = {
poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 },
allowVeh = false,
label = '[E] Enter Coke Processing'
},
[2] = {
poly = { coords = vector3(1088.81, -3187.57, -38.99), heading = 181.7, length = 2, width = 2 },
allowVeh = false,
label = '[E] Leave'
}
}
```
-- **OPTIONAL STEPS**
<h1>Fivemerr</h1> # STEP 5
This is NOT a requirement but something I personally use and believe in. - check `qb-smallresources/config.lua` and if this exists, delete it
- look for this code
```lua
[2] = { --Coke Processing Enter/Exit
[1] = {
poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 },
allowVeh = false,
label = '[E] Enter Coke Processing'
},
[2] = {
poly = { coords = vector3(1088.81, -3187.57, -38.99), heading = 181.7, length = 2, width = 2 },
allowVeh = false,
label = '[E] Leave'
}
}
```
# STEP 6
- Run SQL
# **OPTIONAL STEPS**
## Fivemerr
This is **NOT** a requirement but something I personally use and believe in.
- to integrate with fivemerr make sure you have ```set fivemerrLogs "API_KEY"``` in your server.cfg - to integrate with fivemerr make sure you have ```set fivemerrLogs "API_KEY"``` in your server.cfg
@@ -159,29 +227,30 @@ This is NOT a requirement but something I personally use and believe in.
- profit - profit
Why integrate with Fivemerr? Its a great place to store logs as it doesnt rely on discord webhooks and its far easier to search through <b>Why Integrate with Fivemerr?</b>
As well as a place to offload images and videos from fivem that doesnt rely on discord since discord API will be automatically deleting images and videos after a certain amount of time If you need an invite to their server look below - Efficient Logging: Unlike Discord webhooks, Fivemerr provides an organized and searchable log system.
- [Fivemerr Discord](https://discord.com/invite/fivemerr) - Media Storage: Easily store and access images or videos without relying on Discord. Discord's API often deletes media after a certain time, but Fivemerr keeps them secure and accessible.
- [Fivemerr Docs](https://docs.fivemerr.com/) - As well as a place to offload images and videos from fivem that doesnt rely on discord since discord API will be automatically deleting images and videos after a certain amount of time If you need an invite to their server look below
- <h1>Radial Menu </h1> [Fivemerr Discord](https://discord.com/invite/fivemerr)
- head to `qb-radial/config.lua` and search for the following event
[Fivemerr Docs](https://docs.fivemerr.com/)
## Radial Menu
- head to `qb-radial/config.lua` and search for the following event
```lua ```lua
event = 'qb-drugs:client:cornerselling', event = 'qb-drugs:client:cornerselling',
``` ```
![](https://cdn.discordapp.com/attachments/1164709522691076120/1185724912648867940/image.png?ex=6590a760&is=657e3260&hm=51534201d8d3e71f79a5c1678879ed8423f381a4a31c62f1bce6caf73782abe0&) - and change it to this
```lua ```lua
event = 'md-drugs:client:cornerselling', event = 'md-drugs:client:cornerselling',
``` ```
![](https://cdn.discordapp.com/attachments/1164709522691076120/1185725132975644753/image.png?ex=6590a795&is=657e3295&hm=97d7f60ec6c4508af92f758c00669b1d52fe673c6481434b586f81cf29c1f292&)
or just use the command /cornersell
<h1>For Qb-shops users</h1> ## For Qb-shops users
- Head to `qb-shops/config.lua` **Config.Products** and add the folowing items to OR anywhere else you want them. The Only way in this script to get them is to find the travelling merchant - Head to `qb-shops/config.lua` **Config.Products** and add the folowing items to OR anywhere else you want them. The Only way in this script to get them is to find the travelling merchant
```lua ```lua
{name = 'bakingsoda', price = 100, amount = 5000, info = {}, type = 'item'}, {name = 'bakingsoda', price = 100, amount = 5000, info = {}, type = 'item'},
@@ -189,28 +258,7 @@ or just use the command /cornersell
{name = 'needle', price = 100, amount = 5000, info = {}, type = 'item'}, {name = 'needle', price = 100, amount = 5000, info = {}, type = 'item'},
``` ```
- <h1>Tier System</h1> ## Tier System
- Check Players.lua in the server folder of QB-Core. If you see - Turn On Config.TierSystem after you run the sql file
```PlayerData.metadata['dealerrep'] = PlayerData.metadata['dealerrep'] or 0```
- Then Place This directly under it
```
PlayerData.metadata['coke'] = PlayerData.metadata['coke'] or 0
PlayerData.metadata['heroin'] = PlayerData.metadata['heroin'] or 0
PlayerData.metadata['lsd'] = PlayerData.metadata['lsd'] or 0
```
**IF YOU DONT SEE THE ABOVE THEN GO TO THE CONFIG OF QB-Core**
go to the config of qb-core and search metadata, underneath armor = 0, add this
```
lsd = 0,
coke = 0,
heroin = 0,
dealerrep = 0,
```
[mlo i use](https://www.gta5-mods.com/maps/mlo-4x-drug-lab-interiors-sp-fivem) heres an option. use it or dont. [mlo i use](https://www.gta5-mods.com/maps/mlo-4x-drug-lab-interiors-sp-fivem) heres an option. use it or dont.
+112 -121
View File
@@ -1,9 +1,25 @@
local QBCore = exports['qb-core']:GetCoreObject()
GlobalState.CocaPlant = Config.CocaPlant local cokeplants = {
{ location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a" },
{ location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a" },
{ location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a" },
{ location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a" },
{ location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a" },
}
GlobalState.CocaPlant = cokeplants
Citizen.CreateThread(function() Citizen.CreateThread(function()
for _, v in pairs(Config.CocaPlant) do for _, v in pairs(cokeplants) do
v.taken = false v.taken = false
end end
end) end)
@@ -11,140 +27,115 @@ end)
function CaneCooldown(loc) function CaneCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
Config.CocaPlant[loc].taken = false cokeplants[loc].taken = false
GlobalState.CocaPlant = Config.CocaPlant GlobalState.CocaPlant = cokeplants
Wait(1000) Wait(1000)
TriggerClientEvent('coke:respawnCane', -1, loc) TriggerClientEvent('coke:respawnCane', -1, loc)
Log('Coca Plant Respawned At ' .. Config.CocaPlant[loc].location, 'coke') Log('Coca Plant Respawned At ' .. cokeplants[loc].location, 'coke')
end) end)
end end
RegisterNetEvent("coke:pickupCane") RegisterNetEvent("coke:pickupCane")
AddEventHandler("coke:pickupCane", function(loc) AddEventHandler("coke:pickupCane", function(loc)
local playerPed = GetPlayerPed(source) local src = source
if CheckDist(src, cokeplants[loc].location) then return end
if CheckDist(source, playerPed, Config.CocaPlant[loc].location) then return end if not cokeplants[loc].taken then
if not Config.CocaPlant[loc].taken then cokeplants[loc].taken = true
Config.CocaPlant[loc].taken = true GlobalState.CocaPlant = cokeplants
GlobalState.CocaPlant = Config.CocaPlant
TriggerClientEvent("coke:removeCane", -1, loc) TriggerClientEvent("coke:removeCane", -1, loc)
CaneCooldown(loc) CaneCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source) AddItem(src, 'coca_leaf', 1)
AddItem('coca_leaf', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Coca Leaf With a distance of ' .. dist(source, playerPed, Config.CocaPlant[loc].location) .. ' vectors', 'coke')
end end
end) end)
RegisterServerEvent('md-drugs:server:makepowder', function(num) RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'MakePowder', num) then return end
local playerPed = GetPlayerPed(source) local tier = 'tier1'
if CheckDist(source, playerPed, Config.MakePowder[num]['loc']) then return end if Config.TierSystem then
if not Itemcheck(Player, 'coca_leaf', 1, 'true') then return end local coke = getRep(src, 'coke')
if Config.TierSystem then if coke > Config.Tier1 and coke <= Config.Tier2 then
local coke = Player.PlayerData.metadata['coke'] tier = 'tier2'
if coke <= Config.Tier1 then elseif coke > Config.Tier2 then
if RemoveItem("coca_leaf", 1) then tier = 'tier3'
AddItem("coke", 1) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke') end
end if not GetRecipe(src, 'cocaine', 'cokepowder', tier) then return end
elseif coke >= Config.Tier1 and coke <= Config.Tier2 then
if RemoveItem("coca_leaf", 1) then
AddItem("cokestagetwo", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke tier 2' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke')
end
else
if RemoveItem("coca_leaf", 1) then
AddItem("cokestagethree", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke tier 3' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke')
end
end
else
if RemoveItem("coca_leaf", 1) then
AddItem("coke", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke')
end
end
end) end)
RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
RegisterServerEvent('md-drugs:server:cutcokeone', function() local src = source
local src = source local Player = getPlayer(src)
local Player = QBCore.Functions.GetPlayer(src) local count = 0
if not Itemcheck(Player,'bakingsoda', 1, 'true') then return end if Config.FancyCokeAnims then
if Config.TierSystem then if not checkLoc(src, 'singleSpot', 'cutcoke') then return end
local coke = Player.Functions.GetItemByName('coke') else
local coke2 = Player.Functions.GetItemByName('cokestagetwo') if not checkLoc(src, 'CuttingCoke', num) then return end
local coke3 = Player.Functions.GetItemByName('cokestagethree') end
if coke then if Config.TierSystem then
RemoveItem('coke', 1 ) local tier = ''
RemoveItem('bakingsoda', 1 ) local cokeTiers = {
AddItem('loosecoke', 1) {item = 'coke', tier = 'tier1', log = ' Cut Coke'},
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke', 'coke') {item = 'cokestagetwo', tier = 'tier2', log = ' Cut Coke tier 2'},
elseif coke2 then {item = 'cokestagethree', tier = 'tier3', log = ' Cut Coke tier 3'}
RemoveItem('cokestagetwo', 1 ) }
RemoveItem('bakingsoda', 1 ) for _, v in ipairs(cokeTiers) do
AddItem('loosecokestagetwo', 1) if count >= 1 then break end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke tier 2', 'coke') if Player.Functions.GetItemByName(v.item) then
elseif coke3 then tier = v.tier
RemoveItem('cokestagethree', 1 ) count = count + 1
RemoveItem('bakingsoda', 1 ) end
AddItem('loosecokestagethree', 1) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke tier 3', 'coke') if not GetRecipe(src, 'cocaine', 'cutcoke', tier) then return end
else else
Notifys(Lang.Coke.nocutcoke, "error") if not GetRecipe(src, 'cocaine', 'cutcoke', 'tier1') then return end
end end
else
if RemoveItem('coke', 1 ) then
RemoveItem('bakingsoda', 1 )
AddItem('loosecoke', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke', 'coke')
else
Notifys(Lang.Coke.nocutcoke, "error")
end
end
end) end)
RegisterServerEvent('md-drugs:server:bagcoke', function() RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if not Itemcheck(Player, 'empty_weed_bag', 1, 'true') then return end local count = 0
if Config.TierSystem then local tier = ''
local coke = Player.PlayerData.metadata['coke'] if Config.FancyCokeAnims then
local locoke = Player.Functions.GetItemByName('loosecoke') if not checkLoc(src, 'singleSpot', 'bagcokepowder') then return end
local locoke2 = Player.Functions.GetItemByName('loosecokestagetwo') else
local locoke3 = Player.Functions.GetItemByName('loosecokestagethree') if not checkLoc(src, 'BaggingCoke', num) then return end
if locoke then end
RemoveItem('loosecoke', 1 ) if Config.TierSystem then
RemoveItem('empty_weed_bag', 1) local coke = getRep(src, 'coke')
AddItem('cokebaggy', 1) local cokeTiers = {
Player.Functions.SetMetaData('coke', (coke + 1)) {item = 'loosecoke', tier = 'tier1', log = ' Bagged Coke'},
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke and now has a rep of ' .. coke + 1, 'coke') {item = 'loosecokestagetwo', tier = 'tier2', log = ' Bagged Coke tier 2'},
elseif locoke2 then {item = 'loosecokestagethree', tier = 'tier3', log = ' Bagged Coke tier 3'}
RemoveItem('loosecokestagetwo', 1 ) }
RemoveItem('empty_weed_bag', 1) for _, v in ipairs(cokeTiers) do
AddItem('cokebaggystagetwo', 1) if Player.Functions.GetItemByName(v.item) then
Player.Functions.SetMetaData('coke', (coke + 1)) if count >= 1 then break end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke tier 2 and now has a rep of ' .. coke + 1, 'coke') count = count + 1
elseif locoke3 then tier = v.tier
RemoveItem('loosecokestagethree', 1 ) end
RemoveItem('empty_weed_bag', 1) end
AddItem('cokebaggystagethree', 1) if not GetRecipe(src, 'cocaine', 'bagcoke', tier) then return end
Player.Functions.SetMetaData('coke', (coke + 1)) AddRep(src, 'coke')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke tier 3 and now has a rep of ' .. coke + 1, 'coke') else
else if not GetRecipe(src, 'cocaine', 'bagcoke', 'tier1') then return end
Notifys(Lang.Coke.nobagcoke, "error") end
end
else
if RemoveItem('loosecoke', 1 ) then
RemoveItem('empty_weed_bag', 1)
AddItem('cokebaggy', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke', 'coke')
else
Notifys(Lang.Coke.nobagcoke, "error")
end
end
end) end)
local cokecut = {loosecokestagetwo = 2, loosecokestagethree = 3}
for k, v in pairs (cokecut) do
CUI(k, function(source, item)
local src = source
local Player = getPlayer(src)
if not Player.Functions.GetItemByName('bakingsoda') then Notifys(src, 'You Need Baking Soda For this', 'error') return end
if Player.Functions.GetItemByName(item.name) then
if not Itemcheck(src, 'bakingsoda', 1) then return end
local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting It Further')
if not check then return end
if RemoveItem(src, k, 1) and RemoveItem(src, 'bakingsoda', 1) then
AddItem(src, 'loosecoke', v)
end
end
end)
end
+165 -27
View File
@@ -1,37 +1,175 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
--[[
effect options
alien
ecstacy
meth
coke
trevor
none
]]
for k, v in pairs (Consumables.Items) do QBCore.Functions.CreateUseableItem(k, function(source, item) --[[
local src = source add = {}
local Player = QBCore.Functions.GetPlayer(src) health = number -- amount of health to give
if v.time == nil then v.time = Consumables.defaulttime end stress = number -- number of stress to give
if v.effect == nil then v.effect = 0 end speed = number -- number of seconds you a fast boi
if v.anim == nil then v.anim = Consumables.defaultanim end hunger = number -- number of hunger to fill
if v.progressbartext == nil then v.progressbartext = Consumables.defaultprogresstext end thirst = number -- same shit
if v.status == nil and v.statval == nil then v.status = 'thirst' v.statval = 0 end strength = number -- how long you are strong boi
if v.statval ~= nil and v.statval == nil then v.statval = Consumables.defaultstatval end
TriggerClientEvent("md-drugs:client:consumedrugs", source, v.time, v.effect, v.anim, v.progressbartext, v.status, v.statval, k) ]]
end) local Consume = {
-- meth
methbags = { time = 4000, effect = 'meth', anim = "smoke", progressbartext = "Injesting",
add = {health = -20, stress = -10, speed = 40, strength = 10, thirst = -30}},
cokebaggy = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
cokebaggystagetwo = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
cokebaggystagethree = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
-- heroin
heroin_ready = { anim = 'shootup', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
heroin_readystagetwo = { anim = 'shootup', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
heroin_readystagethree = { anim = 'shootup', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
-- crack
baggedcracked = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
baggedcrackedstagetwo = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
baggedcrackedstagethree = { anim = 'smell', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
-- xtc
white_playboys = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_playboys2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_playboys3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_playboys4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_playboys = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_playboys2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_playboys3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_playboys4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_playboys = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10, hunger = 10 }},
red_playboys2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_playboys3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_playboys4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_playboys = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_playboy2s = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_playboys3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_playboys4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_aliens = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_aliens2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_aliens3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_aliens4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_aliens = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_aliens2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_aliens3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_aliens4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_aliens = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_aliens3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_aliens2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_aliens4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_aliens = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_aliens2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_aliens3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_aliens4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_pl = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_pl2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_pl3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_pl4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_pl = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_pl2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_pl3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_pl4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_pl = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_pl2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_pl3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_pl4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_pl = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_pl2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_pl3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_pl4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_trolls = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_trolls2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_trolls3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_trolls4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_trolls = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_trolls2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_trolls3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_trolls4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_trolls = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_trolls2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_trolls3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_trolls4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_trolls = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_trolls2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_trolls3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_trolls4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_cats2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_cats3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_cats4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
white_cats = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_cats = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_cats3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_cats2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
blue_cats4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_cats = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_cats2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_cats3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
red_cats4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_cats = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_cats2 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_cats3 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
orange_cats4 = { anim = 'edible', time = 1000, effect = 'ecstacy', add = { stress = -10 }},
-- weed
specialbrownie = { anim = 'edible', effect = 'alien', add = { hunger = 10, stress = -10 }},
specialcookie = { anim = 'edible', effect = 'alien', add = { hunger = 10, stress = -10 }},
specialchocolate = { anim = 'edible', effect = 'alien', add = { hunger = 10, stress = -10 }},
specialmuffin = { anim = 'edible', effect = 'alien', add = { hunger = 10, stress = -10 }},
blunt = { anim = 'smokeweed', effect = 'alien', add = { stress = -10 }},
dextroblunts = { anim = 'smokeweed', effect = 'alien', add = { stress = -10 }},
leanblunts = { anim = 'smokeweed', effect = 'alien', add = { stress = -10 }},
chewyblunt = { anim = 'smokeweed', effect = 'alien', add = { stress = -10 }},
-- lean
cupofdextro = { anim = 'cup', effect = 'alien', add = { stress = -10 }},
cupoflean = { anim = 'cup', effect = 'alien', add = { stress = -10 }},
-- lsd
smiley_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
wildcherry_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
yinyang_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
pineapple_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
bart_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
gratefuldead_tabs = { anim = 'edible', effect = 'trevor', add = { stress = -10 }},
-- pharma
vicodin = { anim = 'pill', effect = 'none', add = { health = 20 }},
adderal = { anim = 'pill', effect = 'none', add = { stress = -20 }},
morphine = { anim = 'pill', effect = 'none', add = { health = 40 }},
xanax = { anim = 'pill', effect = 'none', add = { stress = -40 }},
}
for k, v in pairs(Consume) do
CUI(k, function(source, item)
if not Itemcheck(source, k, 1) then return end
local time = v.time or Consumables.defaulttime
local effect = v.effect or 0
local anim = v.anim or Consumables.defaultanim
local progressbartext = v.progressbartext or Consumables.defaultprogresstext
local add = v.add or {hunger = 0}
local done = lib.callback.await('md-drugs:client:consumedrugs', source, time, effect, anim, progressbartext, add, k)
if done then
RemoveItem(source, k, 1)
end
end)
end end
RegisterNetEvent('md-drugs:server:removeconsum', function(item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
Player.Functions.RemoveItem(item, 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got High With ' .. item .. '!', 'consuming')
end)
RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval) RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval)
local Player = QBCore.Functions.GetPlayer(source) local Player = getPlayer(source)
local hunger, thirst = Player.PlayerData.metadata.hunger, Player.PlayerData.metadata.thirst
if stat == "thirst" then if stat == "thirst" then
local value = Player.PlayerData.metadata.thirst + statval local value = thirst + statval
Player.Functions.SetMetaData('hunger', value)
TriggerClientEvent('hud:client:UpdateNeeds', source, Player.PlayerData.metadata.hunger, value)
elseif stat == "hunger" then
local value = Player.PlayerData.metadata.hunger + statval
Player.Functions.SetMetaData('thirst', value) Player.Functions.SetMetaData('thirst', value)
TriggerClientEvent('hud:client:UpdateNeeds', source, Player.PlayerData.metadata.thirst, value) TriggerClientEvent('hud:client:UpdateNeeds', source, hunger, value)
elseif stat == "hunger" then
local value = hunger + statval
Player.Functions.SetMetaData('hunger', value)
TriggerClientEvent('hud:client:UpdateNeeds', source, value, thirst)
elseif stat == "stress" then elseif stat == "stress" then
local value = Player.PlayerData.metadata.hunger + statval local value = Player.PlayerData.metadata.stress + statval
Player.Functions.SetMetaData('stress', value) Player.Functions.SetMetaData('stress', value)
TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.stress, value) TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.stress, value)
elseif stat == "armor" then elseif stat == "armor" then
@@ -40,4 +178,4 @@ RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval)
TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.armor, value) TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.armor, value)
else else
end end
end) end)
+188 -41
View File
@@ -1,68 +1,215 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local StolenDrugs = {} local DrugDeals = {}
local Drugs = {
["weed_white-widow"] = {rep = 1,min = 15, max = 24 },
["weed_og-kush"] = {rep = 1,min = 15, max = 28 },
["weed_skunk"] = {rep = 1,min = 15, max = 31 },
["weed_amnesia"] = {rep = 1,min = 18, max = 34 },
["weed_purple-haze"] = {rep = 1,min = 18, max = 37},
["weed_ak47"] = {rep = 1,min = 18, max = 40},
["crack_baggy"] = {rep = 1,min = 18, max = 34},
["cokebaggy"] = {rep = 1,min = 18, max = 37},
["cokebaggystagetwo"] = {rep = 1,min = 18, max = 40},
["cokebaggystagethree"] = {rep = 1,min = 18, max = 40},
["heroin_ready"] = {rep = 1,min = 18, max = 40},
["heroin_readystagetwo"] = {rep = 1,min = 18, max = 40},
["heroin_readystagethree"] = {rep = 1,min = 18, max = 40},
["baggedcracked"] = {rep = 1,min = 18, max = 40},
["baggedcrackedstagetwo"] = {rep = 1,min = 18, max = 40},
["baggedcrackedstagethree"] = {rep = 1,min = 18, max = 40},
["white_playboys"] = {rep = 1,min = 18, max = 40},
["white_playboys2"] = {rep = 1,min = 18, max = 40},
["white_playboys3"] = {rep = 1,min = 18, max = 40},
["white_playboys4"] = {rep = 1,min = 18, max = 40},
["blue_playboys"] = {rep = 1,min = 18, max = 40},
["blue_playboys2"] = {rep = 1,min = 18, max = 40},
["blue_playboys3"] = {rep = 1,min = 18, max = 40},
["blue_playboys4"] = {rep = 1,min = 18, max = 40},
["red_playboys"] = {rep = 1,min = 18, max = 40},
["red_playboys2"] = {rep = 1,min = 18, max = 40},
["red_playboys3"] = {rep = 1,min = 18, max = 40},
["red_playboys4"] = {rep = 1,min = 18, max = 40},
["orange_playboys"] = {rep = 1,min = 18, max = 40},
["orange_playboys2"] = {rep = 1,min = 18, max = 40},
["orange_playboys3"] = {rep = 1,min = 18, max = 40},
["orange_playboys4"] = {rep = 1,min = 18, max = 40},
["white_aliens"] = {rep = 1,min = 18, max = 40},
["white_aliens2"] = {rep = 1,min = 18, max = 40},
["white_aliens3"] = {rep = 1,min = 18, max = 40},
["white_aliens4"] = {rep = 1,min = 18, max = 40},
["blue_aliens"] = {rep = 1,min = 18, max = 40},
["blue_aliens2"] = {rep = 1,min = 18, max = 40},
["blue_aliens3"] = {rep = 1,min = 18, max = 40},
["blue_aliens4"] = {rep = 1,min = 18, max = 40},
["red_aliens"] = {rep = 1,min = 18, max = 40},
["red_aliens2"] = {rep = 1,min = 18, max = 40},
["red_aliens3"] = {rep = 1,min = 18, max = 40},
["red_aliens4"] = {rep = 1,min = 18, max = 40},
["orange_aliens"] = {rep = 1,min = 18, max = 40},
["orange_aliens2"] = {rep = 1,min = 18, max = 40},
["orange_aliens3"] = {rep = 1,min = 18, max = 40},
["orange_aliens4"] = {rep = 1,min = 18, max = 40},
["white_pl"] = {rep = 1,min = 18, max = 40},
["white_pl2"] = {rep = 1,min = 18, max = 40},
["white_pl3"] = {rep = 1,min = 18, max = 40},
["white_pl4"] = {rep = 1,min = 18, max = 40},
["blue_pl"] = {rep = 1,min = 18, max = 40},
["blue_pl2"] = {rep = 1,min = 18, max = 40},
["blue_pl3"] = {rep = 1,min = 18, max = 40},
["blue_pl4"] = {rep = 1,min = 18, max = 40},
["red_pl"] = {rep = 1,min = 18, max = 40},
["red_pl2"] = {rep = 1,min = 18, max = 40},
["red_pl3"] = {rep = 1,min = 18, max = 40},
["red_pl4"] = {rep = 1,min = 18, max = 40},
["orange_pl"] = {rep = 1,min = 18, max = 40},
["orange_pl2"] = {rep = 1,min = 18, max = 40},
["orange_pl3"] = {rep = 1,min = 18, max = 40},
["orange_pl4"] = {rep = 1,min = 18, max = 40},
["white_trolls"] = {rep = 1,min = 18, max = 40},
["white_trolls2"] = {rep = 1,min = 18, max = 40},
["white_trolls3"] = {rep = 1,min = 18, max = 40},
["white_trolls4"] = {rep = 1,min = 18, max = 40},
["blue_trolls"] = {rep = 1,min = 18, max = 40},
["blue_trolls2"] = {rep = 1,min = 18, max = 40},
["blue_trolls3"] = {rep = 1,min = 18, max = 40},
["blue_trolls4"] = {rep = 1,min = 18, max = 40},
["red_trolls"] = {rep = 1,min = 18, max = 40},
["red_trolls2"] = {rep = 1,min = 18, max = 40},
["red_trolls3"] = {rep = 1,min = 18, max = 40},
["red_trolls4"] = {rep = 1,min = 18, max = 40},
["orange_trolls"] = {rep = 1,min = 18, max = 40},
["orange_trolls2"] = {rep = 1,min = 18, max = 40},
["orange_trolls3"] = {rep = 1,min = 18, max = 40},
["orange_trolls4"] = {rep = 1,min = 18, max = 40},
["white_cats"] = {rep = 1,min = 18, max = 40},
["white_cats2"] = {rep = 1,min = 18, max = 40},
["white_cats3"] = {rep = 1,min = 18, max = 40},
["white_cats4"] = {rep = 1,min = 18, max = 40},
["blue_cats"] = {rep = 1,min = 18, max = 40},
["blue_cats2"] = {rep = 1,min = 18, max = 40},
["blue_cats3"] = {rep = 1,min = 18, max = 40},
["blue_cats4"] = {rep = 1,min = 18, max = 40},
["red_cats"] = {rep = 1,min = 18, max = 40},
["red_cats2"] = {rep = 1,min = 18, max = 40},
["red_cats3"] = {rep = 1,min = 18, max = 40},
["red_cats4"] = {rep = 1,min = 18, max = 40},
["orange_cats"] = {rep = 1,min = 18, max = 40},
["orange_cats2"] = {rep = 1,min = 18, max = 40},
["orange_cats3"] = {rep = 1,min = 18, max = 40},
["orange_cats4"] = {rep = 1,min = 18, max = 40},
["blunts"] = {rep = 1,min = 18, max = 40},
["leanblunts"] = {rep = 1,min = 18, max = 40},
["dextroblunts"] = {rep = 1,min = 18, max = 40},
["chewyblunt"] = {rep = 1,min = 18, max = 40},
["blunt"] = {rep = 1,min = 18, max = 40},
["specialchocolate"] = {rep = 1,min = 18, max = 40},
["specialbrownie"] = {rep = 1,min = 18, max = 40},
["specialcookie"] = {rep = 1,min = 18, max = 40},
["specialmuffin"] = {rep = 1,min = 18, max = 40},
["shatter"] = {rep = 1,min = 18, max = 40},
["ciggie"] = {rep = 1,min = 18, max = 40},
["methbags"] = {rep = 1,min = 18, max = 40},
["driedmescaline"] = {rep = 1,min = 18, max = 40},
["shrooms"] = {rep = 1,min = 18, max = 40},
["gratefuldead_tabs"] = {rep = 1,min = 18, max = 40},
["bart_tabs"] = {rep = 1,min = 18, max = 40},
["pineapple_tabs"] = {rep = 1,min = 18, max = 40},
["yinyang_tabs"] = {rep = 1,min = 18, max = 40},
["wildcherry_tabs"] = {rep = 1,min = 18, max = 40},
["smiley_tabs"] = {rep = 1,min = 18, max = 40},
["cupoflean"] = {rep = 1,min = 18, max = 40},
["cupofdextro"] = {rep = 1,min = 18, max = 40},
}
lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, cb) lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
local AvailableDrugs = {} local Player = getPlayer(source)
local Player = QBCore.Functions.GetPlayer(source) local rep = getRep(source, 'cornerselling')
if not Player then return nil end if not Player then return nil end
local type = 0 local type = 0
for k in pairs(QBConfig.DrugsPrice) do for k, v in pairs(Drugs) do
local item = Player.Functions.GetItemByName(k) local item = Player.Functions.GetItemByName(k)
if item and type == 0 then if item and type == 0 then
type = type + 1 type = type + 1
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Allowed To Sell ' .. item.name .. '!' , 'cornerselling') Log(GetName(source) .. ' Allowed To Sell ' .. item.name .. '!' , 'cornerselling')
return item.name, item.amount local amount = math.random(1,item.amount)
if amount >= 15 then amount = 15 end
local price = math.random(Drugs[k]['min'], Drugs[k]['max']) * amount
local result = math.floor(price * rep.price)
table.insert(DrugDeals, {item = item.name, amount = amount, price = result, cid = Player.PlayerData.citizenid, ped = ped})
return {item = item.name, amount = amount, price = result, ped = ped}
end end
end end
if type == 0 then if type == 0 then
return 'nothing', 0 return {item = 'nothing', amount = 0, price = 0, ped = ped}
end end
end) end)
lib.callback.register('md-drugs:server:hasDrugs', function(source)
local Player = getPlayer(source)
for k, v in pairs(Drugs) do
local item = Player.Functions.GetItemByName(k)
if item then
return true
end
end
return false
end)
RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price) RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local isIn = false
if RemoveItem(item, amount) then for k, v in pairs (Drugs) do
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling') if item == k then
if QBConfig.MarkedBills then isIn = true
if price >= QBConfig.DrugsPrice[item]['min'] * amount and price <= QBConfig.DrugsPrice[item]['max'] * amount then
local info = {
worth = price
}
Player.Functions.AddItem('markedbills', 1, false, info )
end
elseif QBConfig.CustomDirtyMoney then
Player.Functions.AddItem(QBConfig.CustomDirtyMoneyitem,price)
else
Player.Functions.AddMoney('cash', price)
end end
end end
if not isIn then return end
for k, v in pairs (DrugDeals) do
if v.cid == Player.PlayerData.citizenid then
if v.item == item then
if v.amount == amount then
if v.price == price then
if RemoveItem(src, item, amount) then
if QBConfig.MarkedBills then
local info = {
worth = price
}
Player.Functions.AddItem('markedbills', 1, false, info )
elseif QBConfig.CustomDirtyMoney == true then
AddItem(src, QBConfig.CustomDirtyMoneyitem, price)
else
Player.Functions.AddMoney('cash', price)
end
AddRep(src, 'cornerselling', Drugs[item].rep * amount)
Log(GetName(src) .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling')
table.remove(DrugDeals, k)
end
end
end
end
end
end
end) end)
RegisterNetEvent('md-drugs:server:robCornerDrugs', function(drugType, amount)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local availableDrugs = getAvailableDrugs(src)
if not availableDrugs or not Player then return end
local item = availableDrugs[drugType].item
Player.Functions.RemoveItem(item, amount)
table.insert(StolenDrugs, {item = item, amount = amount})
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "remove", amount)
TriggerClientEvent('md-drugs:client:refreshAvailableDrugs', src, getAvailableDrugs(src))
end)
lib.addCommand('cornersell', { lib.addCommand('cornersell', {
help = 'Sell Things On The Corner', help = 'Sell Things On The Corner',
params = { params = {
}, },
}, function(source, args, raw) }, function(source, args, raw)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(source) local Player = getPlayer(src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Used Command cornersell!' , 'cornerselling') Log(GetName(source) .. ' Used Command cornersell!' , 'cornerselling')
TriggerClientEvent('md-drugs:client:cornerselling', src) TriggerClientEvent('md-drugs:client:cornerselling', src)
end) end)
RegisterServerEvent('md-drugs:server:cornerselling:stop', function()
local src = source
local Player = getPlayer(src)
for k, v in pairs (DrugDeals) do
if v.cid == Player.PlayerData.citizenid then
TriggerClientEvent('md-drugs:client:cornerselling:remove', src, DrugDeals[k].ped)
table.remove(DrugDeals, k)
end
end
end)
+55 -81
View File
@@ -1,88 +1,62 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:makecrackone', function(num) RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) local count,type, tier = 0, 'cookcrack', 'tier1'
if CheckDist(source, playerPed, Config.makecrack[num]['loc']) then end if not checkLoc(src, 'makecrack', num) then return end
if not Itemcheck(Player, 'bakingsoda', 1, 'true') then return end if Config.TierSystem then
if Config.TierSystem then local crackTiers = {
local locoke = Player.Functions.GetItemByName('loosecoke') {item = 'loosecoke', tier = 'tier1', log = ' Cut Crack'},
local locoke2 = Player.Functions.GetItemByName('loosecokestagetwo') {item = 'loosecokestagetwo', tier = 'tier2', log = ' Cut Crack tier 2'},
local locoke3 = Player.Functions.GetItemByName('loosecokestagethree') {item = 'loosecokestagethree', tier = 'tier3', log = ' Cut Crack tier 3'}
if locoke then }
RemoveItem('loosecoke', 1 ) for _, v in ipairs(crackTiers) do
RemoveItem('bakingsoda', 1) if count >= 1 then break end
AddItem('crackrock', 1) if Player.Functions.GetItemByName(v.item) then
Notifys(Lang.Crack.makecrack, "success") tier = v.tier
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack') count = count + 1
elseif locoke2 then end
RemoveItem('loosecokestagetwo', 1 ) end
RemoveItem('bakingsoda', 1) end
AddItem('crackrockstagetwo', 1) if not GetRecipe(src, 'crack', type, tier) then return end
Notifys(Lang.Crack.makecrack, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack')
elseif locoke3 then
RemoveItem('loosecokestagethree', 1 )
RemoveItem('bakingsoda', 1)
AddItem('crackrockstagethree', 1)
Notifys(Lang.Crack.makecrack, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack')
else
Notifys(Lang.Crack.nocoke, 'error')
end
else
if RemoveItem('loosecoke', 1 ) then
RemoveItem('bakingsoda', 1)
AddItem('crackrock', 1)
Notifys(Lang.Crack.makecrack, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack')
else
Notifys(Lang.Crack.nocoke, 'error')
end
end
end) end)
RegisterServerEvent('md-drugs:server:bagcrack', function(num) RegisterServerEvent('md-drugs:server:bagcrack', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) local count,type, tier = 0, 'bagcrack', 'tier1'
if CheckDist(source, playerPed, Config.bagcrack[num]['loc']) then return end if not checkLoc(src, 'bagcrack', num) then return end
if not Itemcheck(Player, 'empty_weed_bag', 1, 'true') then return end if Config.TierSystem then
if Config.TierSystem then local crackTiers = {
local rock = Player.Functions.GetItemByName('crackrock') {item = 'crackrock', tier = 'tier1', log = ' Bagged Crack'},
local rock2 = Player.Functions.GetItemByName('crackrockstagetwo') {item = 'crackrockstagetwo', tier = 'tier2', log = ' Bagged Crack tier 2'},
local rock3 = Player.Functions.GetItemByName('crackrockstagethree') {item = 'crackrockstagethree', tier = 'tier3', log = ' Bagged Crack tier 3'}
if rock then }
RemoveItem('crackrock', 1 ) for _, v in ipairs(crackTiers) do
RemoveItem('empty_weed_bag', 1) if count >= 1 then break end
AddItem('baggedcracked', 1) if Player.Functions.GetItemByName(v.item) then
Notifys(Lang.Crack.makecrack, "success") tier = v.tier
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') count = count + 1
elseif rock2 then end
RemoveItem('crackrockstagetwo', 1 ) end
RemoveItem('empty_weed_bag', 1) end
AddItem('baggedcrackedstagetwo', 1) if not GetRecipe(src, 'crack', type, tier) then return end
Notifys(Lang.Crack.makecrack, "success") end)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack')
elseif rock3 then local cokecut = {crackrockstagetwo = 2, crackrockstagethree = 3}
RemoveItem('crackrockstagethree', 1 ) for k, v in pairs (cokecut) do
RemoveItem('empty_weed_bag', 1) CUI(k, function(source, item)
AddItem('baggedcrackedstagethree', 1) local src = source
Notifys(Lang.Crack.makecrack, "success") local Player = getPlayer(src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') if Player.Functions.GetItemByName(item.name) then
else if not Itemcheck(src, 'bakingsoda', 1) then return end
Notifys(Lang.Crack.nocoke, "error") local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting Crack Rock Further')
if not check then return end
if RemoveItem(src, k, 1) and RemoveItem(src, 'bakingsoda', 1) then
AddItem(src, 'crackrock', v)
end
end end
else end)
if RemoveItem('crackrock', 1 ) then end
RemoveItem('empty_weed_bag', 1)
AddItem('baggedcracked', 1)
Notifys(Lang.Crack.makecrack, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack')
else
Notifys(Lang.Crack.nocoke, "error")
end
end
end)
+180 -212
View File
@@ -1,241 +1,209 @@
QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
-- Functions local dloc = {
exports('GetDealers', function() {coords = vector4(282.48, -1814.32, 27.23, 145.11)},
return QBConfig.Dealers {coords = vector4(-296.11, -1300.65, 31.31, 270.87)},
end) {coords = vector4(-36.64, -1492.04, 31.22, 151.91)},
{coords = vector4(282.48, -1814.32, 27.23, 232.19)},
-- Callbacks {coords = vector4(54.54, -1873.22, 22.81, 131.47)},
QBCore.Functions.CreateCallback('md-drugs:server:RequestConfig', function(_, cb) {coords = vector4(-269.34, -2437.25, 6.40, 252.67)},
cb(QBConfig.Dealers) {coords = vector4(269.19, -3248.55, 5.79, 252.67)},
end) {coords = vector4(632.94, -3015.44, 7.34, 3.44)},
{coords = vector4(1049.55, -2427.88, 30.30, 79.52)},
-- Events {coords = vector4(853.16, -2207.32, 30.68, 284.88)},
RegisterNetEvent('md-drugs:server:updateDealerItems', function(itemData, amount, dealer) {coords = vector4(903.10, -1721.98, 32.25, 168.71)},
local src = source {coords = vector4(1289.30, -1710.49, 55.48, 208.57)},
local Player = QBCore.Functions.GetPlayer(src) {coords = vector4(1412.01, -1490.53, 60.66, 132.46)},
{coords = vector4(734.26, -1311.26, 27.01, 102.99)},
if not Player then return end {coords = vector4(1231.60, -1083.06, 38.53, 102.99)},
{coords = vector4(1143.55, -1000.19, 45.32, 257.05)},
if QBConfig.Dealers[dealer]["products"][itemData.slot].amount - 1 >= 0 then {coords = vector4(1264.82, -702.87, 64.72, 257.05)},
QBConfig.Dealers[dealer]["products"][itemData.slot].amount = QBConfig.Dealers[dealer]["products"][itemData.slot].amount - amount {coords = vector4(1119.65, -639.76, 56.81, 284.53)},
TriggerClientEvent('md-drugs:client:setDealerItems', -1, itemData, amount, dealer) {coords = vector4(1129.59, -462.59, 66.49, 79.23)},
{coords = vector4(42.80, -811.45, 31.43, 79.23)},
{coords = vector4(-509.48, -1001.66, 23.55, 79.23)},
{coords = vector4(-830.97, -862.41, 20.69, 13.72)},
{coords = vector4(-1320.26, -1177.34, 4.89, 74.29)},
{coords = vector4(-1097.63, -1673.24, 8.40, 136.51)},
{coords = vector4(-1147.61, -1452.10, 4.60, 51.50)},
{coords = vector4(-1241.69, -1208.39, 8.52, 107.56)},
{coords = vector4(-1876.92, -584.44, 11.85, 329.54)},
{coords = vector4(-1303.94, -441.39, 35.22, 128.73)},
{coords = vector4(-1705.48, -433.46, 42.17, 128.73)},
{coords = vector4(-1305.99, 336.35, 65.50, 35.13)},
{coords = vector4(-741.80, 484.84, 109.47, 110.85)},
{coords = vector4(-409.57, 341.49, 108.91, 270.45)},
{coords = vector4(-126.44, 588.18, 204.71, 8.12)},
{coords = vector4(211.42, -101.42, 73.28, 174.10)},
{coords = vector4(490.61, -95.04, 66.44, 273.57)},
{coords = vector4(387.19, -993.59, 29.42, 273.57)},
{coords = vector4(-500.47, -712.37, 33.21, 273.57)},
{coords = vector4(2572.20, 479.97, 108.68, 80.27)},
{coords = vector4(-430.10, 1205.41, 325.76, 169.25)},
{coords = vector4(-126.06, 1896.58, 197.33, 169.25)},
{coords = vector4(-2521.08, 2310.31, 33.22, 276.87)},
{coords = vector4(1129.01, 2125.14, 55.55, 276.87)},
{coords = vector4(1546.64, 2166.56, 78.72, 100.37)},
{coords = vector4(404.34, 2584.54, 43.52, 100.37)},
{coords = vector4(180.15, 2792.99, 45.66, 283.04)},
{coords = vector4(287.67, 2843.89, 44.70, 118.41)},
{coords = vector4(2030.23, 3184.42, 45.13, 146.06)},
{coords = vector4(2175.33, 3321.92, 46.13, 214.53)},
{coords = vector4(2389.61, 3340.98, 47.34, 214.52)},
{coords = vector4(1716.25, 3295.08, 41.26, 196.21)},
{coords = vector4(1779.38, 3640.83, 34.50, 24.16)},
{coords = vector4(1894.59, 3715.34, 32.75, 127.89)},
{coords = vector4(1861.90, 3857.15, 36.27, 293.45)},
{coords = vector4(996.38, 3575.07, 34.61, 328.30)},
{coords = vector4(387.45, 3584.73, 33.29, 351.41)},
{coords = vector4(68.08, 3693.22, 40.66, 63.98)},
{coords = vector4(15.55, 3688.70, 39.81, 230.89)},
{coords = vector4(2566.59, 4283.34, 41.97, 348.53)},
{coords = vector4(2570.82, 4667.95, 34.08, 135.30)},
{coords = vector4(2882.05, 4511.72, 48.02, 66.58)},
{coords = vector4(2243.78, 5154.02, 57.89, 139.42)},
{coords = vector4(1642.91, 4846.08, 45.51, 109.83)},
{coords = vector4(1308.87, 4362.17, 41.55, 256.01)},
{coords = vector4(-1090.27, 4940.57, 214.13, 256.01)},
{coords = vector4(-552.37, 5348.37, 74.76, 62.18)},
{coords = vector4(-679.02, 5834.27, 17.33, 137.18)},
{coords = vector4(-481.97, 6276.93, 13.35, 323.16)},
{coords = vector4(-24.92, 6472.60, 31.49, 144.42)},
{coords = vector4(36.03, 6549.18, 31.43, 287.85)},
{coords = vector4(406.08, 6526.43, 27.75, 97.45)},
{coords = vector4(1522.39, 6329.23, 24.61, 331.71)},
{coords = vector4(1741.39, 6419.62, 35.04, 331.71)},
{coords = vector4(3426.72, 5174.42, 7.40, 112.64)},
{coords = vector4(2525.99, 2586.62, 38.94, 257.02)},
{coords = vector4(2696.29, 1664.44, 24.52, 70.12)},
{coords = vector4(106.24, -1280.32, 29.24, 350.89)},
{coords = vector4(223.98, 121.53, 102.76, 259.68)},
{coords = vector4(102.19, -255.02, 50.05, 83.59)},
}
lib.callback.register('md-drugs:server:getDealers', function(data)
local check = MySQL.query.await('SELECT * FROM dealers', {})
local loc = json.encode({x = 899.98, y = -2603.24, z = 6.11, h = 176.12 })
if not check[1] then
MySQL.insert('INSERT INTO dealers SET name = ?, coords = ?, time = ?, createdby = ?', {'MD', loc, 'any', 'code Newb'})
Wait(2000)
local check2 = MySQL.query.await('SELECT * FROM dealers', {})
return check2
else else
Player.Functions.RemoveItem(itemData.name, amount) return check
Player.Functions.AddMoney('cash', amount * QBConfig.Dealers[dealer]["products"][itemData.slot].price)
TriggerClientEvent("QBCore:Notify", src, "none Left", "error")
end end
end) end)
RegisterNetEvent('md-drugs:server:giveDeliveryItems', function(deliveryData)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local item = QBConfig.DeliveryItems[deliveryData.item].item
if Player.Functions.AddItem(item, deliveryData.amount) then local DeliveryItems = {
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "add") { item = "weed_brick", minrep = 0, payout = {min = 10, max = 50}},
end { item = "coke_brick", minrep = 0, payout = {min = 10, max = 50}},
end) }
RegisterNetEvent('md-drugs:server:successDelivery', function(deliveryData, inTime) lib.callback.register('md-drugs:server:GetDeliveryItem', function(data)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local item = QBConfig.DeliveryItems[deliveryData.item].item local itemnum = math.random(1, #DeliveryItems)
local itemAmount = deliveryData.amount local item = DeliveryItems[itemnum].item
local payout = deliveryData.itemData.payout * itemAmount local amount = math.random(1,4)
local copsOnline = QBCore.Functions.GetDutyCount('police') local check = MySQL.query.await('SELECT * FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid})
local curRep = Player.PlayerData.metadata["dealerrep"] local locnum = math.random(1, #dloc)
local invItem = Player.Functions.GetItemByName(item) local coord = json.encode({
x = dloc[locnum].coords.x,
y = dloc[locnum].coords.y,
if inTime then z = dloc[locnum].coords.z ,
if invItem and invItem.amount >= itemAmount then -- on time correct amount w = dloc[locnum].coords.w
Player.Functions.RemoveItem(item, itemAmount) })
if copsOnline > 0 then if not check[1] then
local copModifier = copsOnline * QBConfig.PoliceDeliveryModifier MySQL.insert('INSERT INTO deliveriesdealer SET cid = ?, itemdata = ?, timestart = ?, maxtime = ?, location = ?',
if QBConfig.UseMarkedBills then {Player.PlayerData.citizenid, json.encode({item = item, amount = amount}), os.time(), os.time() + (15 * 60), coord })
local info = {worth = math.floor(payout * copModifier)} AddItem(Player.PlayerData.source, item, amount)
Player.Functions.AddItem('markedbills', 1, false, info) return true, item, amount, coord
else
Player.Functions.AddMoney('cash', math.floor(payout * copModifier), 'drug-delivery')
end
else
if QBConfig.UseMarkedBills then
local info = {worth = payout}
Player.Functions.AddItem('markedbills', 1, false, info)
else
Player.Functions.AddMoney('cash', payout, 'drug-delivery')
end
end
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "remove")
TriggerClientEvent('QBCore:Notify', src, "You Got There In Time!", 'success')
SetTimeout(math.random(5000, 10000), function()
TriggerClientEvent('md-drugs:client:sendDeliveryMail', src, 'perfect', deliveryData)
Player.Functions.SetMetaData('dealerrep', (curRep + QBConfig.DeliveryRepGain))
end)
else
TriggerClientEvent('QBCore:Notify', src, "Wheres The Rest Of It", 'error')-- on time incorrect amount
if invItem then
local newItemAmount = invItem.amount
local modifiedPayout = deliveryData.itemData.payout * newItemAmount
Player.Functions.RemoveItem(item, newItemAmount)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "remove")
Player.Functions.AddMoney('cash', math.floor(modifiedPayout / QBConfig.WrongAmountFee))
end
SetTimeout(math.random(5000, 10000), function()
TriggerClientEvent('md-drugs:client:sendDeliveryMail', src, 'bad', deliveryData)
if curRep - 1 > 0 then
Player.Functions.SetMetaData('dealerrep', (curRep - QBConfig.DeliveryRepLoss))
else
Player.Functions.SetMetaData('dealerrep', 0)
end
end)
end
else else
if invItem and invItem.amount >= itemAmount then -- late correct amount local time = os.time()
TriggerClientEvent('QBCore:Notify', src, "Where Were You Slow Ass", 'error') local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
Player.Functions.RemoveItem(item, itemAmount)
Player.Functions.AddMoney('cash', math.floor(payout / QBConfig.OverdueDeliveryFee), "delivery-drugs-too-late") if timeout > 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) Notifys(src, 'You Failed To Make It In Time!', 'error' ) return false end
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "remove") Notifys(src,'You Already Have A Delivery To Make', 'error' ) return false, item, amount, coord
SetTimeout(math.random(5000, 10000), function()
TriggerClientEvent('md-drugs:client:sendDeliveryMail', src, 'late', deliveryData)
if curRep - 1 > 0 then
Player.Functions.SetMetaData('dealerrep', (curRep - QBConfig.DeliveryRepLoss))
else
Player.Functions.SetMetaData('dealerrep', 0)
end
end)
else
if invItem then -- late incorrect amount
local newItemAmount = invItem.amount
local modifiedPayout = deliveryData.itemData.payout * newItemAmount
TriggerClientEvent('QBCore:Notify', src, "Late And Missing Product GZ You Suck", 'error')
Player.Functions.RemoveItem(item, itemAmount)
Player.Functions.AddMoney('cash', math.floor(modifiedPayout / QBConfig.OverdueDeliveryFee), "delivery-drugs-too-late")
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "remove")
SetTimeout(math.random(5000, 10000), function()
TriggerClientEvent('md-drugs:client:sendDeliveryMail', src, 'late', deliveryData)
if curRep - 1 > 0 then
Player.Functions.SetMetaData('dealerrep', (curRep - QBConfig.DeliveryRepLoss))
else
Player.Functions.SetMetaData('dealerrep', 0)
end
end)
end
end
end end
end) end)
-- Commands RegisterNetEvent('md-drugs:server:giveDeliveryItems', function(item, amount)
QBCore.Commands.Add("newdealer", "Place a dealer (Admin Only)", {{ name = "name", help = "Dealer name"}, { name = "min", help = "Minimum Time"}, {name = "max", help = "Maximum Time"}}, true, function(source, args) local src = source
local Player = getPlayer(src)
local check = MySQL.query.await('SELECT * FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid})
if not check[1] then return end
local time = os.time()
local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
local itemData = json.decode(check[1].itemdata)
if timeout >= 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) Notifys(source, 'You Failed To Make It In Time!', 'error' ) return end
if item ~= itemData.item then return end
if amount ~= itemData.amount then return end
if RemoveItem(src, item, amount) then
for k, v in pairs (DeliveryItems) do
if v.item == item then
local income = math.random(v.payout.min, v.payout.max)
Player.Functions.AddMoney('cash', income)
AddRep(src, 'dealerrep')
end
end
MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid})
end
end)
lib.addCommand("newdealer", {
help = "Place a dealer (Admin Only)",
params = {
{ name = "name", help = "Dealer Name", type = "string" },
{ name = "min", help = "Minimum Time", type = "number" },
{ name = "max", help = "Maximum Time", type = "number" }
},
restricted = "admin"
}, function(source, args)
local ped = GetPlayerPed(source) local ped = GetPlayerPed(source)
local coords = GetEntityCoords(ped) local coords = GetEntityCoords(ped)
local Player = QBCore.Functions.GetPlayer(source) local Player = getPlayer(source)
if not Player then return end if not Player then return end
local dealerName = args[1]
local minTime = tonumber(args[2]) local dealerName = args.name
local maxTime = tonumber(args[3])
local time = json.encode({min = minTime, max = maxTime})
local pos = json.encode({x = coords.x, y = coords.y, z = coords.z}) local pos = json.encode({x = coords.x, y = coords.y, z = coords.z})
local result = MySQL.scalar.await('SELECT name FROM dealers WHERE name = ?', {dealerName})
if result then return TriggerClientEvent('QBCore:Notify', source, "Already Exists", "error") end local result = MySQL.scalar.await('SELECT name FROM dealers WHERE name = ?', { dealerName })
MySQL.insert('INSERT INTO dealers (name, coords, time, createdby) VALUES (?, ?, ?, ?)', {dealerName, pos, time, Player.PlayerData.citizenid}, function() if result then
return Notifys(source,"Already Exists", "error")
end
MySQL.insert('INSERT INTO dealers (name, coords, time, createdby) VALUES (?, ?, ?, ?)', {
dealerName, pos, 'nil', Player.PlayerData.citizenid
}, function()
QBConfig.Dealers[dealerName] = { QBConfig.Dealers[dealerName] = {
["name"] = dealerName, name = dealerName,
["coords"] = { coords = {
["x"] = coords.x, x = coords.x,
["y"] = coords.y, y = coords.y,
["z"] = coords.z, z = coords.z,
h = GetEntityHeading(ped)
}, },
["time"] = {
["min"] = minTime,
["max"] = maxTime
},
["products"] = QBConfig.Products
} }
TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers) TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers)
end) end)
end, "admin") end)
lib.addCommand("deletedealer", {
help = "Delete a dealer (Admin Only)",
params = {
{ name = "name", help = "Dealer Name", type = "string" }
},
restricted = 'group.admin'
}, function(source, args)
local dealerName = args.name
local result = MySQL.scalar.await('SELECT * FROM dealers WHERE name = ?', { dealerName })
QBCore.Commands.Add("deletedealer", "Delete a dealer (Admin Only)", {{
name = "name",
help = "Dealer Name"
}}, true, function(source, args)
local dealerName = args[1]
local result = MySQL.scalar.await('SELECT * FROM dealers WHERE name = ?', {dealerName})
if result then if result then
MySQL.query('DELETE FROM dealers WHERE name = ?', {dealerName}) MySQL.query('DELETE FROM dealers WHERE name = ?', { dealerName })
QBConfig.Dealers[dealerName] = nil QBConfig.Dealers[dealerName] = nil
TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers) TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers)
TriggerClientEvent('QBCore:Notify', source, "Dealer Deleted" , "success") TriggerClientEvent('QBCore:Notify', source, "Dealer Deleted", "success")
else else
TriggerClientEvent('QBCore:Notify', source, "Who You Tryna Delete", "error") TriggerClientEvent('QBCore:Notify', source, "Who You Tryna Delete", "error")
end end
end, "admin")
QBCore.Commands.Add("dealers", "View all dealers (Admin Only)", {}, false, function(source, _)
local DealersText = ""
if QBConfig.Dealers ~= nil and next(QBConfig.Dealers) ~= nil then
for _, v in pairs(QBConfig.Dealers) do
DealersText = DealersText .. "Name: " .. v["name"] .. "<br>"
end
TriggerClientEvent('chat:addMessage', source, {
template = '<div class="chat-message advert"><div class="chat-message-body"><strong>' .."List Of Dealers " .. '</strong><br><br> ' .. DealersText .. '</div></div>',
args = {}
})
else
TriggerClientEvent('QBCore:Notify', source, "No Dealers", 'error')
end
end, "admin")
QBCore.Commands.Add("dealergoto", "Teleport to a dealer (Admin Only)", {{
name = "name",
help = "Dealer name"
}}, true, function(source, args)
local DealerName = tostring(args[1])
if QBConfig.Dealers[DealerName] then
local ped = GetPlayerPed(source)
SetEntityCoords(ped, QBConfig.Dealers[DealerName]['coords']['x'], QBConfig.Dealers[DealerName]['coords']['y'], QBConfig.Dealers[DealerName]['coords']['z'])
TriggerClientEvent('QBCore:Notify', source, "TelePorted", {dealerName = DealerName}, 'success')
else
TriggerClientEvent('QBCore:Notify', source, "Doesnt Exist", 'error')
end
end, "admin")
CreateThread(function()
Wait(500)
local dealers = MySQL.query.await('SELECT * FROM dealers', {})
if dealers[1] then
for _, v in pairs(dealers) do
local coords = json.decode(v.coords)
local time = json.decode(v.time)
QBConfig.Dealers[v.name] = {
["name"] = v.name,
["coords"] = {
["x"] = coords.x,
["y"] = coords.y,
["z"] = coords.z
},
["time"] = {
["min"] = time.min,
["max"] = time.max
},
["products"] = QBConfig.Products
}
end
end
TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers)
end)
RegisterServerEvent("md-drugs:server:Dealershop", function(amount, value, item, info)
local src = source local Player = QBCore.Functions.GetPlayer(src)
local balance = Player.Functions.GetMoney(tostring(value))
if Player.Functions.RemoveMoney(tostring(value), tonumber(info) * tonumber(amount)) then
TriggerClientEvent('inventory:client:ItemBox', src, item.name, "add", amount)
Player.Functions.AddItem(item, amount)
else
TriggerClientEvent('QBCore:Notify', source, "Can't give item!", "error")
end
end) end)
+262 -88
View File
@@ -1,5 +1,7 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local notify = Config.Notify -- qb or ox local notify = Config.Notify -- qb or ox
local inventory = Config.Inventory -- qb or ox
------------------------------------------ logging stuff
local logs = false local logs = false
local logapi = GetConvar("fivemerrLogs", "") local logapi = GetConvar("fivemerrLogs", "")
local endpoint = 'https://api.fivemerr.com/v1/logs' local endpoint = 'https://api.fivemerr.com/v1/logs'
@@ -20,6 +22,7 @@ else
print'^1 logs disabled for md-drugs' print'^1 logs disabled for md-drugs'
end end
end) end)
function Log(message, type) function Log(message, type)
if logs == false then return end if logs == false then return end
local buffer = { local buffer = {
@@ -42,19 +45,56 @@ if logs == false then return end
buffer = nil buffer = nil
end) end)
end end
---------------------------------------------------- inventory catcher
local invname = '' local invname = ''
CreateThread(function() CreateThread(function()
if GetResourceState('ps-inventory') == 'started' then if GetResourceState('ps-inventory') == 'started' then
invname = 'ps-inventory' invname = 'ps-inventory'
elseif GetResourceState('qb-inventory') == 'started' then elseif GetResourceState('qb-inventory') == 'started' then
invname = 'qb-inventory' invname = 'qb-inventory'
else else
invname = 'inventory' invname = 'inventory'
end
end)
------------------------------------ Player Stuff functions
function getPlayer(source)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
return Player
end end
end) function GetName(source)
local Player = getPlayer(source)
return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
end
function Notifys(text, type) function GetCoords(source)
local ped = GetPlayerPed(source)
local playerCoords = GetEntityCoords(ped)
return playerCoords
end
function dist(source, coords)
local playerPed = GetPlayerPed(source)
local pcoords = GetEntityCoords(playerPed)
local dist = #(pcoords - coords)
return dist
end
function CheckDist(source, coords)
local playerPed = GetPlayerPed(source)
local pcoords = GetEntityCoords(playerPed)
local ok
if #(pcoords - coords) < 4.0 then
return ok
else
DropPlayer(source, 'md-drugs: You Were A Total Of ' .. #(pcoords - coords) .. ' Too Far Away To Trigger This Event')
return false
end
end
function Notifys(source, text, type)
local src = source local src = source
if notify == 'qb' then if notify == 'qb' then
TriggerClientEvent("QBCore:Notify", src, text, type) TriggerClientEvent("QBCore:Notify", src, text, type)
@@ -63,94 +103,225 @@ function Notifys(text, type)
elseif notify == 'okok' then elseif notify == 'okok' then
TriggerClientEvent('okokNotify:Alert', src, '', text, 4000, type, false) TriggerClientEvent('okokNotify:Alert', src, '', text, 4000, type, false)
else else
print"dude, it literally tells you what to put in the config" print"^1 Look At The Config For Proper Alert Options"
end
end
function Itemcheck(Player, item, amount, notify)
local itemchecks = Player.Functions.GetItemByName(item)
local yes
if notify == nil then notify = false end
if itemchecks and itemchecks.amount >= amount then
yes = true return yes
else
if notify == 'true' then
Notifys('You Need ' .. amount .. ' Of ' .. QBCore.Shared.Items[item].label .. ' To Do this', 'error') return else end
end
end
function dist(source, Player, coords)
local pcoords = GetEntityCoords(Player)
local dist = #(pcoords - coords)
return dist
end
function CheckDist(source,Player, coords)
local pcoords = GetEntityCoords(Player)
local ok
if #(pcoords - coords) < 4.0 then
return ok
else
DropPlayer(source, 'Too Far') return end
end
function checkTable(player, table)
local need = 0
local have = 0
for k, v in pairs (table) do
need = need + 1
if Itemcheck(player, k, v, 'true') then have = have + 1 end
end
if need == have then
return true
else
end
end
function RemoveItem( item, amount)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if Player.Functions.RemoveItem(item, amount) then TriggerClientEvent(invname ..":client:ItemBox", src, QBCore.Shared.Items[item], "remove", amount) return true
else
Notifys('You Need ' .. amount .. ' Of ' .. QBCore.Shared.Items[item].label .. ' To Do This', 'error')
end end
end end
function AddItem(item, amount) function GetLabels(item)
local src = source if inventory == 'qb' then
local Player = QBCore.Functions.GetPlayer(src) return QBCore.Shared.Items[item].label
if Player.Functions.AddItem(item, amount) then TriggerClientEvent(invname ..":client:ItemBox", src, QBCore.Shared.Items[item], "add", amount) return true elseif inventory == 'ox' then
else local items = exports.ox_inventory:Items()
print('you sucks') return items[item].label
end end
end end
function Notifysu(text, type, source) function CUI(item, useFunction)
QBCore.Functions.CreateUseableItem(item, useFunction)
if notify == 'qb' then end
TriggerClientEvent("QBCore:Notify", source, text, type)
elseif notify == 'ox' then function Itemcheck(source, item, amount)
lib.notify(source, { title = text, type = type}) if inventory == 'qb' then
elseif notify == 'okok' then local Player = getPlayer(source)
TriggerClientEvent('okokNotify:Alert', source, '', text, 4000, type, false) local itemchecks = Player.Functions.GetItemByName(item)
if itemchecks and itemchecks.amount >= amount then
return true
else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do this', 'error')
return false
end
elseif inventory == 'ox' then
local items = exports.ox_inventory:GetItem(source, item, nil, false)
if items.count >= amount then
return true
else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
return false
end
end
end
function RemoveItem(source, item, amount)
if inventory == 'qb' then
local Player = getPlayer(source)
if Player.Functions.RemoveItem(item, amount) then
TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "remove", amount)
return true
else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
end
elseif inventory == 'ox' then
if exports.ox_inventory:RemoveItem(source, item, amount) then
return true
else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
end
end
end
function AddItem(source, item, amount)
if inventory == 'qb' then
local Player = getPlayer(source)
if Player.Functions.AddItem(item, amount) then
TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "add", amount)
return true
else
print('Failed To Give Item: ' .. item .. ' Check Your qb-core/shared/items.lua')
return false
end
else else
print"dude, it literally tells you what to put in the config" local carry = exports.ox_inventory:CanCarryItem(source, item, amount)
end if not carry then Notifys(source, 'You Cant Carry that Much Weight!', 'error') return false end
end if exports.ox_inventory:AddItem(source, item, amount) then
return true
function RemoveItemu( item, amount, source) else
local Player = QBCore.Functions.GetPlayer(source) print('Failed To Give Item: ' .. item .. ' Check Your ox_inventory/data/items.lua')
if Player.Functions.RemoveItem(item, amount) then TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "remove", amount) return true return false
else end
Notifysu('You Need ' .. amount .. ' Of ' .. QBCore.Shared.Items[item].label .. ' To Do This', 'error', source)
end end
end end
function AddItemu(item, amount, source)
local Player = QBCore.Functions.GetPlayer(source) function getRep(source, type)
if Player.Functions.AddItem(item, amount) then TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "add", amount) return true local Player = getPlayer(source)
else local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
print('you sucks') if not sql[1] then
local table = json.encode({
coke = Player.PlayerData.metadata.coke or 0,
lsd = Player.PlayerData.metadata.lsd or 0,
heroin = Player.PlayerData.metadata.heroin or 0,
dealerrep = Player.PlayerData.metadata.dealerrep or 0,
cornerselling = {
price = QBConfig.SellLevel[1].price,
rep = 0,
label = QBConfig.SellLevel[1].label,
level = 1
}
})
MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
Wait(1000)
return json.decode(table)
else
local reps = json.decode(sql[1].drugrep)
local rep = ''
if reps.coke == nil then rep = reps[1] else rep = reps end
if type == 'coke' then
return rep.coke
elseif type == 'heroin' then
return rep.heroin
elseif type == 'lsd' then
return rep.lsd
elseif type == 'dealerrep' then
return rep.dealerrep
elseif type == 'cornerselling' then
return rep.cornerselling
else
print('^1 Error: No Valid Drug Rep Option Chosen')
end
return false
end end
end end
function GetAllRep(source)
local Player = getPlayer(source)
local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
if not sql[1] then
local table = json.encode({
coke = Player.PlayerData.metadata.coke or 0,
lsd = Player.PlayerData.metadata.lsd or 0,
heroin = Player.PlayerData.metadata.heroin or 0,
dealerrep = Player.PlayerData.metadata.dealerrep or 0,
cornerselling = {
price = QBConfig.SellLevel[1].price,
rep = 0,
label = QBConfig.SellLevel[1].label,
level = 1
}
})
MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
Wait(1000)
return json.decode(table)
else
local rep = json.decode(sql[1].drugrep)
if rep.coke == nil then return rep[1] end
return rep
end
end
function AddRep(source, type, amount)
if not amount then amount = 1 end
local Player = getPlayer(source)
local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
local reps = json.decode(sql[1].drugrep)
local update
local rep = ''
if reps.coke == nil then rep = reps[1] else rep = reps end
if type == 'cornerselling' then
for k, v in pairs (QBConfig.SellLevel) do
if rep.cornerselling.level == k then
if rep.cornerselling.rep + amount >= v.maxrep then
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = {label = v.label, price = v.price, rep = rep.cornerselling.rep + amount, level = k + 1}})
else
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = {label = v.label, price = v.price, rep = rep.cornerselling.rep + amount, level = k}})
end
end
end
elseif type == 'coke' then
update = json.encode({coke = rep.coke + amount, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
elseif type == 'heroin' then
update = json.encode({coke = rep.coke, heroin = rep.heroin + amount, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
elseif type == 'lsd' then
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd +amount , dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
elseif type == 'dealerrep' then
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep + amount, cornerselling = rep.cornerselling})
end
if update == '' then return false end
MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, Player.PlayerData.citizenid})
return true
end
lib.addCommand('addCornerSellingTOREP', {
help = 'RUN THIS ONCE AND DELETE',
restricted = 'group.admin'
}, function(source, args, raw)
local sql = MySQL.query.await('SELECT * FROM drugrep', {})
for k, v in pairs (sql) do
local new = {}
local old = json.decode(v.drugrep)
local get = old[1] or old
table.insert(new, {
coke = get.coke,
lsd = get.lsd,
heroin = get.heroin,
dealerrep = get.dealerrep,
cornerselling = {
price = QBConfig.SellLevel[1].price,
rep = 0,
label = QBConfig.SellLevel[1].label,
level = 1
}
})
local news = json.encode(new)
MySQL.query.await('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {news, v.cid})
end
end)
function sortTab(tbl, type)
table.sort(tbl, function(a, b)
return a[type] < b[type]
end)
end
function getCops()
local amount = 0
local players = QBCore.Functions.GetQBPlayers()
for k, v in pairs(players) do
if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
amount = amount + 1
end
end
return amount
end
lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args) lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
local amount = 0 local amount = 0
@@ -163,14 +334,18 @@ lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
return amount return amount
end) end)
lib.callback.register('md-drugs:server:GetRep', function(source, cb, args)
local src = source
local rep = GetAllRep(source)
return rep
end)
CreateThread(function() CreateThread(function()
if not GetResourceState('ox_lib'):find("start") then if not GetResourceState('ox_lib'):find("start") then
print('^1 ox_lib Is A Depndancy, Not An Optional ') print('^1 ox_lib Is A Depndancy, Not An Optional ')
end end
if Config.minigametype == 'ps' and not GetResourceState('ps-ui'):find("start") then
print('^1 You Have Config.minigametype as ps but dont have ps-ui started')
end
end) end)
CreateThread(function() CreateThread(function()
local url = "https://raw.githubusercontent.com/Mustachedom/md-drugs/main/version.txt" local url = "https://raw.githubusercontent.com/Mustachedom/md-drugs/main/version.txt"
local version = GetResourceMetadata('md-drugs', "version" ) local version = GetResourceMetadata('md-drugs', "version" )
@@ -180,4 +355,3 @@ CreateThread(function()
end end
end, "GET", "", "") end, "GET", "", "")
end) end)
+138 -178
View File
@@ -1,292 +1,252 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
GlobalState.PoppyPlants = Config.PoppyPlants local prices = {
heroinlabkitprice = 10000
}
local heroinLabKits = {}
local h = {
{ location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = "prop_plant_01b"},
}
GlobalState.PoppyPlants = h
Citizen.CreateThread(function() Citizen.CreateThread(function()
for _, v in pairs(Config.PoppyPlants) do for _, v in pairs(h) do
v.taken = false v.taken = false
end end
end) end)
function heroinCooldown(loc) function heroinCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
Config.PoppyPlants[loc].taken = false h[loc].taken = false
GlobalState.PoppyPlants = Config.PoppyPlants GlobalState.PoppyPlants = h
Wait(1000) Wait(1000)
TriggerClientEvent('heroin:respawnCane', -1, loc) TriggerClientEvent('heroin:respawnCane', -1, loc)
Log('Heroin Plant Respawned At ' .. Config.PoppyPlants[loc].location, 'heroin') Log('Heroin Plant Respawned At ' .. h[loc].location, 'heroin')
end) end)
end end
RegisterServerEvent('md-drugs:server:removecleaningkitheroin', function(data) lib.callback.register('removeCleaningkit', function(source)
local src = source local Player = getPlayer(source)
local Player = QBCore.Functions.GetPlayer(src) for k, v in pairs(heroinLabKits) do
if v.ownerid == Player.PlayerData.citizenid then
if RemoveItem("cleaningkit", 1) then RemoveItem(source, 'cleaningkit', 1)
Notifys("Cleaned It Perfectly", "success") return true
TriggerClientEvent("md-drugs:client:deletedirtyheroin", src, data) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wiped Down Their Heroin Lab Kit!' , 'heroin')
else
Notifys("You cant clean it with spit alone", "error")
end end
return false
end) end)
RegisterServerEvent("heroin:pickupCane", function(loc) RegisterServerEvent("heroin:pickupCane", function(loc)
local playerPed = GetPlayerPed(source) if CheckDist(source, h[loc].location) then return end
if CheckDist(source, playerPed, Config.PoppyPlants[loc].location) then return end if not h[loc].taken then
if not Config.PoppyPlants[loc].taken then h[loc].taken = true
Config.PoppyPlants[loc].taken = true GlobalState.PoppyPlants = h
GlobalState.PoppyPlants = Config.PoppyPlants
TriggerClientEvent("heroin:removeCane", -1, loc) TriggerClientEvent("heroin:removeCane", -1, loc)
heroinCooldown(loc) heroinCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source) AddItem(source, 'poppyresin', 1)
AddItem('poppyresin', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Poppies With a distance of ' .. dist(source, playerPed, Config.PoppyPlants[loc].location) .. ' vectors', 'heroin')
end end
end) end)
RegisterServerEvent('md-drugs:server:dryplant', function(num) RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(source, 'dryplant', num) then return end
local playerPed = GetPlayerPed(source) if not Itemcheck(source, 'poppyresin', 1) then return end
if CheckDist(source, playerPed, Config.dryplant[num]['loc']) then return end
if not Itemcheck(Player, 'poppyresin', 1, 'true') then return end
if Config.TierSystem then if Config.TierSystem then
local heroin = Player.PlayerData.metadata['heroin'] local heroin = getRep(src, 'heroin')
if heroin <= Config.Tier1 then if heroin <= Config.Tier1 then
if RemoveItem("poppyresin", 1) then if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
AddItem("heroin", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin')
end
elseif heroin >= Config.Tier1 and heroin <= Config.Tier2 then elseif heroin >= Config.Tier1 and heroin <= Config.Tier2 then
if RemoveItem("poppyresin", 1) then if not GetRecipe(src, 'heroin', 'dryheroin', 'tier2') then return end
AddItem("heroinstagetwo", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder Tier 2 With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin')
end
else else
if RemoveItem("poppyresin", 1) then if not GetRecipe(src, 'heroin', 'dryheroin', 'tier3') then return end
AddItem("heroinstagethree", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder Tier 3 With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin')
end
end end
else else
if RemoveItem("poppyresin", 1) then if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
AddItem("heroin", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin')
end
end end
end) end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num) RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(source, 'cutheroinone', num) then return end
if CheckDist(source, playerPed, Config.cutheroinone[num]['loc']) then return end if not Itemcheck(src, 'bakingsoda', 1) then return end
if not Itemcheck(Player, 'bakingsoda', 1, 'true') then return end
if Config.TierSystem then if Config.TierSystem then
local rawh = Player.Functions.GetItemByName('heroin') local rawh = Player.Functions.GetItemByName('heroin')
local rawh2 = Player.Functions.GetItemByName('heroinstagetwo') local rawh2 = Player.Functions.GetItemByName('heroinstagetwo')
local rawh3 = Player.Functions.GetItemByName('heroinstagethree') local rawh3 = Player.Functions.GetItemByName('heroinstagethree')
if rawh then if rawh then
RemoveItem('heroin', 1 ) if not GetRecipe(src, 'heroin', 'cutheroin', 'tier1') then return end
RemoveItem('bakingsoda', 1 )
AddItem('heroincut',1)
Notifys(Lang.Heroin.cutheroin, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin')
elseif rawh2 then elseif rawh2 then
RemoveItem('heroinstagetwo', 1 ) if not GetRecipe(src, 'heroin', 'cutheroin', 'tier2') then return end
RemoveItem('bakingsoda', 1 )
AddItem('heroincutstagetwo', 1)
Notifys(Lang.Heroin.cutheroin, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin Tier 2 With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin')
elseif rawh3 then elseif rawh3 then
RemoveItem('heroinstagethree', 1 ) if not GetRecipe(src, 'heroin', 'cutheroin', 'tier3') then return end
RemoveItem('bakingsoda', 1 )
AddItem('heroincutstagethree', 1)
Notifys(Lang.Heroin.cutheroin, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin Tier 3 With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin')
else else
Notifys(Lang.Heroin.noheroin, "error") Notifys(src, Lang.Heroin.noheroin, "error")
end end
else else
if RemoveItem('heroin', 1 ) then if not GetRecipe(src, 'heroin', 'cutheroin', 'tier1') then return end
RemoveItem('bakingsoda', 1 )
AddItem('heroincut',1)
Notifys(Lang.Heroin.cutheroin, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin')
else
Notifys(Lang.Heroin.noheroin, "error")
end
end end
end) end)
RegisterServerEvent('md-drugs:server:getheroinlabkit', function() RegisterServerEvent('md-drugs:server:getheroinlabkit', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(source, 'singleSpot', 'buyheroinlabkit') then return end
local has = Player.Functions.GetItemByName('heroinlabkit')
if CheckDist(source, playerPed, vector3(Config.buyheroinlabkit.x,Config.buyheroinlabkit.y,Config.buyheroinlabkit.z)) then return end if has then Notifys(src, Lang.Heroin.haskit, 'error') return end
if Player.Functions.RemoveMoney('cash', Config.heroinlabkitprice) then if Player.Functions.RemoveMoney('cash', prices.heroinlabkitprice) then
AddItem('heroinlabkit', 1) AddItem(src, 'heroinlabkit', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A Heroin lab Kit ' .. dist(source, playerPed, vector3(Config.buyheroinlabkit.x,Config.buyheroinlabkit.y,Config.buyheroinlabkit.z)) .. ' vectors', 'heroin')
else else
Notifys('You Need '.. Config.heroinlabkitprice .. ' In Cash For This', 'error') Notifys(src, 'You Need '.. prices.heroinlabkitprice .. ' In Cash For This', 'error')
end end
end) end)
local function hasHKit(src)
local src = source
local Player = getPlayer(src)
for k, v in pairs(heroinLabKits) do
if v.ownerid == Player.PlayerData.citizenid then
return true
end
end
return false
end
RegisterServerEvent('md-drugs:server:getheroinlabkitback', function() RegisterServerEvent('md-drugs:server:getheroinlabkitback', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not hasHKit(src) then return end
if Player.Functions.AddItem("heroinlabkit", 1) then for k, v in pairs (heroinLabKits) do
Notifys('You Got Your Lab Kit Back', 'Success') if v.ownerid == Player.PlayerData.citizenid then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Up Their Heroin Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'heroin') table.remove(heroinLabKits, k)
end AddItem(src, 'heroinlabkit', 1)
end) end
QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local playerPed = GetPlayerPed(src)
if not Itemcheck(Player, 'heroinlabkit', 1, 'true') then return end
if TriggerClientEvent("md-drugs:client:setheroinlabkit", src) then
Player.Functions.RemoveItem("heroinlabkit", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed Their Heroin Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'heroin')
end end
end) end)
CUI('heroinlabkit', function(source, item)
local src = source
local Player = getPlayer(src)
if not Itemcheck(source, 'heroinlabkit', 1) then return end
local placed, loc = lib.callback.await('md-drugs:client:setheroinlabkit', src)
if placed then
RemoveItem(src, 'heroinlabkit', 1)
table.insert(heroinLabKits, {
src = src,
ownerid = Player.PlayerData.citizenid,
coords = loc,
name = GetName(src)
})
Notifys(src, Lang.Heroin.placed, "success")
end
end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function() RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if not Itemcheck(Player, 'emptyvial', 1, 'true') then return end if not hasHKit(src) then return end
if not Itemcheck(source, 'emptyvial', 1) then return end
if Config.TierSystem then if Config.TierSystem then
local cuth = Player.Functions.GetItemByName('heroincut') local cuth = Player.Functions.GetItemByName('heroincut')
local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo') local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo')
local cuth3 = Player.Functions.GetItemByName('heroincutstagethree') local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
if cuth then if cuth then
RemoveItem('heroincut', 1) if not GetRecipe(src, 'heroin', 'fillvial', 'tier1') then return end
RemoveItem('emptyvial', 1)
AddItem('heroinvial', 1)
Notifys(Lang.Heroin.vial, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin', 'heroin')
elseif cuth2 then elseif cuth2 then
RemoveItem('heroincutstagetwo', 1) if not GetRecipe(src, 'heroin', 'fillvial', 'tier2') then return end
RemoveItem('emptyvial', 1)
AddItem('heroinvialstagetwo', 1)
Notifys(Lang.Heroin.vial, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin Tier 2', 'heroin')
elseif cuth3 then elseif cuth3 then
RemoveItem('heroincutstagethree', 1) if not GetRecipe(src, 'heroin', 'fillvial', 'tier3') then return end
RemoveItem('emptyvial', 1)
AddItem('heroinvialstagethree', 1)
Notifys(Lang.Heroin.vial, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin Tier 3', 'heroin')
else else
Notifys(Lang.Heroin.novial, "error") Notifys(src, 'no cut heroin', "error")
end end
else else
if RemoveItem('heroincut', 1) then if not GetRecipe(src, 'heroin', 'fillvial', 'tier1') then return end
RemoveItem('emptyvial', 1)
AddItem('heroinvial', 1)
Notifys(Lang.Heroin.vial, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin', 'heroin')
else
Notifys(Lang.Heroin.novial, "error")
end
end end
end) end)
RegisterServerEvent('md-drugs:server:failheatingheroin', function() RegisterServerEvent('md-drugs:server:failheatingheroin', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if not hasHKit(src) then return end
local cuth = Player.Functions.GetItemByName('heroincut') local cuth = Player.Functions.GetItemByName('heroincut')
local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo') local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo')
local cuth3 = Player.Functions.GetItemByName('heroincutstagethree') local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sucks And Burned Their Heroin', 'heroin')
if cuth then if cuth then
RemoveItem('heroincut', 1) RemoveItem(src, 'heroincut', 1)
Notifys(Lang.Heroin.fail, "error") Notifys(src,Lang.Heroin.fail, "error")
elseif cuth2 then elseif cuth2 then
RemoveItem('heroincutstagetwo', 1) RemoveItem(src, 'heroincutstagetwo', 1)
Notifys(Lang.Heroin.fail, "error") Notifys(src,Lang.Heroin.fail, "error")
elseif cuth3 then elseif cuth3 then
RemoveItem('heroincutstagethree', 1) RemoveItem(src, 'heroincutstagethree', 1)
Notifys(Lang.Heroin.fail, "error") Notifys(src,Lang.Heroin.fail, "error")
end end
end) end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num) RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(source, 'fillneedle', num) then return end
if CheckDist(source, playerPed, Config.fillneedle[num]['loc']) then return end if not Itemcheck(src, 'needle', 1) then return end
if not Itemcheck(Player, 'needle', 1, 'true') then return end
if Config.TierSystem then if Config.TierSystem then
local heroin = Player.PlayerData.metadata['heroin'] local heroin = getRep(src, 'heroin')
local vh = Player.Functions.GetItemByName('heroinvial') local vh = Player.Functions.GetItemByName('heroinvial')
local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo') local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo')
local vh3 = Player.Functions.GetItemByName('heroinvialstagethree') local vh3 = Player.Functions.GetItemByName('heroinvialstagethree')
if vh then if vh then
RemoveItem('heroinvial', 1 ) if not GetRecipe(src, 'heroin', 'fillneedle', 'tier1') then return end
RemoveItem('needle', 1) AddRep(src, 'heroin')
AddItem('heroin_ready', 1)
Player.Functions.SetMetaData('heroin', (heroin + 1))
Notifys(Lang.Heroin.fill, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin')
elseif vh2 then elseif vh2 then
RemoveItem('heroinvialstagetwo', 1 ) if not GetRecipe(src, 'heroin', 'fillneedle', 'tier2') then return end
RemoveItem('needle', 1) AddRep(src, 'heroin')
AddItem('heroin_readystagetwo', 1)
Player.Functions.SetMetaData('heroin', (heroin + 1))
Notifys(Lang.Heroin.fill, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin Tier 2 And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin')
elseif vh3 then elseif vh3 then
RemoveItem('heroinvialstagethree', 1 ) if not GetRecipe(src, 'heroin', 'fillneedle', 'tier3') then return end
RemoveItem('needle', 1) AddRep(src, 'heroin')
AddItem('heroin_readystagethree', 1)
Player.Functions.SetMetaData('heroin', (heroin + 1))
Notifys(Lang.Heroin.fill, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin Tier 3 And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin')
else else
Notifys(Lang.Heroin.nofill, "error") Notifys(src,Lang.Heroin.nofill, "error")
end end
else else
if RemoveItem('heroinvial', 1 ) then if not GetRecipe(src, 'heroin', 'fillneedle', 'tier1') then return end
RemoveItem('needle', 1)
AddItem('heroin_ready', 1)
Notifys(Lang.Heroin.fill, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin!' , 'heroin')
else
Notifys(Lang.Heroin.nofill, "error")
end
end end
end) end)
RegisterServerEvent('md-drugs:server:failheroin', function() RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sucks And Burned Their Heroin', 'heroin') Log(GetName(src) ..' Sucks And Burned Their Heroin', 'heroin')
if Config.TierSystem then if Config.TierSystem then
local vh = Player.Functions.GetItemByName('heroinvial') local vh = Player.Functions.GetItemByName('heroinvial')
local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo') local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo')
local vh3 = Player.Functions.GetItemByName('heroinvialstagethree') local vh3 = Player.Functions.GetItemByName('heroinvialstagethree')
if vh then RemoveItem('heroinvialstagethree', 1 ) if vh then RemoveItem(src, 'heroinvialstagethree', 1 )
elseif vh2 then RemoveItem('heroinvialstagetwo', 1) elseif vh2 then RemoveItem(src, 'heroinvialstagetwo', 1)
elseif vh3 then RemoveItem('heroinvial', 1) elseif vh3 then RemoveItem(src, 'heroinvial', 1)
end end
else else
RemoveItem('heroinvial', 1) RemoveItem(src, 'heroinvial', 1)
end end
end) end)
AddEventHandler('playerDropped', function()
local src = source
local Player = getPlayer(src)
for k, v in pairs(heroinLabKits) do
if v.src == src then
table.remove(heroinLabKits, k)
AddItem(src, 'heroinlabkit', 1)
end
end
end)
+12 -28
View File
@@ -1,43 +1,27 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:givelean', function() RegisterServerEvent('md-drugs:server:givelean', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local chance = math.random(1,100) local chance = math.random(1,100)
local amount = math.random(1,5) local amount = math.random(1,5)
if chance <= 50 then if chance <= 50 then
if AddItem('mdlean', amount) then if AddItem(source, 'mdlean', amount) then
Notifys(Lang.Lean.lean, "success") Notifys(Lang.Lean.lean, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Lean' , 'lean') Log(GetName(source) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
end end
else else
if AddItem('mdreddextro', amount) then if AddItem(source, 'mdreddextro', amount) then
Notifys(Lang.Lean.dextro, "success") Notifys(Lang.Lean.dextro, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean') Log(GetName(source) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
end end
end end
end) end)
local lean = {'mdlean', 'mdreddextro'}
for k, v in pairs (lean) do CUI('leancup', function(source, item)
QBCore.Functions.CreateUseableItem(v, function(source) if Itemcheck(source, 'leancup', 1) then
local src = source TriggerClientEvent('md-drugs:client:leancraft', source)
local Player = QBCore.Functions.GetPlayer(src)
if v == 'mdlean' then
if Player.Functions.GetItemByName('leancup') and Player.Functions.GetItemByName('sprunk') and Player.Functions.GetItemByName('mdlean') then
Player.Functions.RemoveItem('mdlean', 1 )
Player.Functions.RemoveItem('sprunk', 1 )
Player.Functions.RemoveItem('leancup', 1 )
Player.Functions.AddItem('cupoflean', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cup Of Lean' , 'lean')
end
else
if Player.Functions.GetItemByName('leancup') and Player.Functions.GetItemByName('sprunk') and Player.Functions.GetItemByName('mdreddextro') then
Player.Functions.RemoveItem('mdreddextro', 1 )
Player.Functions.RemoveItem('sprunk', 1 )
Player.Functions.RemoveItem('leancup', 1 )
Player.Functions.AddItem('cupofdextro', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cup Of Red Dextro' , 'lean')
end
end end
end) end)
end
RegisterServerEvent('md-drugs:server:finishcup', function(data)
if not GetRecipe(source, 'lean','cups', data.item) then return end
end)
+147
View File
@@ -0,0 +1,147 @@
local Target = {
MakePowder = { -- where you chop your coca leaves to make powder
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
CuttingCoke = { -- only active if Config.FancyCokeAnims = false
{loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
BaggingCoke = { -- only active if Config.FancyCokeAnims = false
{loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
makecrack = { -- make crack with baking soda with cut coke 1-3
{loc = vector3(2433.47, 4970.02, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
bagcrack = { --- bag crack 1-3 stages
{loc = vector3(2436.55, 4964.96, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
lysergicacid = { -- get lysergic acid
{loc = vector3(-1381.21, -327.75, 39.85), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2405.53, 5008.39, 46.02), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
diethylamide = { -- get diethylamide
{loc = vector3(-1371.71, -316.02, 39.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2408.38, 5011.18, 46.08), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
gettabs = { -- buy tab paper
{loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
dryplant = { -- turn resin into powder
{loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
cutheroinone = { -- cut heroin stage 1-3 with baking soda
{loc = vector3(-1360.14, -337.03, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
fillneedle = { -- fill needles with heroin
{loc = vector3(-1366.32, -334.40, 44.44), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
isosafrole = { -- where to steal isosafrole
{loc = vector3(844.39, -902.92, 25.42), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
mdp2p = { -- where to steal mdp2p
{loc = vector3(844.4, -898.79, 25.23), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
rawxtcloc = { -- where to combine the 2 ingridents to make raw xtc
{loc = vector3(844.71, -910.33, 25.37), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
stamp = { -- where to stamp pills
{loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
FillPrescription = { -- where to fill out your prescription
{loc = vector3(2855.62, 4446.73, 48.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
singleSpot = {
cutcoke = vector3(1093.17, -3195.74, -39.19),
bagcokepowder = vector3(1090.28, -3195.65, -39.19),
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), -- buy lab kit for lsd
buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13), -- buy lab kit for heroin
buypress = vector3(845.82, -884.79, 25.18), -- buy lab kit for xtc
DryOut = vector3(2638.22, 4237.93, 44.78), -- Place to dry out mescaline into usuable drug
SyrupVendor = vector4(365.21, -578.77, 39.30, 347.23), -- where the mission ped starts
weedTelein = vector3(244.74, 374.54, 105.74), -- where you target to tele in
weedTeleout = vector3(1066.31, -3183.36, -39.16), -- where you target to tele out
MakeButter = vector3(1045.48, -3198.49, -38.22), -- where you make cannabutter and baked edibles
MakeOil = vector3(1038.90, -3198.66, -38.17), -- where you make shatter
WeedSaleman = vector4(1030.77, -3203.18, -38.2, 262.37), -- where the weed saleman is
MethTeleIn = vector3(-2222.04, 303.99, 174.6), -- where you target to tele in meth
MethTeleOut = vector3(996.91, -3200.83, -36.39), -- where you target to tele out meth
MethHeistStart = vector4(-1520.84, 827.72, 181.66, 184.13), -- where you get the mission to get ingridients if meth heist = true
truckspawn = vector4(1450.87, -1482.13, 63.22, 69.95), --- where the truck will spawn when you pay for it
Payfortruck = vector3(1437.64, -1491.91, 63.62), --- where you pay for the truck
},
MethEph = { -- get ephedrine
{loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
Methace = { -- get acetone
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
StartLoc = { -- where truck spawns for lean and meth missions
vector3(-2307.22, 434.77, 174.47),
vector3(614.75, 1786.26, 199.39),
vector3(-224.89, 6388.32, 31.59)
},
WeedDry = {
{loc = vector3(1043.0, -3191.59, -38.39),},
{loc = vector3(1041.0, -3191.59, -38.39),},
{loc = vector3(1045.0, -3191.59, -38.39),},
{loc = vector3(1039.0, -3191.59, -38.39),},
},
Travellingmerchant = { -- where the travelling merchant can spawn
vector4(-119.66, -977.43, 304.25, 88.21),
vector4(-1522.93, 1476.01, 111.45, 41.25),
vector4(-3278.98, 973.38, 5.35, 101.53),
},
oxylocations = {
vector4(-2352.32, 266.78, 165.3, 23.46),
vector4(-1467.49, 874.01, 183.59, 298.45),
vector4(-856.71, 874.26, 202.85, 205.3),
vector4(950.58, -128.49, 74.42, 205.3),
vector4(1152.71, -328.43, 69.21, 205.3),
vector4(112.66, -1955.67, 20.75, 37.94),
vector4(-544.4, -1684.8, 19.89, 252.07),
vector4(-1185.02, -1805.4, 3.91, 184.83),
vector4(-1641.4, -981.99, 7.58, 35.38),
vector4(-1827.93, 782.36, 138.29, 219.99),
vector4(-320.84, 2818.73, 59.45, 337.22),
vector4(474.88, 2609.56, 44.48, 357.0),
}
}
function checkLoc(source, event, num)
local ped = source
local pos = GetPlayerPed(ped)
local coord = GetEntityCoords(pos)
local loc
if type(num) == 'string' then
loc = vector3(Target[event][num].x, Target[event][num].y, Target[event][num].z)
else
loc = Target[event][num].loc
end
local dist = #(coord - loc)
if dist < 2.5 then
Log(GetName(source) .. ' Triggered the table ' .. event .. ' Within The Correct Distance', 'locations')
return true
else
Log(GetName(source) .. ' Triggered the table ' .. event .. ' Not Within The Correct Distance', 'locations')
Notifys(source, 'You are not in the correct location', 'error')
return false
end
end
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
lib.callback.register('md-drugs:server:getLocs', function()
return Target
end)
lib.callback.register('md-drugs:server:GetMerchant', function(source)
return loc
end)
function getRandW(src)
local rand = math.random(1, #Target.oxylocations)
return Target.oxylocations[rand]
end
+135 -144
View File
@@ -1,155 +1,140 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local prices = {
tabcost = 100, -- price per piece of tab paper event does 10 at a time
lsdlabkitcost = 10000 -- price of the lsd lab kit
}
local lsdTables = {}
RegisterServerEvent('md-drugs:server:getlysergic', function(num) RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'lysergicacid', num) then return end
local playerPed = GetPlayerPed(source) if AddItem(src,'lysergic_acid', 2) then
if CheckDist(source, playerPed, Config.lysergicacid[num]['loc']) then return end
if AddItem('lysergic_acid', 2) then
Notifys(Lang.lsd.lys, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got Lysergic acid with a distance of ' .. dist(source, playerPed, Config.lysergicacid[num]['loc']) .. '!', 'lsd')
end end
end) end)
RegisterServerEvent('md-drugs:server:getdiethylamide', function(num) RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'diethylamide', num) then return end
local playerPed = GetPlayerPed(source) if AddItem(src,'diethylamide', 2) then
if CheckDist(source, playerPed, Config.diethylamide[num]['loc']) then return end
if AddItem('diethylamide', 2) then
Notifys(Lang.lsd.die, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got Diethylamide with a distance of ' .. dist(source, playerPed, Config.diethylamide[num]['loc']) .. '!', 'lsd')
end end
end) end)
QBCore.Functions.CreateUseableItem('lsdlabkit', function(source, item) CUI('lsdlabkit', function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(src) local placed, loc = lib.callback.await('md-drugs:client:setlsdlabkit', src)
if TriggerClientEvent("md-drugs:client:setlsdlabkit", src) then if placed then
Player.Functions.RemoveItem("lsdlabkit", 1) if RemoveItem(src, 'lsdlabkit', 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed Their LSD Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'lsd') table.insert(lsdTables, {
owner = GetName(src),
ownerid = Player.PlayerData.citizenid,
src = src,
loc = loc
})
end
end end
end) end)
local function hasLabKit(source)
local src = source
local Player = getPlayer(src)
for k, v in pairs (lsdTables) do
if v.ownerid == Player.PlayerData.citizenid then
return true
end
end
end
RegisterServerEvent('md-drugs:server:removecleaningkit', function(data) lib.callback.register('md-drugs:server:removecleaningkit', function(source)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not Itemcheck(src, 'cleaningkit', 1) then return end
if not Itemcheck(Player, 'cleaningkit', 1, 'true') then return end if RemoveItem(src,"cleaningkit", 1) then
if RemoveItem("cleaningkit", 1) then return true
Notifys(Lang.lsd.cleaned, "success")
TriggerClientEvent("md-drugs:client:resetlsdkit", src, data)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wiped Down Their LSD Lab Kit!' , 'lsd')
end end
end) end)
RegisterServerEvent('md-drugs:server:getlabkitback', function() RegisterServerEvent('md-drugs:server:getlabkitback', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(src) for k, v in pairs (lsdTables) do
if AddItem("lsdlabkit", 1) then if v.ownerid == Player.PlayerData.citizenid then
Notifys('You Got Your Lab Kit Back', 'success') table.remove(lsdTables, k)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Up Their LSD Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'lsd') AddItem(src, 'lsdlabkit', 1)
end
end end
end) end)
RegisterServerEvent('md-drugs:server:heatliquid', function() RegisterServerEvent('md-drugs:server:heatliquid', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not hasLabKit(src) then return end
if not Itemcheck(Player, 'lysergic_acid', 1, 'true') then return end if not GetRecipe(src, 'lsd', 'vial', 'heat') then return end
if not Itemcheck(Player, 'diethylamide', 1, 'true') then return end
RemoveItem('diethylamide', 1)
RemoveItem('lysergic_acid', 1)
AddItem('lsd_one_vial', 1)
Notifys(Lang.lsd.madelsd, "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Heated Basic LSD!', 'lsd')
end) end)
RegisterServerEvent('md-drugs:server:failheating', function() RegisterServerEvent('md-drugs:server:failheating', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not hasLabKit(src) then return end
RemoveItem(src, 'lysergic_acid', 1)
RemoveItem('diethylamide', 1) RemoveItem(src, 'diethylamide', 1)
RemoveItem('lysergic_acid', 1) Notifys(src,Lang.lsd.failed, "error")
Notifys(Lang.lsd.failed, "error") Log(GetName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Failed Basic LSD Like An Idiot!', 'lsd')
end) end)
RegisterServerEvent('md-drugs:server:refinequalityacid', function() RegisterServerEvent('md-drugs:server:refinequalityacid', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not hasLabKit(src) then return end
local randomchance = math.random(1,100) if not Itemcheck(src, 'lsd_one_vial', 1) then return end
if not Itemcheck(Player, 'lsd_one_vial', 1, 'true') then return end
if Config.TierSystem then if Config.TierSystem then
local lsd = Player.PlayerData.metadata['lsd'] local lsd = getRep(src, 'lsd')
if RemoveItem('lsd_one_vial', 1) then if RemoveItem(src, 'lsd_one_vial', 1) then
if lsd <= 30 then if lsd <= 30 then
AddItem('lsd_vial_two', 1) AddItem(src,'lsd_vial_two', 1)
Notifys(Lang.lsd.refined, "Success")
elseif lsd >= 31 and lsd <= 60 then elseif lsd >= 31 and lsd <= 60 then
AddItem('lsd_vial_three', 1) AddItem(src,'lsd_vial_three', 1)
Notifys(Lang.lsd.refined, "Success")
elseif lsd >= 61 and lsd <= 90 then elseif lsd >= 61 and lsd <= 90 then
AddItem('lsd_vial_four', 1) AddItem(src,'lsd_vial_four', 1)
Notifys(Lang.lsd.refined, "Success")
elseif lsd >= 91 and lsd <= 120 then elseif lsd >= 91 and lsd <= 120 then
AddItem('lsd_vial_five', 1) AddItem(src,'lsd_vial_five', 1)
Notifys(Lang.lsd.refined, "Success")
else else
AddItem('lsd_vial_six', 1) AddItem(src,'lsd_vial_six', 1)
Notifys(Lang.lsd.refined, "Success")
end end
Player.Functions.SetMetaData('lsd', (lsd + 1)) AddRep(src,'lsd')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd') Log(GetName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
end end
else else
if RemoveItem('lsd_one_vial', 1) then local randomchance = math.random(1,100)
if RemoveItem(src,'lsd_one_vial', 1) then
if randomchance <= 60 then if randomchance <= 60 then
AddItem('lsd_vial_two', 1) AddItem(src,'lsd_vial_two', 1)
Notifys(Lang.lsd.refined, "Success")
elseif randomchance >= 61 and randomchance <= 75 then elseif randomchance >= 61 and randomchance <= 75 then
AddItem('lsd_vial_three', 1) AddItem(src,'lsd_vial_three', 1)
Notifys(Lang.lsd.refined, "Success")
elseif randomchance >= 76 and randomchance <= 85 then elseif randomchance >= 76 and randomchance <= 85 then
AddItem('lsd_vial_four', 1) AddItem(src,'lsd_vial_four', 1)
Notifys(Lang.lsd.refined, "Success")
elseif randomchance >= 86 and randomchance <= 93 then elseif randomchance >= 86 and randomchance <= 93 then
AddItem('lsd_vial_five', 1) AddItem(src,'lsd_vial_five', 1)
Notifys(Lang.lsd.refined, "Success")
else else
AddItem('lsd_vial_six', 1) AddItem(src,'lsd_vial_six', 1)
Notifys(Lang.lsd.refined, "Success")
end end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Refined Acid!', 'lsd') Log(GetName(src) ..' Refined Acid!', 'lsd')
end end
end end
end) end)
RegisterServerEvent('md-drugs:server:failrefinequality', function() RegisterServerEvent('md-drugs:server:failrefinequality', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not hasLabKit(src) then return end
local randomchance = math.random(1,100) if not Itemcheck(src, 'lsd_one_vial', 1) then return end
if not Itemcheck(Player, 'lsd_one_vial', 1, 'true') then return end RemoveItem(src,'lsd_one_vial', 1)
if RemoveItem('lsd_one_vial', 1) then
Player.Functions.SetMetaData('lsd', (Player.PlayerData.metadata.lsd - 1))
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Failed A Refinement And Now Has A Rep Of ' .. Player.PlayerData.metadata.lsd - 1 .. '!', 'lsd')
if Player.PlayerData.metadata.lsd < 0 then Player.Functions.SetMetaData('lsd', 0) end
end
end) end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num) RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(src, 'gettabs', num) then return end
if CheckDist(source, playerPed, Config.gettabs[num]['loc']) then return end if Player.Functions.RemoveMoney('cash', prices.tabcost * 10) then
if Player.Functions.RemoveMoney('cash', Config.tabcost * 10) then AddItem(src,'tab_paper', 10)
AddItem('tab_paper', 10)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought Tab Paper!', 'lsd')
else else
Notifys(Lang.lsd.broke, "error") Notifys(Lang.lsd.broke, "error")
end end
@@ -157,55 +142,51 @@ end)
RegisterServerEvent('md-drugs:server:getlabkit', function() RegisterServerEvent('md-drugs:server:getlabkit', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(src,'singleSpot', 'buylsdlabkit') then return end
if CheckDist(source, playerPed, vector3(Config.buylsdlabkit.x, Config.buylsdlabkit.y, Config.buylsdlabkit.z)) then return end if Player.Functions.RemoveMoney('cash', prices.lsdlabkitcost) then
if Player.Functions.RemoveMoney('cash', Config.lsdlabkitcost) then AddItem(src,'lsdlabkit', 1)
AddItem('lsdlabkit', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A LSD Lab Kit!', 'lsd')
else else
Notifys(Lang.lsd.broke, "error") Notifys(src, Lang.lsd.broke, "error")
end end
end) end)
RegisterServerEvent('md-drugs:server:maketabpaper', function() RegisterServerEvent('md-drugs:server:maketabpaper', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if not Itemcheck(Player, 'tab_paper', 1, 'true') then return end if not hasLabKit(src) then return end
if Player.Functions.RemoveItem('lsd_one_vial', 1) then if not Itemcheck(src,'tab_paper', 1) then return end
RemoveItem('tab_paper', 1) local count = 0
AddItem('smileyfacesheet', 1) local items, recieve = nil, nil
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Smiley Face Sheet', 'lsd') local vialdata = {
elseif Player.Functions.RemoveItem('lsd_vial_two', 1) then {vial = 'lsd_one_vial', sheet = 'smileyfacesheet', log = 'Made A Smiley Face Sheet'},
RemoveItem('tab_paper', 1) {vial = 'lsd_vial_two', sheet = 'wildcherrysheet', log = 'Made A Wild Cherry Sheet'},
AddItem('wildcherrysheet', 1) {vial = 'lsd_vial_three', sheet = 'yinyangsheet', log = 'Made A Yin Yang Sheet'},
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Wild Cherry Sheet', 'lsd') {vial = 'lsd_vial_four', sheet = 'pineapplesheet', log = 'Made A Pine Apple Sheet'},
elseif Player.Functions.RemoveItem('lsd_vial_three', 1) then {vial = 'lsd_vial_five', sheet = 'bartsheet', log = 'Made A Cluckin Bell Sheet'},
RemoveItem('tab_paper', 1) {vial = 'lsd_vial_six', sheet = 'gratefuldeadsheet', log = 'Made A Maze Sheet'}
AddItem('yinyangsheet', 1) }
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Yin Yang Sheet', 'lsd') sortTab(vialdata, 'vial')
elseif Player.Functions.RemoveItem('lsd_vial_four', 1) then for k, v in pairs (vialdata) do
RemoveItem('tab_paper', 1) if count >= 1 then break end
AddItem('pineapplesheet', 1) local check = Player.Functions.GetItemByName(v.vial)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Pine Apple Sheet', 'lsd')
elseif Player.Functions.RemoveItem('lsd_vial_five', 1) then if check and check.amount >= 1 then
RemoveItem('tab_paper', 1) items = v.vial
AddItem('bartsheet', 1) recieve = v.sheet
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cluckin Bell Sheet', 'lsd') count = count + 1
elseif Player.Functions.RemoveItem('lsd_vial_six', 1) then break
RemoveItem('tab_paper', 1) end
AddItem('gratefuldeadsheet', 1) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Maze Sheet', 'lsd') if count >= 1 then
else if RemoveItem(src, items, 1) and RemoveItem(src, 'tab_paper', 1) then
Notifys(Lang.lsd.novial, "error") AddItem(src, recieve, 1)
end
end end
end) end)
local sheets = { local sheets = {
{item = 'smileyfacesheet', recieve = "Smiley_tabs", }, {item = 'smileyfacesheet', recieve = "smiley_tabs", },
{item = 'wildcherrysheet', recieve = "wildcherry_tabs", }, {item = 'wildcherrysheet', recieve = "wildcherry_tabs", },
{item = 'yinyangsheet', recieve = "yinyang_tabs", }, {item = 'yinyangsheet', recieve = "yinyang_tabs", },
{item = 'pineapplesheet', recieve = "pineapple_tabs", }, {item = 'pineapplesheet', recieve = "pineapple_tabs", },
@@ -214,14 +195,24 @@ local sheets = {
} }
for k, v in pairs (sheets) do for k, v in pairs (sheets) do
QBCore.Functions.CreateUseableItem(v.item, function(source) CUI(v.item, function(source)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local math = math.random(1,10) local math = math.random(1,10)
if Player.Functions.RemoveItem(v.item, 1) then if RemoveItem(src, v.item, 1) then
Player.Functions.AddItem(v.recieve, math) AddItem(src, v.recieve, math)
TriggerClientEvent("inventory:client:ItemBox", src, QBCore.Shared.Items[v.recieve], "add", math ) Log(GetName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
end end
end) end)
end end
AddEventHandler('playerDropped', function()
local src = source
local Player = getPlayer(src)
for k, v in pairs (lsdTables) do
if v.ownerid == Player.PlayerData.citizenid then
table.remove(lsdTables, k)
AddItem(src, 'lsdlabkit', 1)
end
end
end)
+38 -38
View File
@@ -1,63 +1,63 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
GlobalState.Mescaline = Config.Mescaline
local m = {
{ location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2601.46, 4199.34, 40.62), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2611.63, 4194.18, 41.18), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2620.18, 4202.69, 41.5), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2624.26, 4211.75, 42.34), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2635.21, 4207.5, 42.49), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2644.97, 4193.51, 42.11), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2654.21, 4195.31, 41.23), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2653.32, 4206.49, 41.62), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2647.45, 4213.94, 42.49), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2636.3, 4218.49, 43.03), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2627.37, 4223.2, 42.88), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2617.86, 4230.38, 42.63), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2609.8, 4222.12, 41.19), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2602.96, 4194.05, 41.01), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2614.39, 4188.3, 41.68), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03"},
}
GlobalState.Mescaline = m
Citizen.CreateThread(function() Citizen.CreateThread(function()
for _, v in pairs(Config.Mescaline) do for _, v in pairs(m) do
v.taken = false v.taken = false
end end
end) end)
function MescalineCooldown(loc) function MescalineCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
Config.Mescaline[loc].taken = false m[loc].taken = false
GlobalState.Mescaline = Config.Mescaline GlobalState.Mescaline = m
Wait(1000)
TriggerClientEvent('Mescaline:respawnCane', -1, loc) TriggerClientEvent('Mescaline:respawnCane', -1, loc)
Log('Cactus Respawned At ' .. Config.Mescaline[loc].location, 'mescaline') Log('Cactus Respawned At ' ..m[loc].location, 'mescaline')
end) end)
end end
RegisterNetEvent("Mescaline:pickupCane", function(loc)
RegisterNetEvent("Mescaline:pickupCane") if CheckDist(source, m[loc].location) then return end
AddEventHandler("Mescaline:pickupCane", function(loc) if not m[loc].taken then
local playerPed = GetPlayerPed(source) m[loc].taken = true
if CheckDist(source, playerPed, Config.Mescaline[loc].location) then end GlobalState.Mescaline = m
if not Config.Mescaline[loc].taken then
Config.Mescaline[loc].taken = true
GlobalState.Mescaline = Config.Mescaline
TriggerClientEvent("Mescaline:removeCane", -1, loc) TriggerClientEvent("Mescaline:removeCane", -1, loc)
MescalineCooldown(loc) MescalineCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source) AddItem(source,'cactusbulb', 1)
AddItem('cactusbulb', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Cactus Bulbs With a distance of ' .. dist(source, playerPed, Config.Mescaline[loc].location) .. ' vectors', 'mescaline')
end end
end) end)
RegisterNetEvent("md-drugs:server:drymescaline", function()
RegisterNetEvent("md-drugs:server:drymescaline")
AddEventHandler("md-drugs:server:drymescaline", function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if RemoveItem("cactusbulb", 1) then
AddItem("driedmescaline", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Dried Mescaline', 'mescaline')
else
Notifys(Lang.mescaline.nocactus, "error")
end
end)
QBCore.Functions.CreateUseableItem("driedmescaline", function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'singleSpot', 'DryOut') then return end
if not GetRecipe(src, 'mescaline', 'dry', 'dried') then return end
end)
if Player.Functions.RemoveItem("driedmescaline", 1) then CUI("driedmescaline", function(source, item)
local src = source
if RemoveItem(src, "driedmescaline", 1) then
TriggerClientEvent("md-drugs:client:takemescaline", src) TriggerClientEvent("md-drugs:client:takemescaline", src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Consumed Mescaline', 'consume') Log(GetName(source) .. ' Consumed Mescaline', 'consume')
end end
end) end)
+18 -40
View File
@@ -1,65 +1,43 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:startcook', function() RegisterServerEvent('md-drugs:server:startcook', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
if not Itemcheck(Player, 'ephedrine', 1, 'true') and Itemcheck(Player, 'acetone', 1, 'true') then return end Notifys(src, "Adding Things To The Mix", "success")
Notifys("Adding Things To The Mix", "success")
RemoveItem('ephedrine', 1)
RemoveItem('acetone', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Started A Meth Batch', 'Meth')
end) end)
RegisterServerEvent('md-drugs:server:givemethingridients', function() RegisterServerEvent('md-drugs:server:givemethingridients', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
local chance = math.random(1,100) local chance = math.random(1,100)
local amount = math.random(1,5) local amount = math.random(1,5)
if chance <= 50 then if chance <= 50 then
if AddItem('ephedrine', amount) then if AddItem(src,'ephedrine', amount) then
Notifys(Lang.meth.eph, "success") Log(GetName(src) .. ' Got ' .. amount .. ' Of Ephedrine', 'Meth')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Ephedrine', 'Meth')
end end
else else
if AddItem('acetone', amount) then if AddItem(src, 'acetone', amount) then
Notifys(Lang.meth.ace, "success") Log(GetName(src) .. ' Got ' .. amount .. ' Of Acetone', 'Meth')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Acetone', 'Meth')
end end
end end
end) end)
RegisterServerEvent('md-drugs:server:getmeth', function() RegisterServerEvent('md-drugs:server:getmeth', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
local amount = math.random(1,5)
if RemoveItem("empty_weed_bag", amount) then
AddItem("methbags", amount)
Notifys("You Made " .. amount .. " Bags Of Meth!", "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged ' .. amount .. 'Of Meth', 'Meth')
else
Notifys(Lang.meth.nobag, "error")
end
end) end)
RegisterServerEvent('md-drugs:server:geteph', function(num) RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'MethEph', num) then return end
local playerPed = GetPlayerPed(source) if AddItem(src, 'ephedrine', 1) then
if CheckDist(source, playerPed, Config.MethEph[num]['loc']) then return end Notifys(src, 'Got Ephedrine!', "success")
if AddItem('ephedrine', 1) then end
Notifys('Got Ephedrine!', "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. 1 .. 'Of Ephedrine', 'Meth')
end
end) end)
RegisterServerEvent('md-drugs:server:getace', function(num) RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'Methace', num) then return end
local playerPed = GetPlayerPed(source) if AddItem(src, 'acetone', 1) then
if CheckDist(source, playerPed, Config.Methace[num]['loc']) then return end Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
if AddItem('acetone', 1) then end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
Notifys('Got Acetone!', "success")
end
end) end)
+25 -20
View File
@@ -1,40 +1,45 @@
QBCore = exports['qb-core']:GetCoreObject() QBCore = exports['qb-core']:GetCoreObject()
local prices = {
RegisterServerEvent('md-drugs:server:payfortruck', function() payfortruck = 500,
hotchance = 30,
itemChance = 20,
}
lib.callback.register('md-drugs:server:payfortruck', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then
if Player.Functions.RemoveMoney('cash', Config.TruckPrice ) or Player.Functions.RemoveMoney('bank', Config.TruckPrice ) then Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
TriggerClientEvent("md-drugs:Client:getoxylocation", src) return true
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rented A Van For OxyRuns', 'oxy')
else else
Notifys(Lang.oxy.broke, "error") Notifys(src, Lang.oxy.broke, "error")
return false
end end
end) end)
RegisterServerEvent('md-drugs:server:giveoxybox', function() RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local chance = math.random(1,100) local chance = math.random(1,100)
local cash = Config.OxyRunCompleteCash local cash = 200
local itemchance = math.random(1,100) local itemchance = math.random(1,100)
local item = Config.OxyRandItems[math.random(1, #Config.OxyRandItems)] local itemList = {
{item = 'oxy', amount = 2},
if chance <= Config.OxyRunDitchChance then {item = 'houselockpick', amount = 1},
Notifys(Lang.oxy.hot, "error") }
local item = itemList[math.random(1, #itemList)]
if chance <= prices.hotchance then
Notifys(src, Lang.oxy.hot, "error")
Player.Functions.AddMoney("cash", cash * 0.5) Player.Functions.AddMoney("cash", cash * 0.5)
if itemchance <= Config.OxyItemChance then if itemchance <= prices.itemChance then
AddItem(item, Config.OxyItemAmount) AddItem(src, item.item, item.amount)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy')
end end
else else
Notifys(Lang.oxy.next, "success") Notifys(Lang.oxy.next, "success")
TriggerClientEvent("md-drugs:client:getoxylocationroute", src) TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
Player.Functions.AddMoney("cash", cash) Player.Functions.AddMoney("cash", cash)
if itemchance <= Config.OxyItemChance then if itemchance <= prices.itemChance then
AddItem(item, Config.OxyItemAmount) AddItem(src, item.item, item.amount)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy')
end end
end end
+60 -65
View File
@@ -1,82 +1,77 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
QBCore.Functions.CreateUseableItem('prescription_pad', function(source, item) local function GetJob(source)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if Player.PlayerData.job.type == 'ems' then if Player.PlayerData.job.type == 'ems' then
TriggerClientEvent("md-drugs:client:prescriptionpad", src, item) return true
end else
end) Notifys(src, 'You Must Be EMS To Do This', 'error')
return false
end
end
RegisterServerEvent('md-drugs:server:giveprescription', function(item) CUI('prescription_pad', function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local near = {}
Player.Functions.AddItem(item, 1) if GetJob(src) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Prescription Of ' .. item .. '!', 'pharma') for k, v in pairs (QBCore.Functions.GetQBPlayers()) do
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", 1) local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
end) local tname = GetName(v.PlayerData.source)
local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source)
RegisterServerEvent('md-drugs:server:unbottle', function(item) local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
local src = source if dist < 5.0 then
local Player = QBCore.Functions.GetPlayer(src) table.insert(near, {label = tname, value = targ.PlayerData.citizenid})
local amount = math.random(10,30) end
Player.Functions.AddItem(item, amount) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Unbottled '.. amount .. ' Of ' .. item .. '!', 'pharma') local options = { {label = 'Vicodin', value = 'vicodin_prescription'}, {label = 'Adderal', value = 'adderal_prescription'}, {label = 'Morphine', value = 'morphine_prescription'},{label = 'Xanax', value = 'xanax_prescription'}}
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", amount) local data = lib.callback.await('md-drugs:client:prescriptionpad', src, near, options)
if type(data) == 'table' then
local give = QBCore.Functions.GetPlayerByCitizenId(data.who)
for i = 1, #options do
if data.what == options[i].value then
AddItem(give.PlayerData.source, data.what, 1)
end
end
end
end
end) end)
local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'} local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'}
for m, d in pairs (pharmabottle) do for m, d in pairs (pharmabottle) do
QBCore.Functions.CreateUseableItem(d, function(source, item) CUI(d, function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if Player.Functions.RemoveItem(d, 1) then local check = lib.callback.await("md-drugs:client:unbottle", src)
TriggerClientEvent("md-drugs:client:unbottle", src, item) if check then
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[d], "remove", 1) local get = {
end ['vicodinbottle'] = 'vicodin',
end) ['adderalbottle'] = 'adderal',
end ['morphinebottle'] = 'morphine',
['xanaxbottle'] = 'xanax'
local pharmadrugs = { "adderal", "vicodin", "xanax", "morphine"} }
for k, v in pairs (pharmadrugs) do QBCore.Functions.CreateUseableItem(v, function(source, item) for k, v in pairs (get) do
local src = source if d == k then
local Player = QBCore.Functions.GetPlayer(src) RemoveItem(src, d, 1)
AddItem(src, v, math.random(10,30))
if TriggerClientEvent('md-drugs:client:takepharma', src, item.name) then Notifys(src,Lang.Pharma.unbottle, "success")
Player.Functions.RemoveItem(item.name, 1) Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Took ' .. item.name .. '!', 'pharma') end
TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item.name], "remove", 1) end
end end
end) end)
end end
RegisterServerEvent('md-drugs:server:fillprescription', function() RegisterServerEvent('md-drugs:server:fillprescription', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local vic = Player.Functions.GetItemByName('vicodin_prescription') local pres = {vicodin_prescription = 'vicodinbottle', adderal_prescription = 'adderalbottle', morphine_prescription = 'morphinebottle', xanax_prescription = 'xanaxbottle'}
local add = Player.Functions.GetItemByName('adderal_prescription') for k, v in pairs (pres) do
local mor = Player.Functions.GetItemByName('morphine_prescription') if Player.Functions.GetItemByName(k) then
local xan = Player.Functions.GetItemByName('xanax_prescription') RemoveItem(src, k, 1 )
if vic then AddItem(src,v, 1)
RemoveItem('vicodin_prescription', 1 ) break
AddItem('vicodinbottle', 1) end
Notifys(Lang.Pharma.pills, "success")
elseif add then
RemoveItem('adderal_prescription', 1 )
AddItem('adderalbottle', 1)
Notifys(Lang.Pharma.pills, "success")
elseif mor then
RemoveItem('morphine_prescription', 1 )
AddItem('morphinebottle', 1)
Notifys(Lang.Pharma.pills, "success")
elseif xan then
RemoveItem('xanax_prescription', 1 )
AddItem('xanaxbottle', 1)
Notifys(Lang.Pharma.pills, "success")
else
Notifys(Lang.Pharma.no, "error")
end end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Prescription!', 'pharma') Log(GetName(src) .. ' Filled A Prescription!', 'pharma')
end) end)
+169
View File
@@ -0,0 +1,169 @@
local QBCore = exports['qb-core']:GetCoreObject()
local recipe = {
cocaine = {
cokepowder = {
tier1 = {take = {coca_leaf = 1}, give = {coke = 1}},
tier2 = {take = {coca_leaf = 1}, give = {cokestagetwo = 1}},
tier3 = {take = {coca_leaf = 1}, give = {cokestagethree = 1}},
},
cutcoke = {
tier1 = {take = {coke = 1, bakingsoda = 1}, give = {loosecoke = 1}},
tier2 = {take = {cokestagetwo = 1, bakingsoda = 1}, give = {loosecokestagetwo = 1}},
tier3 = {take = {cokestagethree = 1, bakingsoda = 1}, give = {loosecokestagethree = 1}},
},
bagcoke = {
tier1 = {take = {loosecoke = 1, empty_weed_bag = 1}, give = {cokebaggy = 1}},
tier2 = {take = {loosecokestagetwo = 1, empty_weed_bag = 1}, give = {cokebaggystagetwo = 1}},
tier3 = {take = {loosecokestagethree = 1, empty_weed_bag = 1}, give = {cokebaggystagethree = 1}},
}
},
crack = {
cookcrack = {
tier1 = {take = {loosecoke = 1, bakingsoda = 1}, give = {crackrock = 1}},
tier2 = {take = {loosecokestagetwo = 1, bakingsoda = 1}, give = {crackrockstagetwo = 1}},
tier3 = {take = {loosecokestagethree = 1,bakingsoda = 1}, give = {crackrockstagethree = 1}},
},
bagcrack = {
tier1 = {take = {crackrock = 1, empty_weed_bag = 1}, give = {baggedcracked = 1}},
tier2 = {take = {crackrockstagetwo = 1, empty_weed_bag = 1}, give = {baggedcrackedstagetwo = 1}},
tier3 = {take = {crackrockstagethree = 1, empty_weed_bag = 1}, give = {baggedcrackedstagethree = 1}},
}
},
heroin = {
dryheroin = {
tier1 = {take = {poppyresin = 1}, give = {heroin = 1}},
tier2 = {take = {poppyresin = 1}, give = {heroinstagetwo = 1}},
tier3 = {take = {poppyresin = 1}, give = {heroinstagethree = 1}},
},
cutheroin = {
tier1 = {take = {heroin = 1, bakingsoda = 1}, give = {heroincut = 1}},
tier2 = {take = {heroinstagetwo = 1, bakingsoda = 1}, give = {heroincutstagetwo = 1}},
tier3 = {take = {heroinstagethree = 1, bakingsoda = 1}, give = {heroincutstagethree = 1}},
},
fillvial = {
tier1 = {take = {heroincut = 1, emptyvial = 1}, give = {heroinvial = 1}},
tier2 = {take = {heroincutstagetwo = 1, emptyvial = 1}, give = {heroinvialstagetwo = 1}},
tier3 = {take = {heroincutstagethree = 1, emptyvial = 1}, give = {heroinvialstagethree = 1}},
},
fillneedle = {
tier1 = {take = {heroinvial = 1, needle = 1}, give = {heroin_ready = 1}},
tier2 = {take = {heroinvialstagetwo = 1, needle = 1}, give = {heroin_readystagetwo = 1}},
tier3 = {take = {heroinvialstagethree = 1, needle = 1}, give = {heroin_readystagethree = 1}},
}
},
lsd = {
vial = {
heat = {take = {lysergic_acid = 1, diethylamide = 1,}, give = {lsd_one_vial = 1}}
},
},
mescaline = {
dry = {
dried = {take = {cactusbulb = 1}, give = {driedmescaline = 1} }
}
},
lean = {
cups = {
cupoflean = {take = {leancup = 1, sprunk = 1, mdlean = 1}, give = {cupoflean = 1}},
cupofdextro = {take = {leancup = 1, sprunk = 1, mdreddextro = 1}, give = {cupofdextro = 1}},
}
},
meth = {
cook = {
heat = {take = {ephedrine = 1, acetone = 1}, give = {}}
},
bag = {
bags = {take = {empty_weed_bag = 5}, give = {methbags = 5} }
}
},
weed = {
edibles = {
cannabutter = {take = { mdbutter = 1, grindedweed = 1}, give = {cannabutter = 1}},
specialbrownie = {take = { cannabutter = 1, flour = 1, chocolate = 1}, give = {specialbrownie = 1}},
specialcookie = { take = { cannabutter = 1, flour = 1}, give = {specialcookie = 1}},
specialchocolate = { take = { cannabutter = 1, chocolate = 1}, give = {specialchocolate = 1}},
specialmuffin = { take = { cannabutter = 1, flour = 1}, give = {specialmuffin = 1}},
},
oil = {
shatter = {take = {butane = 1, grindedweed = 1}, give = {shatter = 1}}
},
blunts = {
blunt = {take = {bluntwrap = 1, grindedweed = 1}, give = {blunt = 1}},
chewyblunt = {take = {bluntwrap = 1, grindedweed = 1, loosecoke = 1}, give = {chewyblunt = 1}},
leanblunts = {take = {leanbluntwrap = 1, grindedweed = 1}, give = {leanblunts = 1}},
dextroblunts = {take = {dextrobluntwrap = 1, grindedweed = 1}, give = {dextroblunts = 1}}
},
bluntwrap = {
leanbluntwrap = {take = {bluntwrap = 5, mdlean = 1}, give = {leanbluntwrap = 5}},
dextrobluntwrap = {take = {bluntwrap = 5, mdreddextro = 1}, give = {dextrobluntwrap = 5}},
}
},
xtc = {
raw = {
raw_xtc = {take = {mdp2p = 1, isosafrole = 1}, give = {raw_xtc = 1}}
},
singlestack = {
white = {take = {raw_xtc = 1}, give = {white_xtc = 1}},
red = {take = {raw_xtc = 1, loosecoke = 1 }, give = {red_xtc = 1}},
orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc = 1}},
blue = {take = {raw_xtc = 1, crackrock = 1 }, give = {blue_xtc = 1}},
},
dualstack = {
white = {take = {raw_xtc = 1}, give = {white_xtc2 = 1}},
red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc2 = 1}},
orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc2 = 1}},
blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc2 = 1}},
},
triplestack = {
white = {take = {raw_xtc = 1}, give = {white_xtc3 = 1}},
red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc3 = 1}},
orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc3 = 1}},
blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc3 = 1}},
},
quadstack = {
white = {take = {raw_xtc = 1}, give = {white_xtc4 = 1}},
red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc4 = 1}},
orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc4 = 1}},
blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc4 = 1}},
},
press = {
dual = {take = {white_xtc = 20, blue_xtc = 20, red_xtc = 20, orange_xtc = 20, singlepress = 1}, give = {dualpress = 1}},
triple = {take = {white_xtc2 = 50, blue_xtc2 = 50, red_xtc2 = 50, orange_xtc2 = 50, dualpress = 1}, give = {triplepres = 1}},
quad = { take = {white_xtc3 = 50, blue_xtc3 = 50, red_xtc3 = 50, orange_xtc3 = 50, triplepress = 1}, give = {quadpress = 1}}
}
}
}
function GetRecipe(source, type, method, tier)
local src = source
local Player = getPlayer(source)
local has = 0
local need = 0
for k, v in pairs (recipe[type][method][tier].take) do
local item = Player.Functions.GetItemByName(k)
if item and item.amount >= v then
has = has + 1
else
Notifys(src, ' You Need ' .. v .. ' Of ' .. GetLabels(k) .. ' To Do This', 'error')
end
need = need + 1
end
if has == need then
for k, v in pairs (recipe[type][method][tier].take) do
RemoveItem(src, k, v)
end
for k,v in pairs (recipe[type][method][tier].give) do
AddItem(src, k, v)
Log(GetName(src) .. ' Made ' .. GetLabels(k) .. '!', 'drugMaking')
end
return true
else
return false
end
end
lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat)
if not source then return false end
return recipe[type][cat]
end)
+80
View File
@@ -0,0 +1,80 @@
local QBCore = exports['qb-core']:GetCoreObject()
local stores = {
travel = {
{name = "tab_paper", price = 50, amount = 50, },
{name = "bakingsoda", price = 25, amount = 50, },
{name = "isosafrole", price = 25, amount = 50, },
{name = "mdp2p", price = 25, amount = 50, },
{name = "lysergic_acid", price = 25, amount = 50, },
{name = "diethylamide", price = 25, amount = 50, },
{name = "lockpick", price = 2, amount = 1000, },
{name = "emptyvial", price = 2, amount = 1000, },
{name = "needle", price = 2, amount = 1000, },
{name = "cokeburner", price = 25, amount = 50, },
{name = "crackburner", price = 2, amount = 50, },
{name = "lsdburner", price = 2, amount = 50, },
{name = "heroinburner", price = 2, amount = 50, },
{name = "mdlean", price = 50, amount = 50, },
{name = "weedgrinder", price = 25, amount = 50, },
{name = "mdbutter", price = 25, amount = 50, },
{name = "flour", price = 25, amount = 50, },
{name = "chocolate", price = 25, amount = 50, },
{name = "butane", price = 25, amount = 50, },
{name = "butanetorch", price = 2, amount = 1000, },
{name = "dabrig", price = 2, amount = 1000, },
{name = "mdwoods", price = 2, amount = 1000, },
{name = "leancup", price = 25, amount = 50, },
{name = "xtcburner", price = 25, amount = 50, },
},
Weed = {
{name = "weedgrinder", price = 25, amount = 50, },
{name = "mdbutter", price = 25, amount = 50, },
{name = "flour", price = 25, amount = 50, },
{name = "chocolate", price = 25, amount = 50, },
{name = "butane", price = 25, amount = 50, },
{name = "butanetorch", price = 2, amount = 1000,},
{name = "dabrig", price = 2, amount = 1000,},
{name = "mdwoods", price = 2, amount = 1000},
},
Products = {
{name = "weed_white-widow_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_purple-haze_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_og-kush_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
},
ProductsStupidNameRewrite = {
{name = "weed_whitewidow_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_purplehaze_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_ogkush_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
}
}
lib.callback.register('md-drugs:server:menu', function(source, data)
local src = source
if data == 'travellingMerchant' then
return {table = stores.travel, des = '$', id = 'travellingMerchant', title = 'travelling Merchant'}
elseif data == 'dealermenu' then
local table
if Config.StupidassNewQbItemName then table = stores.ProductsStupidNameRewrite else table = stores.Products end
return {table = table, id = 'dealermenu', title = "Dealer Menu"}
elseif data == 'WeedShop' then
return {table = stores.Weed, id = 'WeedShop', title = "Weed Shop"}
end
end)
RegisterServerEvent("md-drugs:server:purchaseGoods", function(amount, money, item, price,table,num)
local src = source local Player = getPlayer(src)
for i = 1, #table do
if table[i].name == item then
if not table[i].price == price then return end
if Player.Functions.RemoveMoney(tostring(money), tonumber(table[i].price) * tonumber(amount)) then
AddItem(src, item, amount)
Log(GetName(src) .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant')
end
end
end
end)
+35 -24
View File
@@ -1,9 +1,27 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
GlobalState.shrooms = Config.shrooms
local s = {
{ location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = "mushroom"},
{ location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = "mushroom"},
{ location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = "mushroom"},
{ location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = "mushroom"},
{ location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = "mushroom"},
{ location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = "mushroom"},
{ location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = "mushroom"},
{ location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = "mushroom"},
{ location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = "mushroom"},
{ location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = "mushroom"},
{ location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = "mushroom"},
{ location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = "mushroom"},
{ location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = "mushroom"},
{ location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = "mushroom"},
{ location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = "mushroom"},
{ location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = "mushroom"},
{ location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = "mushroom"},
}
GlobalState.shrooms = s
Citizen.CreateThread(function() Citizen.CreateThread(function()
for _, v in pairs(Config.shrooms) do for _, v in pairs(s) do
v.taken = false v.taken = false
end end
end) end)
@@ -12,39 +30,32 @@ end)
function shroomsCooldown(loc) function shroomsCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
Config.shrooms[loc].taken = false s[loc].taken = false
GlobalState.shrooms = Config.shrooms GlobalState.shrooms = s
Wait(1000) Wait(1000)
TriggerClientEvent('shrooms:respawnCane', -1, loc) TriggerClientEvent('shrooms:respawnCane', -1, loc)
Log('Cactus Respawned At ' .. Config.shrooms[loc].location, 'shrooms') Log('Cactus Respawned At ' .. s[loc].location, 'shrooms')
end) end)
end end
RegisterNetEvent("shrooms:pickupCane", function(loc)
RegisterNetEvent("shrooms:pickupCane") if CheckDist(source, s[loc].location) then return end
AddEventHandler("shrooms:pickupCane", function(loc) if not s[loc].taken then
local chance = math.random(1,10) s[loc].taken = true
local playerPed = GetPlayerPed(source) GlobalState.shrooms = s
if CheckDist(source, playerPed, Config.shrooms[loc].location) then return end
if not Config.shrooms[loc].taken then
Config.shrooms[loc].taken = true
GlobalState.shrooms = Config.shrooms
TriggerClientEvent("shrooms:removeCane", -1, loc) TriggerClientEvent("shrooms:removeCane", -1, loc)
shroomsCooldown(loc) shroomsCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source) AddItem(source, 'shrooms', 1)
AddItem('shrooms', 1) Log(GetName(source) .. ' Picked A Shroom With a distance of ' .. dist(source,s[loc].location) .. ' vectors', 'shrooms')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Shroom With a distance of ' .. dist(source, playerPed, Config.shrooms[loc].location) .. ' vectors', 'shrooms')
end end
end) end)
QBCore.Functions.CreateUseableItem('shrooms', function(source, item) CUI('shrooms', function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then
Player.Functions.RemoveItem('shrooms', 1) RemoveItem(src, 'shrooms', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Took Some Mushrooms', 'shrooms') Log(GetName(source) .. ' Took Some Mushrooms', 'shrooms')
TriggerClientEvent("QBCore:Notify", src, Lang.Shrooms.trip, 'success') Notifys(src, 'You Took Some Shrooms!', 'success')
end end
end) end)
-13
View File
@@ -1,13 +0,0 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent("md-drugs:server:travellingmerchantox", function(amount, money, item, price,table,num)
local src = source local Player = QBCore.Functions.GetPlayer(src)
if not table[num]['name'] == item then return end
if Player.Functions.RemoveMoney(tostring(money), tonumber(price) * tonumber(amount)) then
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "add", amount)
Player.Functions.AddItem(item, amount)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant')
end
end)
+100 -269
View File
@@ -1,10 +1,43 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local weedPlant = {
GlobalState.WeedPlant = Config.WeedPlant { location = vector3(1049.63, -3202.12, -36.75), heading = 334.49, model = "prop_weed_01"},
{ location = vector3(1050.85, -3202.15, -36.75), heading = 329.56, model = "prop_weed_01"},
{ location = vector3(1052.01, -3202.22, -36.75), heading = 25.16, model = "prop_weed_01"},
{ location = vector3(1052.99, -3202.15, -36.75), heading = 21.52, model = "prop_weed_01"},
{ location = vector3(1053.08, -3201.11, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1052.91, -3199.99, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1053.02, -3198.97, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.95, -3198.93, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.96, -3199.86, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.93, -3201.17, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.98, -3201.13, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.89, -3200.07, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.89, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.72, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.98, -3200.1, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.82, -3201.01, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1053.07, -3194.51, -36.75), heading = 334.49, model = "prop_weed_01"},
{ location = vector3(1052.97, -3195.55, -36.75), heading = 329.56, model = "prop_weed_01"},
{ location = vector3(1052.82, -3196.58, -36.75), heading = 25.16, model = "prop_weed_01"},
{ location = vector3(1052.94, -3197.59, -36.75), heading = 21.52, model = "prop_weed_01"},
{ location = vector3(1051.92, -3197.54, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.88, -3196.61, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.82, -3195.52, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1051.95, -3194.38, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.88, -3194.31, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.78, -3195.29, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.76, -3196.49, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1050.77, -3197.62, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.64, -3197.61, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.64, -3196.59, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.62, -3195.51, -36.75), heading = 202.97, model = "prop_weed_01"},
{ location = vector3(1049.66, -3194.36, -36.75), heading = 202.97, model = "prop_weed_01"},
}
GlobalState.WeedPlant = weedPlant
Citizen.CreateThread(function() Citizen.CreateThread(function()
for _, v in pairs(Config.WeedPlant) do for _, v in pairs(weedPlant) do
v.taken = false v.taken = false
end end
end) end)
@@ -12,299 +45,97 @@ end)
function WeedCooldown(loc) function WeedCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
Config.WeedPlant[loc].taken = false weedPlant[loc].taken = false
GlobalState.WeedPlant = Config.WeedPlant GlobalState.WeedPlant = weedPlant
Wait(1000) Wait(1000)
TriggerClientEvent('weed:respawnCane', -1, loc) TriggerClientEvent('weed:respawnCane', -1, loc)
Log('Weed Plant Respawned At ' .. Config.WeedPlant[loc].location, 'weed') Log('Weed Plant Respawned At ' .. weedPlant[loc].location, 'weed')
end) end)
end end
RegisterNetEvent("weed:pickupCane") RegisterNetEvent("weed:pickupCane", function(loc)
AddEventHandler("weed:pickupCane", function(loc) if CheckDist(source, weedPlant[loc].location) then return end
local playerPed = GetPlayerPed(source) if not weedPlant[loc].taken then
if CheckDist(source, playerPed, Config.WeedPlant[loc].location) then return end weedPlant[loc].taken = true
if not Config.WeedPlant[loc].taken then GlobalState.WeedPlant = weedPlant
Config.WeedPlant[loc].taken = true
GlobalState.WeedPlant = Config.WeedPlant
TriggerClientEvent("weed:removeCane", -1, loc) TriggerClientEvent("weed:removeCane", -1, loc)
WeedCooldown(loc) WeedCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source) AddItem(source, 'wetcannabis', 1)
AddItem('wetcannabis', 1) Log(GetName(source) .. ' Picked Weed With a distance of ' .. dist(source, weedPlant[loc].location) .. ' vectors', 'weed')
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Weed With a distance of ' .. dist(source, playerPed, Config.WeedPlant[loc].location) .. ' vectors', 'weed')
end end
end) end)
--------------- events --------------- events
RegisterServerEvent('md-drugs:server:dryoutweed', function() RegisterServerEvent('md-drugs:server:dryoutweed', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if RemoveItem("wetcannabis", 1) then if RemoveItem(src,"wetcannabis", 1) then
AddItem("drycannabis", 1) AddItem(src,"drycannabis", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Dried Weed', 'weed') Log(GetName(source) .. ' Dried Weed', 'weed')
else else
Notifys(Lang.Weed.nodry, "error") Notifys(src, Lang.Weed.nodry, "error")
end end
end) end)
local bluntwrap = {'mdreddextro','mdlean'}
RegisterServerEvent('md-drugs:server:makebutter', function() for k, v in pairs (bluntwrap) do
local src = source CUI(v, function(source, item) TriggerClientEvent('md-drugs:client:makeBluntWrap', source) end)
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'mdbutter', 'grindedweed'}
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem('mdbutter', 1)
RemoveItem('grindedweed', 1)
AddItem('cannabutter', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Canna Butter ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:makebrownies', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'cannabutter', 'flour', 'chocolate' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 3 then
RemoveItem('cannabutter', 1)
RemoveItem('flour', 1)
RemoveItem('chocolate', 1)
AddItem('specialbrownie', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Brownies ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:makecookies', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'cannabutter', 'flour' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem('cannabutter', 1)
RemoveItem('flour', 1)
AddItem('specialcookie', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Cookies ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:makechocolate', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'cannabutter', 'chocolate' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem('cannabutter', 1)
RemoveItem('chocolate', 1)
AddItem('specialchocolate', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Chocolate ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:makemuffin', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'cannabutter', 'flour' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem('cannabutter', 1)
RemoveItem('flour', 1)
AddItem('specialmuffin', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Muffin ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:makeoil', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'grindedweed', 'butane' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem('butane', 1)
RemoveItem('grindedweed', 1)
AddItem('shatter', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Shatter ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:rollblunt', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local recipe = {'bluntwrap', 'grindedweed' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
TriggerClientEvent("md-drugs:client:rollanim", src)
RemoveItem('bluntwrap', 1)
RemoveItem('grindedweed', 1)
AddItem('blunt', 1 )
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Blunt ', 'weed')
end
end)
RegisterServerEvent('md-drugs:server:rollleanblunt', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local chance = math.random(1,10)
local recipe = {'bluntwrap', 'mdlean' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
TriggerClientEvent("md-drugs:client:rollanim", src)
RemoveItem("bluntwrap", 1)
AddItem("leanbluntwrap", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Lean Blunt ', 'weed')
if chance > 8 then
RemoveItem("mdlean", 1)
end
end end
end)
RegisterServerEvent('md-drugs:server:rolldextroblunt', function() local bluntwraps = {'leanbluntwrap', 'dextrobluntwrap', 'bluntwrap'}
local src = source
local Player = QBCore.Functions.GetPlayer(src) for k, v in pairs (bluntwraps) do
local chance = math.random(1,10) CUI(v, function(source, item) TriggerClientEvent('md-drugs:client:rollBlunt', source) end)
local chance = math.random(1,10)
local recipe = {'mdreddextro', 'mdlean' }
local have = 0
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 2 then
RemoveItem("bluntwrap", 1)
AddItem("dextrobluntwrap", 1)
TriggerClientEvent("md-drugs:client:rollanim", src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Dextro Blunt ', 'weed')
if chance > 8 then
Player.Functions.RemoveItem("mdreddextro", 1)
end
end end
RegisterServerEvent('md-drugs:server:MakeWeedItems', function(data)
local src = source
local Player = getPlayer(src)
if not Player then return end
if not GetRecipe(src, data.recipe, data.table, data.item) then return end
end) end)
RegisterServerEvent('md-drugs:server:rollchewyblunt', function() RegisterServerEvent('md-drugs:server:makeoil', function(data)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local recipe = {'bluntwrap', 'loosecoke', 'grindedweed' } if not Player then return end
local have = 0 if not GetRecipe(src, 'weed', 'oil', 'shatter') then return end
for k, v in pairs (recipe) do
if Itemcheck(Player, v, 1, 'true') then have = have + 1 end
end
if have == 3 then
RemoveItem("bluntwrap", 1)
RemoveItem("loosecoke", 1)
RemoveItem("grindedweed", 1)
AddItem("chewyblunt", 1)
TriggerClientEvent("md-drugs:client:rollanim", src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Chewy Blunt ', 'weed')
end
end)
------------------------ usuable items
QBCore.Functions.CreateUseableItem("leanbluntwrap", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local keef = Player.Functions.GetItemByName("grindedweed")
if keef and keef.amount > 0 then
if Player.Functions.RemoveItem('grindedweed', 1) then
TriggerClientEvent("md-drugs:client:rollanim", src)
Player.Functions.RemoveItem("leanbluntwrap", 1)
Player.Functions.AddItem('leanblunts', 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['leanblunts'], "add", 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['grindedweed'], "remove", 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['leanbluntwrap'], "remove", 1)
end
else
Notifys(Lang.Weed.noweed, "error")
end
end)
QBCore.Functions.CreateUseableItem("dextrobluntwrap", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local keef = Player.Functions.GetItemByName("grindedweed")
if keef and keef.amount > 0 then
if Player.Functions.RemoveItem('grindedweed', 1) then
TriggerClientEvent("md-drugs:client:rollanim", src)
Player.Functions.RemoveItem("dextrobluntwrap", 1)
Player.Functions.AddItem('dextroblunts', 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['dextroblunts'], "add", 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['grindedweed'], "remove", 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['dextrobluntwrap'], "remove", 1)
end
else
Notifysu('You Need Keef', 'error', src)
end
end) end)
QBCore.Functions.CreateUseableItem("dabrig", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if Player.Functions.GetItemByName("butanetorch") then CUI("dabrig", function(source, item)
if RemoveItemu("shatter", 1, src) then local src = source
Notifysu('test', 'success', src) local Player = getPlayer(src)
TriggerClientEvent("md-drugs:client:dodabs", src)
if Player.Functions.GetItemByName("butanetorch") then
if RemoveItem(src, "shatter", 1) then
TriggerClientEvent("md-drugs:client:dodabs", src)
end
else
Notifys(src, 'You Need A Butane Torch', 'error')
end end
end
end) end)
QBCore.Functions.CreateUseableItem("bluntwrap", function(source, item) CUI("weedgrinder", function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
TriggerClientEvent('md-drugs:client:bluntwraps', src) local has = Player.Functions.GetItemByName("drycannabis")
if not has then Notifys(src, 'You Need Dried Cannabis', 'error') return end
local check = lib.callback.await('md-drugs:client:uncuff', src, 'Grinding Weed')
if not check then return end
if RemoveItem(src, "drycannabis",1 ) then
AddItem(src, "grindedweed", 1)
end
end) end)
QBCore.Functions.CreateUseableItem("weedgrinder", function(source, item) CUI("mdwoods", function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local check = lib.callback.await('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
if Player.Functions.RemoveItem("drycannabis",1 ) then if not check then return end
Player.Functions.AddItem("grindedweed", 1) if RemoveItem(src, "mdwoods",1 ) then
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["grindedweed"], "add", 1) AddItem(src, "bluntwrap", 5)
TriggerClientEvent("md-drugs:client:grind", src) AddItem(src, "tobacco", 5)
else end
Notifysu('You Need Dried Weed', 'error', src)
end
end) end)
QBCore.Functions.CreateUseableItem("mdwoods", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
TriggerClientEvent("md-drugs:client:rollanim", src)
Wait(4000)
if Player.Functions.RemoveItem("mdwoods",1 ) then
Player.Functions.AddItem("bluntwrap", 5)
Player.Functions.AddItem("tobacco", 5)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["bluntwrap"], "add", 1)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["tobacco"], "add", 1)
end
end)
+58 -157
View File
@@ -1,167 +1,68 @@
local QBCore = exports['qb-core']:GetCoreObject()
local coke = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"} local coke = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"}
local crack = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"} local crack = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"}
local lsd = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'} local lsd = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'}
local heroin = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'} local heroin = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'}
local xtc = {"white_playboys", "white_playboys2", "white_playboys3", "white_playboys4", "blue_playboys", "blue_playboys2", "blue_playboys3", "blue_playboys4", "red_playboys", "red_playboys2", "red_playboys3", "red_playboys4", "orange_playboys", "orange_playboy2s", "orange_playboys3", "orange_playboys4", "white_aliens", "white_aliens2", "white_aliens3", "white_aliens4", "blue_aliens", "blue_aliens2", "blue_aliens3", "blue_aliens4", "red_aliens", "red_aliens3", "red_aliens2", "red_aliens4", "orange_aliens", "orange_aliens2", "orange_aliens3", "orange_aliens4", "white_pl", "white_pl2", "white_pl3", "white_pl4", "blue_pl", "blue_pl2", "blue_pl3", "blue_pl4", "red_pl", "red_pl2", "red_pl3", "red_pl4", "orange_pl", "orange_pl2", "orange_pl3", "orange_pl4", "white_trolls", "white_trolls2", "white_trolls3", "white_trolls4", "blue_trolls", "blue_trolls2", "blue_trolls3", "blue_trolls4", "red_trolls", "red_trolls2", "red_trolls3", "red_trolls4", "orange_trolls", "orange_trolls2", "orange_trolls3", "orange_trolls4", "white_cats2", "white_cats3", "white_cats4", "white_cats", "blue_cats", "blue_cats3", "blue_cats2", "blue_cats4", "red_cats", "red_cats2", "red_cats3", "red_cats4", "orange_cats", "orange_cats2", "orange_cats3", "orange_cats4" } local xtc = {"white_playboys", "white_playboys2", "white_playboys3", "white_playboys4", "blue_playboys", "blue_playboys2", "blue_playboys3", "blue_playboys4", "red_playboys", "red_playboys2", "red_playboys3", "red_playboys4", "orange_playboys", "orange_playboy2s", "orange_playboys3", "orange_playboys4", "white_aliens", "white_aliens2", "white_aliens3", "white_aliens4", "blue_aliens", "blue_aliens2", "blue_aliens3", "blue_aliens4", "red_aliens", "red_aliens3", "red_aliens2", "red_aliens4", "orange_aliens", "orange_aliens2", "orange_aliens3", "orange_aliens4", "white_pl", "white_pl2", "white_pl3", "white_pl4", "blue_pl", "blue_pl2", "blue_pl3", "blue_pl4", "red_pl", "red_pl2", "red_pl3", "red_pl4", "orange_pl", "orange_pl2", "orange_pl3", "orange_pl4", "white_trolls", "white_trolls2", "white_trolls3", "white_trolls4", "blue_trolls", "blue_trolls2", "blue_trolls3", "blue_trolls4", "red_trolls", "red_trolls2", "red_trolls3", "red_trolls4", "orange_trolls", "orange_trolls2", "orange_trolls3", "orange_trolls4", "white_cats2", "white_cats3", "white_cats4", "white_cats", "blue_cats", "blue_cats3", "blue_cats2", "blue_cats4", "red_cats", "red_cats2", "red_cats3", "red_cats4", "orange_cats", "orange_cats2", "orange_cats3", "orange_cats4" }
local burners = {cokeburner = coke, crackburner = crack, lsdburner = lsd, heroinburner = heroin, xtcburner = xtc}
local active = {}
QBCore.Functions.CreateUseableItem("cokeburner", function(source, item) local Price = {
local src = source coke = {min = 20, max = 60},
local Player = QBCore.Functions.GetPlayer(source) crack = {min = 20, max = 60},
TriggerClientEvent("md-drugs:client:GetLocation", src, 'coke', "Bring Me All The Coke You Have") lsd = {min = 20, max = 60},
end) heroin = {min = 20, max = 60},
xtc = {min = 20, max = 60},
RegisterServerEvent('md-drugs:server:wholesalecoke', function() }
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local price = math.random(Config.Wcoke.min, Config.Wcoke.max)
for k, v in pairs(coke) do
local item = Player.Functions.GetItemByName(v)
if item and item.amount > 0 then for k, v in pairs (burners) do
local removed = Player.Functions.RemoveItem(v, item.amount) CUI(k, function(source, item)
Player.Functions.AddMoney("cash", item.amount * price) local src = source
Notifys("You received " .. item.amount * price .. " Dollars!" , "success") local Player = getPlayer(src)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') if getCops() < Config.PoliceCount then return Notifys(src, Lang.Wholesale.na, 'error') end
for m, d in pairs (active) do
if d.cid == Player.PlayerData.citizenid then
return Notifys(src, Lang.Wholesale.al, 'error' )
end
end
local tab = ''
if k == 'cokeburner' then tab = 'coke' end
if k == 'crackburner' then tab = 'crack' end
if k == 'lsdburner' then tab = 'lsd' end
if k == 'heroinburner' then tab = 'heroin' end
if k == 'xtcburner' then tab = 'xtc' end
if RemoveItem(src, k, 1) then
table.insert(active, {
src = src,
item = k,
location = getRandW(src),
cid = Player.PlayerData.citizenid,
type = v,
price = Price[tab]
})
for m, d in pairs (active) do
if d.cid == Player.PlayerData.citizenid then
TriggerClientEvent("md-drugs:client:GetLocation", src, active[m])
end
end
end
end)
end
RegisterNetEvent('md-drugs:server:SuccessSale', function(data)
local src = source
local Player = getPlayer(src)
for k, v in pairs (active) do
if v.cid == Player.PlayerData.citizenid then
local payout = math.random(v.price.min, v.price.max)
for m, d in pairs (v.type) do
local git = Player.Functions.GetItemByName(d)
if git and git.amount >= 1 then
RemoveItem(src, d, git.amount)
Player.Functions.AddMoney('cash', git.amount * payout)
end
table.remove(active, k)
end
end end
end end
end) end)
QBCore.Functions.CreateUseableItem("crackburner", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(source)
TriggerClientEvent("md-drugs:client:GetLocation", src, 'crack', "Bring Me All The Crack You Have")
end)
RegisterServerEvent('md-drugs:server:wholesalecrack', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local price = math.random(Config.Wcrack.min, Config.Wcrack.max)
for k, v in pairs(crack) do
local item = Player.Functions.GetItemByName(v)
if item and item.amount > 0 then
local removed = Player.Functions.RemoveItem(v, item.amount)
Player.Functions.AddMoney("cash", item.amount * price)
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale')
end
end
end)
----------------- lsd
QBCore.Functions.CreateUseableItem("lsdburner", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(source)
TriggerClientEvent("md-drugs:client:GetLocation", src, 'lsd', "Bring Me All The lsd You Have")
end)
RegisterServerEvent('md-drugs:server:wholesalelsd', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local price = math.random(Config.Wlsd.min, Config.Wlsd.max)
for k, v in pairs(lsd) do
local item = Player.Functions.GetItemByName(v)
if item and item.amount > 0 then
local removed = Player.Functions.RemoveItem(v, item.amount)
Player.Functions.AddMoney("cash", item.amount * price)
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale')
end
end
end)
----------------- heroin
QBCore.Functions.CreateUseableItem("heroinburner", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(source)
TriggerClientEvent("md-drugs:client:GetLocation", src, 'heroin', "Bring Me All The Heroin You Have")
end)
RegisterServerEvent('md-drugs:server:wholesaleheroin', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local price = math.random(Config.WHeroin.min, Config.WHeroin.max)
for k, v in pairs(heroin) do
local item = Player.Functions.GetItemByName(v)
if item and item.amount > 0 then
local removed = Player.Functions.RemoveItem(v, item.amount)
Player.Functions.AddMoney("cash", item.amount * price)
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale')
end
end
end)
---- xtc
QBCore.Functions.CreateUseableItem("xtcburner", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(source)
TriggerClientEvent("md-drugs:client:GetLocation", src, 'xtc', "Bring Me All The xtc You Have")
end)
RegisterServerEvent('md-drugs:server:wholesalextc', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local price = math.random(Config.WXTC.min, Config.WXTC.max)
for k, v in pairs(xtc) do
local item = Player.Functions.GetItemByName(v)
if item and item.amount > 0 then
local removed = Player.Functions.RemoveItem(v, item.amount)
Player.Functions.AddMoney("cash", item.amount * price)
Notifys("You received " .. item.amount * price .. " Dollars!" , "success")
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale')
end
end
end)
RegisterServerEvent('md-drugs:server:RemoveBurner', function(item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if item == 'coke' then
if Player.Functions.RemoveItem('cokeburner', 1) then
else
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
end
elseif item == 'crack' then
if Player.Functions.RemoveItem('crackburner', 1) then
else
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
end
elseif item == 'heroin' then
if Player.Functions.RemoveItem('heroinburner', 1) then
else
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
end
elseif item == 'lsd' then
if Player.Functions.RemoveItem('lsdburner', 1) then
else
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
end
elseif item == 'xtc' then
if Player.Functions.RemoveItem('xtcburner', 1) then
else
DropPlayer(src, 'How Did You Trigger The Event Without The Item?')
end
end
end)
+134 -270
View File
@@ -1,25 +1,22 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
-------------------- stealing ingridients -------------------- stealing ingridients
local activePresses = {}
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num) RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) if not checkLoc(src, 'isosafrole',num) then return end
local playerPed = GetPlayerPed(source) if AddItem(src, "isosafrole", 1) then
if CheckDist(source, playerPed, Config.isosafrole[num]['loc']) then return end
if AddItem("isosafrole", 1) then end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stole isosafrole with a distance of ' .. dist(source, playerPed, Config.isosafrole[num]['loc']) .. ' vectors!', 'xtc')
end
end) end)
RegisterServerEvent('md-drugs:server:stealmdp2p', function(num) RegisterServerEvent('md-drugs:server:stealmdp2p', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(src, 'mdp2p',num) then return end
if CheckDist(source, playerPed, Config.mdp2p[num]['loc']) then return end if AddItem(src,"mdp2p", 1) then
if AddItem("mdp2p", 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stole MDP2P with a distance of ' .. dist(source, playerPed, Config.mdp2p[num]['loc']) .. ' vectors!', 'xtc')
end end
end) end)
local presses = { local presses = {
{item = 'singlepress', data = 'single'}, {item = 'singlepress', data = 'single'},
{item = 'dualpress', data = 'dual'}, {item = 'dualpress', data = 'dual'},
@@ -27,167 +24,108 @@ local presses = {
{item = 'quadpress', data = 'quad'}, {item = 'quadpress', data = 'quad'},
} }
for k, v in pairs (presses) do for k, v in pairs (presses) do
QBCore.Functions.CreateUseableItem(v.item, function(source, item) CUI(v.item, function(source, item)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) local check, loc = lib.callback.await('md-drugs:client:setpress', src, v.data)
if TriggerClientEvent("md-drugs:client:setpress", src, v.data) then if check then
Player.Functions.RemoveItem(v.item, 1) if RemoveItem(src, v.item, 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed A ' .. v.item .. ' At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') table.insert(activePresses, {
press = v.data,
get = v.item,
owner = GetName(src),
ownerid = Player.PlayerData.citizenid,
src = src,
loc = loc
})
end
end end
end) end)
end end
RegisterServerEvent('md-drugs:server:getpressback', function(type) RegisterServerEvent('md-drugs:server:getpressback', function(type)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) for k, v in pairs (activePresses) do
if type == 'single' then if v.ownerid == Player.PlayerData.citizenid then
if Player.Functions.GetItemByName('singlepress') then Notifys('You Already Have A Kit') return end if v.press == type then
AddItem('singlepress', 1) table.remove(activePresses, k)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Single Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') AddItem(src, v.get, 1)
elseif type == 'dual' then end
if Player.Functions.GetItemByName('dualpress') then Notifys('You Already Have A Kit') return end end
AddItem('dualpress', 1) end
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Dual Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc')
elseif type == 'triple' then
if Player.Functions.GetItemByName('triplepress') then Notifys('You Already Have A Kit') return end
AddItem('triplepress', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Triple Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc')
elseif type == 'quad' then
if Player.Functions.GetItemByName('quadpress') then Notifys('You Already Have A Kit') return end
AddItem('quadpress', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Quad Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc')
end
end) end)
local function pressout(source)
local src = source
local Player = getPlayer(src)
local ped = GetPlayerPed(src)
local coords = GetEntityCoords(ped)
for k, v in pairs (activePresses) do
if v.ownerid == Player.PlayerData.citizenid then
if #(coords - v.loc) < 3.0 then
return v.press
end
end
end
return 'none'
end
RegisterServerEvent('md-drugs:server:makextc', function(data) RegisterServerEvent('md-drugs:server:makextc', function(data)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(src, 'raw_xtc', 1) then return end
if data.data == 'single' then if pressout(src) == 'none' then return end
if pressout(src) == 'single' then
if data.color == 'white' then if data.color == 'white' then
if RemoveItem('raw_xtc', 1) then if not GetRecipe(src, 'xtc', 'singlestack', 'white') then return end
AddItem('white_xtc', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack White Pill!', 'xtc')
end
elseif data.color == 'red' then elseif data.color == 'red' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'singlestack', 'red') then return end
if not Itemcheck(Player, 'loosecoke', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('loosecoke', 1)
AddItem('red_xtc', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Red Pill!', 'xtc')
elseif data.color == 'orange' then elseif data.color == 'orange' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'singlestack', 'orange') then return end
if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('heroinvial', 1)
AddItem('orange_xtc', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Orange Pill!', 'xtc')
elseif data.color == 'blue' then elseif data.color == 'blue' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'singlestack', 'blue') then return end
if not Itemcheck(Player, 'crackrock', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('crackrock', 1)
AddItem('blue_xtc', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Blue Pill!', 'xtc')
end end
elseif data.data == 'dual' then elseif pressout(src) == 'dual' then
if data.color == 'white' then if data.color == 'white' then
if RemoveItem('raw_xtc', 1) then if not GetRecipe(src, 'xtc', 'dualstack', 'white') then return end
AddItem('white_xtc2', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack White Pill!', 'xtc')
end
elseif data.color == 'red' then elseif data.color == 'red' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'dualstack', 'red') then return end
if not Itemcheck(Player, 'loosecoke', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('loosecoke', 1)
AddItem('red_xtc2', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Red Pill!', 'xtc')
elseif data.color == 'orange' then elseif data.color == 'orange' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'dualstack', 'orange') then return end
if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('heroinvial', 1)
AddItem('orange_xtc2', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Orange Pill!', 'xtc')
elseif data.color == 'blue' then elseif data.color == 'blue' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'dualstack', 'blue') then return end
if not Itemcheck(Player, 'crackrock', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('crackrock', 1)
AddItem('blue_xtc2', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Blue Pill!', 'xtc')
end end
elseif data.data == 'triple' then elseif pressout(src) == 'triple' then
if data.color == 'white' then if data.color == 'white' then
if RemoveItem('raw_xtc', 1) then if not GetRecipe(src, 'xtc', 'triplestack', 'white') then return end
AddItem('white_xtc3', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack White Pill!', 'xtc')
end
elseif data.color == 'red' then elseif data.color == 'red' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'triplestack', 'red') then return end
if not Itemcheck(Player, 'loosecoke', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('loosecoke', 1)
AddItem('red_xtc3', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Red Pill!', 'xtc')
elseif data.color == 'orange' then elseif data.color == 'orange' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'triplestack', 'orange') then return end
if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('heroinvial', 1)
AddItem('orange_xtc3', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Orange Pill!', 'xtc')
elseif data.color == 'blue' then elseif data.color == 'blue' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'triplestack', 'blue') then return end
if not Itemcheck(Player, 'crackrock', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('crackrock', 1)
AddItem('blue_xtc3', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Blue Pill!', 'xtc')
end end
elseif data.data == 'quad' then elseif pressout(src) == 'quad' then
if data.color == 'white' then if data.color == 'white' then
if RemoveItem('raw_xtc', 1) then if not GetRecipe(src, 'xtc', 'quadstack', 'white') then return end
AddItem('white_xtc4', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack White Pill!', 'xtc')
end
elseif data.color == 'red' then elseif data.color == 'red' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'quadstack', 'red') then return end
if not Itemcheck(Player, 'loosecoke', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('loosecoke', 1)
AddItem('red_xtc4', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Red Pill!', 'xtc')
elseif data.color == 'orange' then elseif data.color == 'orange' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'quadstack', 'orange') then return end
if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('heroinvial', 1)
AddItem('orange_xtc4', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Orange Pill!', 'xtc')
elseif data.color == 'blue' then elseif data.color == 'blue' then
if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not GetRecipe(src, 'xtc', 'quadstack', 'blue') then return end
if not Itemcheck(Player, 'crackrock', 1, 'true') then return end
RemoveItem('raw_xtc', 1)
RemoveItem('crackrock', 1)
AddItem('blue_xtc4', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Blue Pill!', 'xtc')
end end
end end
end) end)
RegisterServerEvent('md-drugs:server:buypress', function() RegisterServerEvent('md-drugs:server:buypress', function()
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
if Player.Functions.RemoveMoney("cash", 20000) then if Player.Functions.RemoveMoney("cash", 20000) then
AddItem("singlepress", 1) AddItem(src, "singlepress", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A Pill Press', 'xtc') Log(GetName(source) .. ' Bought A Pill Press', 'xtc')
else else
Notifys(Lang.xtc.cash, "error") Notifys(Lang.xtc.cash, "error")
end end
@@ -195,100 +133,42 @@ RegisterServerEvent('md-drugs:server:buypress', function()
RegisterServerEvent('md-drugs:server:upgradepress', function(data) RegisterServerEvent('md-drugs:server:upgradepress', function(data)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
local playerPed = GetPlayerPed(source)
if CheckDist(source, playerPed, Config.buypress) then return end
if data == 'dual' then if data == 'dual' then
local have = 0 if not GetRecipe(src, 'xtc', 'press', 'dual') then return end
local pill = {'white_xtc', 'blue_xtc', 'red_xtc', 'orange_xtc'}
for k, v in pairs (pill) do
if Itemcheck(Player, v, 20, 'true') then have = have + 1 end
end
if have == 4 then
if not Itemcheck(Player, 'singlepress', 1, 'true') then return end
RemoveItem('white_xtc', 20)
RemoveItem('blue_xtc', 20)
RemoveItem('red_xtc', 20)
RemoveItem('orange_xtc', 20)
RemoveItem('singlepress', 1)
AddItem('dualpress', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Dual Press', 'xtc')
end
elseif data == 'triple' then elseif data == 'triple' then
local have = 0 if not GetRecipe(src, 'xtc', 'press', 'triple') then return end
local pill = {'white_xtc2', 'blue_xtc2', 'red_xtc2', 'orange_xtc2'}
for k, v in pairs (pill) do
if Itemcheck(Player, v, 50, 'true') then have = have + 1 end
end
if have == 4 then
RemoveItem('dualpress', 1)
RemoveItem('white_xtc2', 50)
RemoveItem('blue_xtc2', 50)
RemoveItem('red_xtc2', 50)
RemoveItem('orange_xtc2', 50)
AddItem('triplepress', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Triple Press', 'xtc')
end
elseif data == 'quad' then elseif data == 'quad' then
local have = 0 if not GetRecipe(src, 'xtc', 'press', 'quad') then return end
local pill = {'white_xtc3', 'blue_xtc3', 'red_xtc3', 'orange_xtc3'}
for k, v in pairs (pill) do
if Itemcheck(Player, v, 150, 'true') then have = have + 1 end
end
if have == 4 then
RemoveItem('triplepress', 1)
RemoveItem('white_xtc3', 150)
RemoveItem('blue_xtc3', 150)
RemoveItem('red_xtc3', 150)
RemoveItem('orange_xtc3', 150)
AddItem('quadpress', 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Quad Press', 'xtc')
end
else else
Notify('huh', 'error') Notifys(src, 'huh', 'error')
end end
end) end)
------------- making powder ------------- making powder
RegisterServerEvent('md-drugs:server:makingrawxtc', function(num) RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local Player = getPlayer(src)
local playerPed = GetPlayerPed(source) if not checkLoc(src, 'rawxtcloc',num) then return end
if CheckDist(source, playerPed, Config.rawxtcloc[num]['loc']) then return end if not GetRecipe(src, 'xtc', 'raw', 'raw_xtc') then return end
if not Itemcheck(Player, 'mdp2p', 1, 'true') and not Itemcheck(Player, 'isosafrole', 1, 'true') then return end
RemoveItem('mdp2p', 1)
RemoveItem('isosafrole', 1)
AddItem("raw_xtc", 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw XTC With A Distance Of ' .. dist(source, playerPed, Config.rawxtcloc[num]['loc']) .. '!', 'xtc')
end) end)
RegisterServerEvent('md-drugs:server:stampwhite', function(num) RegisterServerEvent('md-drugs:server:stampwhite', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src) local one = {'white_playboys', 'white_aliens', 'white_pl', 'white_trolls', 'white_cats'}
local one = {'white_playboys', 'white_aliens', 'white_pl', 'white_trolls', 'white_cats'} local chance = math.random(#one)
local chance = math.random(#one) local two = {'white_playboys2', 'white_aliens2', 'white_pl2', 'white_trolls2', 'white_cats2'}
local two = {'white_playboys2', 'white_aliens2', 'white_pl2', 'white_trolls2', 'white_cats2'} local three = {'white_playboys3', 'white_aliens3', 'white_pl3', 'white_trolls3', 'white_cats3'}
local chance2 = math.random(#one) local four = {'white_playboys4', 'white_aliens4', 'white_pl4', 'white_trolls4', 'white_cats4'}
local three = {'white_playboys3', 'white_aliens3', 'white_pl3', 'white_trolls3', 'white_cats3'} if not checkLoc(src, 'stamp', num) then return end
local chance3 = math.random(#one)
local four = {'white_playboys4', 'white_aliens4', 'white_pl4', 'white_trolls4', 'white_cats4'}
local chance4 = math.random(#one)
local playerPed = GetPlayerPed(source)
if CheckDist(source, playerPed, Config.stamp[num]['loc']) then return end
if Player.Functions.RemoveItem("white_xtc", 1) then if RemoveItem(src, "white_xtc", 1) then
AddItem(one[chance], 1) AddItem(src, one[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single White Pill And Got ' .. one[chance] .. '!', 'xtc') elseif RemoveItem(src, "white_xtc2", 1) then
elseif Player.Functions.RemoveItem("white_xtc2", 1) then AddItem(src, two[chance], 1)
AddItem(two[chance2], 1) elseif RemoveItem(src, "white_xtc3", 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual White Pill And Got ' .. two[chance2] .. '!', 'xtc') AddItem(src, three[chance], 1)
elseif Player.Functions.RemoveItem("white_xtc3", 1) then elseif RemoveItem(src, "white_xtc4", 1) then
AddItem(three[chance3], 1) AddItem(src, four[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple White Pill And Got ' .. three[chance3] .. '!', 'xtc')
elseif Player.Functions.RemoveItem("white_xtc4", 1) then
AddItem(four[chance4], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad White Pill And Got ' .. four[chance4] .. '!', 'xtc')
else else
Notifys('You Dont Have Unstamped White Pills', 'error') Notifys('You Dont Have Unstamped White Pills', 'error')
end end
@@ -296,30 +176,21 @@ end)
RegisterServerEvent('md-drugs:server:stampred', function(num) RegisterServerEvent('md-drugs:server:stampred', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
local one = {'red_playboys', 'red_aliens', 'red_pl', 'red_trolls', 'red_cats'} local one = {'red_playboys', 'red_aliens', 'red_pl', 'red_trolls', 'red_cats'}
local chance = math.random(#one) local chance = math.random(#one)
local two = {'red_playboys2', 'red_aliens2', 'red_pl2', 'red_trolls2', 'red_cats2'} local two = {'red_playboys2', 'red_aliens2', 'red_pl2', 'red_trolls2', 'red_cats2'}
local chance2 = math.random(#one)
local three = {'red_playboys3', 'red_aliens3', 'red_pl3', 'red_trolls3', 'red_cats3'} local three = {'red_playboys3', 'red_aliens3', 'red_pl3', 'red_trolls3', 'red_cats3'}
local chance3 = math.random(#one)
local four = {'red_playboys4', 'red_aliens4', 'red_pl4', 'red_trolls4', 'red_cats4'} local four = {'red_playboys4', 'red_aliens4', 'red_pl4', 'red_trolls4', 'red_cats4'}
local chance4 = math.random(#one) if not checkLoc(src, 'stamp', num) then return end
local playerPed = GetPlayerPed(source)
if CheckDist(source, playerPed, Config.stamp[num]['loc']) then return end
if Player.Functions.RemoveItem("red_xtc", 1) then if RemoveItem(src, "red_xtc", 1) then
AddItem(one[chance], 1) AddItem(src, one[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Red Pill And Got ' .. one[chance] .. '!', 'xtc') elseif RemoveItem(src, "red_xtc2", 1) then
elseif Player.Functions.RemoveItem("red_xtc2", 1) then AddItem(src, two[chance], 1)
AddItem(two[chance2], 1) elseif RemoveItem(src, "red_xtc3", 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Red Pill And Got ' .. two[chance2] .. '!', 'xtc') AddItem(src, three[chance], 1)
elseif Player.Functions.RemoveItem("red_xtc3", 1) then elseif RemoveItem(src, "red_xtc4", 1) then
AddItem(three[chance3], 1) AddItem(src, four[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Red Pill And Got ' .. three[chance3] .. '!', 'xtc')
elseif Player.Functions.RemoveItem("red_xtc4", 1) then
AddItem(four[chance4], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Red Pill And Got ' .. four[chance4] .. '!', 'xtc')
else else
Notifys('You Dont Have Unstamped red Pills', 'error') Notifys('You Dont Have Unstamped red Pills', 'error')
end end
@@ -327,30 +198,21 @@ end)
RegisterServerEvent('md-drugs:server:stamporange', function(num) RegisterServerEvent('md-drugs:server:stamporange', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
local one = {'orange_playboys', 'orange_aliens', 'orange_pl', 'orange_trolls', 'orange_cats'} local one = {'orange_playboys', 'orange_aliens', 'orange_pl', 'orange_trolls', 'orange_cats'}
local chance = math.random(#one)
local two = {'orange_playboys2', 'orange_aliens2', 'orange_pl2', 'orange_trolls2', 'orange_cats2'} local two = {'orange_playboys2', 'orange_aliens2', 'orange_pl2', 'orange_trolls2', 'orange_cats2'}
local chance2 = math.random(#one)
local three = {'orange_playboys3', 'orange_aliens3', 'orange_pl3', 'orange_trolls3', 'orange_cats3'} local three = {'orange_playboys3', 'orange_aliens3', 'orange_pl3', 'orange_trolls3', 'orange_cats3'}
local chance3 = math.random(#one)
local four = {'orange_playboys4', 'orange_aliens4', 'orange_pl4', 'orange_trolls4', 'orange_cats4'} local four = {'orange_playboys4', 'orange_aliens4', 'orange_pl4', 'orange_trolls4', 'orange_cats4'}
local chance4 = math.random(#one) local chance = math.random(#one)
local playerPed = GetPlayerPed(source) if not checkLoc(src, 'stamp', num) then return end
if CheckDist(source, playerPed, Config.stamp[num]['loc']) then return end
if Player.Functions.RemoveItem("orange_xtc", 1) then if RemoveItem(src, "orange_xtc", 1) then
AddItem(one[chance], 1) AddItem(src, one[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Orange Pill And Got ' .. one[chance] .. '!', 'xtc') elseif RemoveItem(src, "orange_xtc2", 1) then
elseif Player.Functions.RemoveItem("orange_xtc2", 1) then AddItem(src, two[chance], 1)
AddItem(two[chance2], 1) elseif RemoveItem(src, "orange_xtc3", 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Orange Pill And Got ' .. two[chance2] .. '!', 'xtc') AddItem(src, three[chance], 1)
elseif Player.Functions.RemoveItem("orange_xtc3", 1) then elseif RemoveItem(src, "orange_xtc4", 1) then
AddItem(three[chance3], 1) AddItem(src, four[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Orange Pill And Got ' .. three[chance3] .. '!', 'xtc')
elseif Player.Functions.RemoveItem("orange_xtc4", 1) then
AddItem(four[chance4], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Orange Pill And Got ' .. four[chance4] .. '!', 'xtc')
else else
Notifys('You Dont Have Unstamped orange Pills', 'error') Notifys('You Dont Have Unstamped orange Pills', 'error')
end end
@@ -358,30 +220,32 @@ end)
RegisterServerEvent('md-drugs:server:stampblue', function(num) RegisterServerEvent('md-drugs:server:stampblue', function(num)
local src = source local src = source
local Player = QBCore.Functions.GetPlayer(src)
local one = {'blue_playboys', 'blue_aliens', 'blue_pl', 'blue_trolls', 'blue_cats'} local one = {'blue_playboys', 'blue_aliens', 'blue_pl', 'blue_trolls', 'blue_cats'}
local chance = math.random(#one) local chance = math.random(#one)
local two = {'blue_playboys2', 'blue_aliens2', 'blue_pl2', 'blue_trolls2', 'blue_cats2'} local two = {'blue_playboys2', 'blue_aliens2', 'blue_pl2', 'blue_trolls2', 'blue_cats2'}
local chance2 = math.random(#one)
local three = {'blue_playboys3', 'blue_aliens3', 'blue_pl3', 'blue_trolls3', 'blue_cats3'} local three = {'blue_playboys3', 'blue_aliens3', 'blue_pl3', 'blue_trolls3', 'blue_cats3'}
local chance3 = math.random(#one)
local four = {'blue_playboys4', 'blue_aliens4', 'blue_pl4', 'blue_trolls4', 'blue_cats4'} local four = {'blue_playboys4', 'blue_aliens4', 'blue_pl4', 'blue_trolls4', 'blue_cats4'}
local chance4 = math.random(#one) if not checkLoc(src, 'stamp', num) then return end
local playerPed = GetPlayerPed(source) if RemoveItem(src, "blue_xtc", 1) then
if CheckDist(source, playerPed, Config.stamp[num]['loc']) then return end AddItem(src, one[chance], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Blue Pill And Got ' .. one[chance] .. '!', 'xtc') elseif RemoveItem(src, "blue_xtc2", 1) then
if Player.Functions.RemoveItem("blue_xtc", 1) then AddItem(src, two[chance], 1)
AddItem(one[chance], 1) elseif RemoveItem(src, "blue_xtc3", 1) then
elseif Player.Functions.RemoveItem("blue_xtc2", 1) then AddItem(src, three[chance], 1)
AddItem(two[chance2], 1) elseif RemoveItem(src, "blue_xtc4", 1) then
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Blue Pill And Got ' .. two[chance2] .. '!', 'xtc') AddItem(src, four[chance], 1)
elseif Player.Functions.RemoveItem("blue_xtc3", 1) then
AddItem(three[chance3], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Blue Pill And Got ' .. three[chance3] .. '!', 'xtc')
elseif Player.Functions.RemoveItem("blue_xtc4", 1) then
AddItem(four[chance4], 1)
Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Blue Pill And Got ' .. four[chance4] .. '!', 'xtc')
else else
Notifys('You Dont Have Unstamped blue Pills', 'error') Notifys('You Dont Have Unstamped blue Pills', 'error')
end end
end)
AddEventHandler('playerDropped', function()
local src = source
local Player = getPlayer(src)
for k, v in pairs (activePresses) do
if v.ownerid == Player.PlayerData.citizenid then
table.remove(activePresses, k)
AddItem(src, v.get, 1)
end
end
end) end)
+33 -341
View File
@@ -1,11 +1,21 @@
Config = {} --Ignore. Config = {} --Ignore.
Config.oxtarget = false --- turn to true if you use oxtarget
Config.respawnTime = 150 -- Seconds Config.respawnTime = 150 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd) Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
Config.StupidassNewQbItemName = true -- true if you have updated your items.lua from base qb after november 2023 because changing item names this far in a framework is 3 IQ points total Config.StupidassNewQbItemName = true -- true if you have updated your items.lua from base qb after november 2023 because changing item names this far in a framework is 3 IQ points total
Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow
Config.FancyCokeAnims = true -- if you want multi location this needs to be false
Config.Joblock = false -- if you want weed to be a job
Config.weedjob = "" -- what the job name is
Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
Config.MethHeist = false
Config.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
Config.WholesaleTimeout = 600 -- time in seconds to get to the location
Config.PoliceCount = 0 -- Amount of police required
Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police
----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE ----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE
Config.Tier1 = 100 -- amount to hit for level 2 Config.Tier1 = 100 -- amount to hit for level 2
@@ -13,348 +23,30 @@ Config.Tier2 = 300 -- amount to hit for level 3
---------------------------------- BRIDGE ---------------------------------- BRIDGE
Config.progressbartype = 'oxcir' -- either 'qb', 'oxcir', 'oxbar' Config.progressbartype = 'oxcir' -- either 'qb', 'oxcir', 'oxbar'
Config.minigametype = 'ox' -- either 'ps' or 'ox' or 'none'
Config.Notify = 'ox' -- -- either 'qb' or 'ox' or 'okok' Config.Notify = 'ox' -- -- either 'qb' or 'ox' or 'okok'
Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs' Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty' Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
Config.Target = 'ox' -- qb or ox
------------- you can either set a gang or leave it blank, if blank it will autopopulate data to not require it :) Config.Inventory = 'ox' -- qb or ox, other if you dont use ox just mark as qb
------------- Cocaine -- new animations require to be in a certain spot or they get fucky. uses bob74 ipl if you turn Config.FancyCokeAnims you can put it anywhere :) Config.Minigames = {
Config.FancyCokeAnims = false -- if you want multi location this needs to be false ps_circle = {amount = 2, speed = 8,},
ps_maze = {timelimit = 15},
Config.CokeTeleIn = vector3(198.16, -1276.92, 29.33)-- where you target to go inside ps_scrambler = {type = 'numeric', time = 15, mirrored = 0},
ps_var = {numBlocks = 5, time = 10},
Config.CokeTeleOut = vector3(1088.81, -3187.57, -38.99) -- where you target to leave ps_thermite = {time = 10, gridsize = 5, incorrect = 3},
ox = {'easy', 'easy'}, --easy medium or hard each one corresponds to how many skillchecks and the difficulty
Config.MakePowder = { -- where you chop your coca leaves to make powder blcirprog = {amount = 2, speed = 50}, -- speed = 1-100
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, blprog = {amount = 1, speed = 50}, -- speed = 1-100
} blkeyspam = {amount = 1, difficulty = 50}, -- difficulty = 1-100
Config.CuttingCoke = { -- only active if Config.FancyCokeAnims = false blkeycircle = {amount = 1, difficulty = 50, keynumbers = 3},
{loc = vector3(1095.66, -3195.4, -39.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, blnumberslide = {amount = 1, difficulty = 50, keynumbers = 3},
} blrapidlines = {amount = 1, difficulty = 50, numberofline = 3},
Config.BaggingCoke = { -- only active if Config.FancyCokeAnims = false blcircleshake = {amount = 1, difficulty = 50, stages = 3},
{loc = vector3(1100.34, -3199.44, -39.19), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, glpath = {gridSize = 19, lives = 3, timelimit = 10000},
} glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10},
---------------- Crack locations glmath = {timeLimit = 300000},
Config.makecrack = { -- make crack with baking soda with cut coke 1-3
{loc = vector3(2434.07, 4969.39, 42.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.bagcrack = { --- bag crack 1-3 stages
{loc = vector3(2435.85, 4965.3, 42.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
------------------------- LSD Locations
Config.lysergicacid = { -- get lysergic acid
{loc = vector3(-1381.21, -327.75, 39.85), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2405.53, 5008.39, 46.02), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.diethylamide = { -- get diethylamide
{loc = vector3(-1371.71, -316.02, 39.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2408.38, 5011.18, 46.08), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.gettabs = { -- buy tab paper
{loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51)-- buy lab kit
Config.tabcost = 100 -- price per piece of tab paper event does 10 at a time
Config.lsdlabkitcost = 10000 -- price of the lsd lab kit
------------------------- Heroin Locations
Config.dryplant = { -- turn resin into powder
{loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.cutheroinone = { -- cut heroin stage 1-3 with baking soda
{loc = vector3(-1360.14, -337.03, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.fillneedle = { -- fill needles with heroin
{loc = vector3(-1366.32, -334.40, 44.44), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13) -- buy heroin lab kit
Config.heroinlabkitprice = 10000 -- price of the lsd lab kit
------------ XTC
Config.isosafrole = { -- where to steal isosafrole
{loc = vector3(844.39, -902.92, 25.42), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.mdp2p = { -- where to steal mdp2p
{loc = vector3(844.4, -898.79, 25.23), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.rawxtcloc = { -- where to combine the 2 ingridents to make raw xtc
{loc = vector3(844.71, -910.33, 25.37), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.stamp = { -- where to stamp pills
{loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.buypress = vector3(845.82, -884.79, 25.18)-- Where you buy your presses
----- mescaline
Config.DryOut = vector3(2622.6, 4222.57, 43.6) -- Place to dry out mescaline into usuable drug
Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
-------------- lean
Config.SyrupVendor = vector4(365.21, -578.77, 39.30, 347.23) -- where the mission ped starts
Config.StartLoc = {
vector3(-2307.22, 434.77, 174.47), -- where the truck spawns
vector3(614.75, 1786.26, 199.39),
vector3(-224.89, 6388.32, 31.59)
}
---------- Pharma
Config.FillPrescription = {---------- this is where you want people to take their prescription to get a bottle of pills. They use bottle to get a random amount of prescription pills
{loc = vector3(2432.89, 4252.2, 36.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.PharmaJob = "ems" -- what TYPE role you need to be on to get the command
-------------- weed
Config.Teleout = vector3(1066.31, -3183.36, -39.16) -- where you target to tele in
Config.Telein = vector3(244.74, 374.54, 105.74) -- where you target to tele out
Config.MakeButter = vector3(1045.48, -3198.49, -38.22) -- where you make cannabutter and baked edibles
Config.MakeOil = vector3(1038.90, -3198.66, -38.17-1) -- where you make shatter
Config.WeedSaleman = vector4(1030.46, -3203.63, -38.2, 180.0)
Config.WeedDry = { -- where you dry leaves
vector3(1043.0, -3191.59, -38.39),
vector3(1041.0, -3191.59, -38.39),
vector3(1045.0, -3191.59, -38.39),
vector3(1039.0, -3191.59, -38.39),
}
Config.Joblock = false -- if you want weed to be a job
Config.weedjob = "" -- what the job name is
Config.Weed = { --- this is the store for the weed ingridients
label = "Weed Shop",
slots = 8,
items = {
{name = "weedgrinder", price = 25, amount = 50, },
{name = "mdbutter", price = 25, amount = 50, },
{name = "flour", price = 25, amount = 50, },
{name = "chocolate", price = 25, amount = 50, },
{name = "butane", price = 25, amount = 50, },
{name = "butanetorch", price = 2, amount = 1000,},
{name = "dabrig", price = 2, amount = 1000,},
{name = "mdwoods", price = 2, amount = 1000,},
}
}
----------------- Wholesale
Config.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
Config.WholesaleTimeout = 600 -- time in seconds to get to the location
Config.PoliceCount = 2 -- Amount of police required
Config.Wcoke = { min = 20, max = 60} -- pricings per item
Config.Wcrack = { min = 20, max = 60}
Config.Wlsd = { min = 20, max = 60}
Config.WXTC = { min = 20, max = 60}
--- travelling merchant
Config.Travellingmerchant = { ------------ these are the random locations the merchant can spawn on script start. whatever you want for the merchant is in Config.Items right below
vector4(-119.66, -977.43, 304.25, 88.21),
vector4(-1522.93, 1476.01, 111.45, 41.25),
vector4(-3278.98, 973.38, 5.35, 101.53),
}
Config.Items = { --- this is the store for the travelling merchant
items = {
[1] = {name = "tab_paper", price = 50, amount = 50, },
[2] = {name = "bakingsoda", price = 25, amount = 50, },
[3] = {name = "isosafrole", price = 25, amount = 50, },
[4] = {name = "mdp2p", price = 25, amount = 50, },
[5] = {name = "lysergic_acid", price = 25, amount = 50, },
[6] = {name = "diethylamide", price = 25, amount = 50, },
[7] = {name = "lockpick", price = 2, amount = 1000, },
[8] = {name = "emptyvial", price = 2, amount = 1000, },
[9] = {name = "needle", price = 2, amount = 1000, },
[10] = {name = "cokeburner", price = 25, amount = 50, },
[11] = {name = "crackburner", price = 2, amount = 50, },
[12] = {name = "lsdburner", price = 2, amount = 50, },
[13] = {name = "heroinburner", price = 2, amount = 50, },
[14] = {name = "mdlean", price = 50, amount = 50, },
[15] = {name = "weedgrinder", price = 25, amount = 50, },
[16] = {name = "mdbutter", price = 25, amount = 50, },
[17] = {name = "flour", price = 25, amount = 50, },
[18] = {name = "chocolate", price = 25, amount = 50, },
[19] = {name = "butane", price = 25, amount = 50, },
[20] = {name = "butanetorch", price = 2, amount = 1000, },
[21] = {name = "dabrig", price = 2, amount = 1000, },
[22] = {name = "mdwoods", price = 2, amount = 1000, },
[23] = {name = "leancup", price = 25, amount = 50, },
[24] = {name = "xtcburner", price = 25, amount = 50, },
}
}
--------------------------------------- oxy runs
---- How oxyruns work. You pay for a truck, you get in it and it gives a route. There is a 20% chance that the car will be "hot" and you have to ditch it. No Routes will spawn if that pops up
----- when you get to the drop off point third eye the truck. You will carry a box to the ped. He will give you cash, some oxy and maybe a random item. Rinse and repeat
Config.truckspawn = vector4(1449.65, -1486.0, 63.22, 342.58) --- where the truck will spawn when you pay for it
Config.Payfortruck = vector3(1437.64, -1491.91, 63.62) --- where you pay for the truck
Config.TruckPrice = 500 -- amount the truck will cost to rent
Config.OxyRunCompleteCash = 200 -- base price you get for completeing a run. 50% if the car needs to be ditched
Config.OxyRunDitchChance = 20 -- % of a fail mission and having to ditch the car and not get a new order
Config.OxyItemChance = 50 -- chance to recieve an item from the OxyRandItems list below
Config.OxyItemAmount = 1 -- amount of the item you recieve when you get an item from OxyRandItems
Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police
Config.oxylocations = { -- These are different locations where a ped spawns.
vector4(-2352.32, 266.78, 165.3, 23.46),
vector4(-1467.49, 874.01, 183.59, 298.45),
vector4(-856.71, 874.26, 202.85, 205.3),
vector4(950.58, -128.49, 74.42, 205.3),
vector4(1152.71, -328.43, 69.21, 205.3),
vector4(112.66, -1955.67, 20.75, 37.94),
vector4(-544.4, -1684.8, 19.89, 252.07),
vector4(-1185.02, -1805.4, 3.91, 184.83),
vector4(-1641.4, -981.99, 7.58, 35.38),
vector4(-1827.93, 782.36, 138.29, 219.99),
vector4(-320.84, 2818.73, 59.45, 337.22),
vector4(474.88, 2609.56, 44.48, 357.0),
}
Config.OxyRandItems = { -- random items you get for completing the mission
"oxy",
"lockpick",
"cryptostick",
}
---------------------- Meth Config
Config.MethTeleIn = vector3(-2222.04, 303.99, 174.6) -- where you target to tele in
Config.MethTeleOut = vector3(996.91, -3200.83, -36.39) -- where you target to tele out
Config.MethHeist = false
Config.MethHeistStart = vector3(-1102.93, -3066.76, 14.00) -- where you get the mission to get ingridients if meth heist = true
Config.MethEph = {
{loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
Config.Methace = {
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
}
----------------------------- these are the locations where props will be spawned to be picked
Config.CocaPlant = {
{ location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a" },
{ location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a" },
{ location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a" },
{ location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a" },
{ location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a" },
{ location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a" },
}
Config.WeedPlant = {
{ location = vector3(1049.63, -3202.12, -39.15), heading = 334.49, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.85, -3202.15, -39.15), heading = 329.56, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.01, -3202.22, -39.13), heading = 25.16, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.99, -3202.15, -39.15), heading = 21.52, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1053.08, -3201.11, -39.13), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.91, -3199.99, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1053.02, -3198.97, -39.11), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.95, -3198.93, -39.11), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.96, -3199.86, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.93, -3201.17, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.98, -3201.13, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.89, -3200.07, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.89, -3198.95, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.72, -3198.95, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.98, -3200.1, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.82, -3201.01, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1053.07, -3194.51, -39.15), heading = 334.49, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.97, -3195.55, -39.15), heading = 329.56, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.82, -3196.58, -39.15), heading = 25.16, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1052.94, -3197.59, -39.15), heading = 21.52, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.92, -3197.54, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.88, -3196.61, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.82, -3195.52, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1051.95, -3194.38, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.88, -3194.31, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.78, -3195.29, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.76, -3196.49, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1050.77, -3197.62, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.64, -3197.61, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.64, -3196.59, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.62, -3195.51, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
{ location = vector3(1049.66, -3194.36, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
}
Config.PoppyPlants = {
{ location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = "prop_plant_01b"},
{ location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = "prop_plant_01b"},
{ location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = "prop_plant_01b"},
{ location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = "prop_plant_01b"},
}
Config.shrooms = {
{ location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = "mushroom"},
{ location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = "mushroom"},
{ location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = "mushroom"},
{ location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = "mushroom"},
{ location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = "mushroom"},
{ location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = "mushroom"},
{ location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = "mushroom"},
{ location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = "mushroom"},
{ location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = "mushroom"},
{ location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = "mushroom"},
{ location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = "mushroom"},
{ location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = "mushroom"},
{ location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = "mushroom"},
{ location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = "mushroom"},
{ location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = "mushroom"},
{ location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = "mushroom"},
{ location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = "mushroom"},
}
Config.Mescaline = {
{ location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2601.46, 4199.34, 40.62), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2611.63, 4194.18, 41.18), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2620.18, 4202.69, 41.5), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2624.26, 4211.75, 42.34), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2635.21, 4207.5, 42.49), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2644.97, 4193.51, 42.11), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2654.21, 4195.31, 41.23), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2653.32, 4206.49, 41.62), heading = 334.49, model = "prop_cactus_03"},
{ location = vector3(2647.45, 4213.94, 42.49), heading = 329.56, model = "prop_cactus_03"},
{ location = vector3(2636.3, 4218.49, 43.03), heading = 25.16, model = "prop_cactus_03"},
{ location = vector3(2627.37, 4223.2, 42.88), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2617.86, 4230.38, 42.63), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2609.8, 4222.12, 41.19), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2602.96, 4194.05, 41.01), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2614.39, 4188.3, 41.68), heading = 21.52, model = "prop_cactus_03"},
{ location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03"},
} }
Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames
-------- Woah Where did like all the locations go?
--- read the readme to find out
+5 -130
View File
@@ -1,130 +1,5 @@
Consumables = {} Consumables = {}
Consumables.defaulttime = 4000 Consumables.defaulttime = 4000
Consumables.defaultanim = 'pflag2' Consumables.defaultanim = 'pflag2'
Consumables.defaultprogresstext = 'Consuming ' -- it will always show the label of the item being used after what you put here, make sure to keep the space at the end :) Consumables.defaultprogresstext = 'Consuming ' -- it will always show the label of the item being used after what you put here, make sure to keep the space at the end :)
Consumables.defaultstatval = 0 Consumables.defaultstatval = 0
--[[
effect options
alien
ecstacy
meth
coke
trevor
none
]]
Consumables.Items = {
-- meth
["methbags"] = { time = 4000, effect = 'meth', anim = "smoke", progressbartext = "Smoking", status = 'thirst', statval = 10},
-- coke
["cokebaggy"] = { anim = 'smell', time = 1000, effect = 'coke'},
["cokebaggystagetwo"] = { anim = 'smell', time = 1000, effect = 'coke'},
["cokebaggystagethree"] = { anim = 'smell', time = 1000, effect = 'coke'},
-- heroin
["heroin_ready"] = { anim = 'shootup', time = 1000, effect = 'ecstacy'},
["heroin_readystagetwo"] = { anim = 'shootup', time = 1000, effect = 'ecstacy'},
["heroin_readystagethree"] = { anim = 'shootup', time = 1000, effect = 'ecstacy'},
-- crack
["baggedcracked"] = { anim = 'smell', time = 1000, effect = 'coke'},
["baggedcrackedstagetwo"] = { anim = 'smell', time = 1000, effect = 'coke'},
["baggedcrackedstagethree"] = { anim = 'smell', time = 1000, effect = 'coke'},
-- xtc
["white_playboys"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_playboys2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_playboys3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_playboys4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_playboys"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_playboys2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_playboys3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_playboys4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_playboys"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_playboys2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_playboys3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_playboys4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_playboys"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_playboy2s"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_playboys3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_playboys4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_aliens"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_aliens2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_aliens3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_aliens4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_aliens"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_aliens2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_aliens3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_aliens4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_aliens"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_aliens3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_aliens2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_aliens4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_aliens"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_aliens2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_aliens3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_aliens4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_pl"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_pl2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_pl3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_pl4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_pl"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_pl2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_pl3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_pl4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_pl"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_pl2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_pl3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_pl4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_pl"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_pl2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_pl3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_pl4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_trolls"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_trolls2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_trolls3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_trolls4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_trolls"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_trolls2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_trolls3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_trolls4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_trolls"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_trolls2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_trolls3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_trolls4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_trolls"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_trolls2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_trolls3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_trolls4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_cats2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_cats3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_cats4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["white_cats"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_cats"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_cats3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_cats2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["blue_cats4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_cats"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_cats2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_cats3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["red_cats4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_cats"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_cats2"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_cats3"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
["orange_cats4"] = { anim = 'edible', time = 1000, effect = 'ecstacy'},
-- weed
["specialbrownie"] = { anim = 'edible', effect = 'alien', status = 'hunger', statval = 10},
["specialcookie"] = { anim = 'edible', effect = 'alien', status = 'hunger', statval = 10},
["specialchocolate"] = { anim = 'edible', effect = 'alien', status = 'hunger', statval = 10},
["specialmuffin"] = { anim = 'edible', effect = 'alien', status = 'hunger', statval = 10},
["blunt"] = { anim = 'smokeweed', effect = 'alien'},
["dextroblunts"] = { anim = 'smokeweed', effect = 'alien'},
["leanblunts"] = { anim = 'smokeweed', effect = 'alien'},
["chewyblunt"] = { anim = 'smokeweed', effect = 'alien'},
-- lean
["cupofdextro"] = { anim = 'cup', effect = 'alien'},
["cupoflean"] = { anim = 'cup', effect = 'alien'},
--lsd
["smiley_tabs"] = { anim = 'edible', effect = 'trevor'},
["wildcherry_tabs"] = { anim = 'edible', effect = 'trevor'},
["yinyang_tabs"] = { anim = 'edible', effect = 'trevor'},
["pineapple_tabs"] = { anim = 'edible', effect = 'trevor'},
["bart_tabs"] = { anim = 'edible', effect = 'trevor'},
["gratefuldead_tabs"] = { anim = 'edible', effect = 'trevor'},
}
+135 -6
View File
@@ -1,5 +1,108 @@
Lang = {} Lang = {}
Lang.targets = {
coke = {
pick = 'Pick Cocaine',
cut = 'Cut Cocaine',
bag = 'Bag Cocaine',
enter = 'Enter Building',
exit = 'Exit Building',
chop = 'Chop Coca Leaves',
},
CornerSell = {
sell = 'Sell %s Of %s For $%s',
deny = 'Deny Price'
},
crack = {
cook = 'Cook Crack',
bag = 'Bag Crack'
},
Delivery = {
Deliver = 'Deliver For %s',
open = 'Open %s Shop',
hand = 'Hand Over'
},
heroin = {
pick = 'Pick Poppies',
up = 'Pick Up Table',
dry = 'Dry Poppies',
cut = 'Cut Heroin',
cook = 'Cook Heroin',
kit = 'Buy Heroin Lab Kit',
clean = 'Clean Table',
fill = 'Fill Syringe',
vial = 'Make Vial',
},
lean = {
git = 'Get Task',
st = 'Steal From Car'
},
lsd = {
buy = 'Buy LSD Lab Kit',
heat = 'Heat Liquid',
refine = 'Refine Quality',
paper = 'Make Tab Paper',
back = 'Pick Up Lab Kit',
dab = 'Dab LSD on sheets',
clean = 'Clean Table',
lys = 'Steal Lysergic Acid',
die = 'Steal Diethylamide',
buyt = 'Buy Tabs',
},
mescaline = {
pick = 'Pick Cactus',
dry = 'Dry Out Cactus',
},
meth = {
bag = 'Bag Up Meth',
enter = 'Enter Buidling',
exit = 'Exit Building',
cook = 'Cook Meth',
tray = 'Grab Tray',
box = 'Box Up Meth',
adjust = 'Adjust Temperature',
eph = 'Steal Ephedrine',
ace = 'Steal Acetone',
mission = 'Get Mission',
stealfromcar = 'Steal From Car',
},
oxy = {
pack = 'Get Oxy Package',
talk = 'Talk To Buyer',
pay = 'Pay For Truck',
},
pha = {
fill = 'Fill Prescription',
},
shrooms = {
pick = 'Pick Shrooms',
},
travel = {
travel = 'Open Travelling Merchant',
},
xtc = {
iso = 'Steal Isosafrole',
mdp = 'Steal MDP2P',
raw = 'Make Raw XTC',
press = 'Buy XTC Press',
stamp = 'Stamp Pills',
make = 'Make XTC',
pick = 'Pick Up Press',
},
weed = {
pick = 'Pick Weed',
dry = 'Dry Weed',
dpick = 'Pick Dried Weed',
butt = 'Open Edible Menu',
oil = 'Make Oil'
},
Wholesale = {
talk = 'Talk To Buyer'
},
}
Lang.Coke = { Lang.Coke = {
-- client side progressbars -- client side progressbars
picking = "Picking Leaves", picking = "Picking Leaves",
@@ -22,19 +125,24 @@ Lang.Crack = {
} }
Lang.Cornerselling = { Lang.Cornerselling = {
-- client side notifys -- client side notifys
inveh = 'STRANGER DANGER, I WONT GET IN THE CAR WITH YOU',
toofar = "To Far From Your Corner Homie", toofar = "To Far From Your Corner Homie",
inacar = " You Cant Sell While In A Car", selling = 'Selling %s For $%s',
deny = "Fuck That Offer", deny = "Fuck That Offer",
start = "Get That Paper", start = "Get That Paper",
stop = "Lazy Ass Cant Even Sell Drugs", stop = "Lazy Ass Cant Even Sell Drugs",
nodrugs = "What You Gonna sell? Air?", nodrugs = "What You Gonna sell? Air?",
notcops = "Not Enough Cops", notcops = "Not Enough Cops",
no = 'You Cant Sell Drugs Here!',
-- end client side notifys -- end client side notifys
-- progressbars -- progressbars
sell = "Selling Drugs", sell = "Selling Drugs",
} }
Lang.Delivery = { Lang.Delivery = {
-- client side -- client side
emailn = 'Not A Drug Dealer',
emailsub = 'Hurry Up And Get The Package To The Buyer',
emailcon = 'I Swear To God If It Doesnt Get There I Will Tell Your Mom You Said Fuck Just Bring %s Of %s',
search = "Searching For A Delivery ...", search = "Searching For A Delivery ...",
none = "Nothing Close By", none = "Nothing Close By",
busy = "You Havent Even Finished The One I Told You Too", busy = "You Havent Even Finished The One I Told You Too",
@@ -65,12 +173,14 @@ Lang.Heroin = {
novial = "How Can You Make Heroin Vials Without Heroin Idiot", novial = "How Can You Make Heroin Vials Without Heroin Idiot",
fail = 'You Over Heated Them Idiot', fail = 'You Over Heated Them Idiot',
fill = 'Filled The Syringe', fill = 'Filled The Syringe',
nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin' nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin',
haskit = 'You Already Have A Heroin Lab Kit'
} }
Lang.Lean = { Lang.Lean = {
marked = ' Car Has Been Marked On Your Map', marked = ' Car Has Been Marked On Your Map',
lean = 'You Got Purple Lean', lean = 'You Got Purple Lean',
dextro = ' You Got Red Dextro' dextro = ' You Got Red Dextro',
act = 'You Already Have A Lean Task',
} }
Lang.lsd = { Lang.lsd = {
@@ -85,6 +195,7 @@ Lang.lsd = {
buypaper = 'Buying Tab Paper', buypaper = 'Buying Tab Paper',
buykit = 'Buying Lab Kit', buykit = 'Buying Lab Kit',
place = 'Placing Table Down', place = 'Placing Table Down',
hav = 'You Already Have A Table',
-- server -- server
lys = 'You Got Lysergic Acid', lys = 'You Got Lysergic Acid',
die = 'You Got Diethylamide', die = 'You Got Diethylamide',
@@ -109,7 +220,8 @@ Lang.meth = {
ace = 'You Got Some Acetone', ace = 'You Got Some Acetone',
eph = 'You Got Some Ephedrine', eph = 'You Got Some Ephedrine',
mix = 'Adding Things To The Mix', mix = 'Adding Things To The Mix',
nobag = 'No Bags' nobag = 'No Bags',
act = 'You Already Have A Meth Task',
} }
Lang.oxy = { Lang.oxy = {
@@ -148,6 +260,8 @@ Lang.Weed = {
stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down', stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down',
shat = 'Making Shatter', shat = 'Making Shatter',
roll = 'Rolling Blunts', roll = 'Rolling Blunts',
wait = 'Wait A Little Bit For To Drive',
take = 'Taking Down The Weed',
-- --
nodry = 'You Need Wet Cannabis To Dry', nodry = 'You Need Wet Cannabis To Dry',
noweed = 'Cant Roll A Blunt With Air', noweed = 'Cant Roll A Blunt With Air',
@@ -162,6 +276,21 @@ Lang.xtc = {
mdp2p = 'Stealing MDP2P', mdp2p = 'Stealing MDP2P',
iso = 'Stealing Isosafrole', iso = 'Stealing Isosafrole',
fail = 'Dude Its A Circle Not Rocket Science', fail = 'Dude Its A Circle Not Rocket Science',
pickup = 'Picking Up The Press',
stamp = 'Stamping %s Pills',
buyp = "Buying Press",
-- --
cash = 'I need 20k In Cash' cash = 'I need 20k In Cash',
} press = {
title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
des = {single ='Buy a single press for 20k', dual = '20 of each unstamped single stack pill and your single press ',
triple = '50 of each unstamped dual stack pill and your dual press ', quad = '150 of each unstamped Triple stack pill and your triple press'
}
}
}
Lang.Wholesale = {
al = 'You Already Have A Delivery To Make',
na = 'No One Answered, Try Again Later',
}
+15 -249
View File
@@ -1,259 +1,25 @@
QBConfig = {} QBConfig = {}
----------- qb-drugs update built in here below ----------- qb-drugs update built in here below
----------- Everything is now a target and not displaytext. Dealers are no longer just doors, they will spawn peds where you place your dealer. This is a literally qb-drugs with SLIGHT edits. mainly added peds for deliveries, made everything a target ----------- Everything is now a target and not displaytext. Dealers are no longer just doors, they will spawn peds where you place your dealer. This is a literally qb-drugs with SLIGHT edits. mainly added peds for deliveries, made everything a target
------------ and changed the range a ped will walk up to you to be a bigger radius.
QBConfig.MinimumDrugSalePolice = 0 QBConfig.MinimumDrugSalePolice = 0
QBConfig.MarkedBills = false -- if false on both options below then it auto converts selling to give cash QBConfig.MarkedBills = false -- if false on both options below then it auto converts selling to give cash
QBConfig.CustomDirtyMoney = false QBConfig.CustomDirtyMoney = false
QBConfig.CustomDirtyMoneyitem = '' QBConfig.CustomDirtyMoneyitem = ''
QBConfig.Dealers = {}
QBConfig.DrugsPrice = { -- Delivery locations and items is now in server/deliveries.lua
-- base qb -- cornerselling pricing and rep is now in server/cornerselling.lua
["weed_white-widow"] = {min = 15, max = 24 },
["weed_og-kush"] = {min = 15, max = 28}, QBConfig.NoSellZones = {
["weed_skunk"] = {min = 15, max = 31 }, {loc = vector3(445.11, -991.3, 30.69), width = 10.0, length = 10.0, height = 10.0, rot = 180.0},
["weed_amnesia"] = {min = 18, max = 34},
["weed_purple-haze"] = {min = 18, max = 37},
["weed_ak47"] = {min = 18, max = 40},
["crack_baggy"] = {min = 18, max = 34},
["cokebaggy"] = {min = 18, max = 37},
-- coke
["cokebaggystagetwo"] = {min = 18, max = 40},
["cokebaggystagethree"] = {min = 18, max = 40},
-- heroin
["heroin_ready"] = {min = 18, max = 40},
["heroin_readystagetwo"] = {min = 18, max = 40},
["heroin_readystagethree"] = {min = 18, max = 40},
-- crack
["baggedcracked"] = {min = 18, max = 40},
["baggedcrackedstagetwo"] = {min = 18, max = 40},
["baggedcrackedstagethree"] = {min = 18, max = 40},
-- xtc
["white_playboys"] = {min = 18, max = 40},
["white_playboys2"] = {min = 18, max = 40},
["white_playboys3"] = {min = 18, max = 40},
["white_playboys4"] = {min = 18, max = 40},
["blue_playboys"] = {min = 18, max = 40},
["blue_playboys2"] = {min = 18, max = 40},
["blue_playboys3"] = {min = 18, max = 40},
["blue_playboys4"] = {min = 18, max = 40},
["red_playboys"] = {min = 18, max = 40},
["red_playboys2"] = {min = 18, max = 40},
["red_playboys3"] = {min = 18, max = 40},
["red_playboys4"] = {min = 18, max = 40},
["orange_playboys"] = {min = 18, max = 40},
["orange_playboys2"] = {min = 18, max = 40},
["orange_playboys3"] = {min = 18, max = 40},
["orange_playboys4"] = {min = 18, max = 40},
["white_aliens"] = {min = 18, max = 40},
["white_aliens2"] = {min = 18, max = 40},
["white_aliens3"] = {min = 18, max = 40},
["white_aliens4"] = {min = 18, max = 40},
["blue_aliens"] = {min = 18, max = 40},
["blue_aliens2"] = {min = 18, max = 40},
["blue_aliens3"] = {min = 18, max = 40},
["blue_aliens4"] = {min = 18, max = 40},
["red_aliens"] = {min = 18, max = 40},
["red_aliens2"] = {min = 18, max = 40},
["red_aliens3"] = {min = 18, max = 40},
["red_aliens4"] = {min = 18, max = 40},
["orange_aliens"] = {min = 18, max = 40},
["orange_aliens2"] = {min = 18, max = 40},
["orange_aliens3"] = {min = 18, max = 40},
["orange_aliens4"] = {min = 18, max = 40},
["white_pl"] = {min = 18, max = 40},
["white_pl2"] = {min = 18, max = 40},
["white_pl3"] = {min = 18, max = 40},
["white_pl4"] = {min = 18, max = 40},
["blue_pl"] = {min = 18, max = 40},
["blue_pl2"] = {min = 18, max = 40},
["blue_pl3"] = {min = 18, max = 40},
["blue_pl4"] = {min = 18, max = 40},
["red_pl"] = {min = 18, max = 40},
["red_pl2"] = {min = 18, max = 40},
["red_pl3"] = {min = 18, max = 40},
["red_pl4"] = {min = 18, max = 40},
["orange_pl"] = {min = 18, max = 40},
["orange_pl2"] = {min = 18, max = 40},
["orange_pl3"] = {min = 18, max = 40},
["orange_pl4"] = {min = 18, max = 40},
["white_trolls"] = {min = 18, max = 40},
["white_trolls2"] = {min = 18, max = 40},
["white_trolls3"] = {min = 18, max = 40},
["white_trolls4"] = {min = 18, max = 40},
["blue_trolls"] = {min = 18, max = 40},
["blue_trolls2"] = {min = 18, max = 40},
["blue_trolls3"] = {min = 18, max = 40},
["blue_trolls4"] = {min = 18, max = 40},
["red_trolls"] = {min = 18, max = 40},
["red_trolls2"] = {min = 18, max = 40},
["red_trolls3"] = {min = 18, max = 40},
["red_trolls4"] = {min = 18, max = 40},
["orange_trolls"] = {min = 18, max = 40},
["orange_trolls2"] = {min = 18, max = 40},
["orange_trolls3"] = {min = 18, max = 40},
["orange_trolls4"] = {min = 18, max = 40},
["white_cats"] = {min = 18, max = 40},
["white_cats2"] = {min = 18, max = 40},
["white_cats3"] = {min = 18, max = 40},
["white_cats4"] = {min = 18, max = 40},
["blue_cats"] = {min = 18, max = 40},
["blue_cats2"] = {min = 18, max = 40},
["blue_cats3"] = {min = 18, max = 40},
["blue_cats4"] = {min = 18, max = 40},
["red_cats"] = {min = 18, max = 40},
["red_cats2"] = {min = 18, max = 40},
["red_cats3"] = {min = 18, max = 40},
["red_cats4"] = {min = 18, max = 40},
["orange_cats"] = {min = 18, max = 40},
["orange_cats2"] = {min = 18, max = 40},
["orange_cats3"] = {min = 18, max = 40},
["orange_cats4"] = {min = 18, max = 40},
-- weed stuff
["blunts"] = {min = 18, max = 40},
["leanblunts"] = {min = 18, max = 40},
["dextroblunts"] = {min = 18, max = 40},
["chewyblunt"] = {min = 18, max = 40},
["blunt"] = {min = 18, max = 40},
["specialchocolate"] = {min = 18, max = 40},
["specialbrownie"] = {min = 18, max = 40},
["specialcookie"] = {min = 18, max = 40},
["specialmuffin"] = {min = 18, max = 40},
["shatter"] = {min = 18, max = 40},
["ciggie"] = {min = 18, max = 40},
-- meth
["methbags"] = {min = 18, max = 40},
-- mescaline
["driedmescaline"] = {min = 18, max = 40},
-- shrooms
["shrooms"] = {min = 18, max = 40},
-- LSD
["gratefuldead_tabs"] = {min = 18, max = 40},
["bart_tabs"] = {min = 18, max = 40},
["pineapple_tabs"] = {min = 18, max = 40},
["yinyang_tabs"] = {min = 18, max = 40},
["wildcherry_tabs"] = {min = 18, max = 40},
["smiley_tabs"] = {min = 18, max = 40},
-- lean
["cupoflean"] = {min = 18, max = 40},
["cupofdextro"] = {min = 18, max = 40},
} }
QBConfig.SellLevel = {
Debug = false -- true / false - Currently prints the vector3 and label of locations when requesting a delivery {price = 0.5, minrep = 0, maxrep = 240, label = 'Rookie'},
NearbyDeliveries = false -- true / false - Do you want deliveries to be within a certain amount of units? {price = 1.0, minrep = 240, maxrep = 600, label = 'Corner Boy'},
DeliveryWithin = 2000 -- int (Default 2000) - How many units do you want the delivery location to be within from the player when making a delivery request? {price = 1.1, minrep = 600, maxrep = 1200, label = 'Corner Man'},
QBConfig.Dealers = {} {price = 1.2, minrep = 1200, maxrep = 1800, label = 'Dope Peddler'},
{price = 1.3, minrep = 1800, maxrep = 2400, label = 'Drug Supplier'},
{price = 1.5, minrep = 2400, maxrep = 4800, label = 'Drug Pusher'},
-- Shop QBConfig {price = 1.75, minrep = 4800, maxrep = 99999999999999, label = 'Drug Lord'},
QBConfig.Products = { }
[1] = {name = "weed_white-widow_seed", price = 15, amount = 150, minrep = 0},
[2] = {name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
[3] = {name = "weed_purple-haze_seed", price = 15, amount = 150, minrep = 0},
[4] = {name = "weed_og-kush_seed", price = 15, amount = 150, minrep = 0},
[5] = {name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
}
QBConfig.ProductsStupidNameRewrite = {
[1] = {name = "weed_whitewidow_seed", price = 15, amount = 150, minrep = 0},
[2] = {name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
[3] = {name = "weed_purplehaze_seed", price = 15, amount = 150, minrep = 0},
[4] = {name = "weed_ogkush_seed", price = 15, amount = 150, minrep = 0},
[5] = {name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
}
QBConfig.UseMarkedBills = false -- true for marked bills, false for cash
QBConfig.DeliveryRepGain = 1 -- amount of rep gained per delivery
QBConfig.DeliveryRepLoss = 1 -- amount of rep lost if delivery wrong or late
QBConfig.PoliceDeliveryModifier = 2 -- amount to multiply active cop count by
QBConfig.WrongAmountFee = 2 -- divide the payout by this value for wrong delivery amount
QBConfig.OverdueDeliveryFee = 4 -- divide the payout by this value for overdue delivery
QBConfig.DeliveryItems = {
[1] = { ["item"] = "weed_brick", ["minrep"] = 0, ['payout'] = 1000},
[2] = { ["item"] = "coke_brick", ["minrep"] = 0, ['payout'] = 1000},
}
QBConfig.DeliveryLocations = {
[1] = { ["label"] = "Pork Factory", ["coords"] = vector3(-296.27, -1300.54, 31.31),},
[2] = { ["label"] = "Forum Drive Deli", ["coords"] = vector3(-36.69, -1492.13, 31.22),},
[3] = { ["label"] = "Hayes Autos South LS", ["coords"] = vector3(282.55, -1814.39, 27.1),},
[4] = { ["label"] = "Grove Street", ["coords"] = vector3(54.55, -1873.15, 22.8),},
[5] = { ["label"] = "Port1", ["coords"] = vector3(-269.4, -2437.15, 6.36),},
[6] = { ["label"] = "Port2", ["coords"] = vector3(269.16, -3248.54, 5.79),},
[7] = { ["label"] = "Port3", ["coords"] = vector3(632.9, -3015.42, 7.34),},
[8] = { ["label"] = "Industrial1", ["coords"] = vector3(1049.52, -2427.96, 30.3),},
[9] = { ["label"] = "Industrial2", ["coords"] = vector3(853.26, -2207.3, 30.68),},
[10] = { ["label"] = "Industrial3", ["coords"] = vector3(903.02, -1721.94, 32.18),},
[11] = { ["label"] = "EastLS1", ["coords"] = vector3(1289.33, -1710.47, 55.51),},
[12] = { ["label"] = "EastLS2", ["coords"] = vector3(1411.94, -1490.54, 60.66),},
[13] = { ["label"] = "Industrial4", ["coords"] = vector3(734.26, -1311.26, 27.01),},
[14] = { ["label"] = "Industrial5", ["coords"] = vector3(1231.6, -1083.06, 38.53),},
[15] = { ["label"] = "Mirror1", ["coords"] = vector3(1143.55, -1000.19, 45.32),},
[16] = { ["label"] = "Mirror2", ["coords"] = vector3(1264.82, -702.87, 64.72),},
[17] = { ["label"] = "Mirror3", ["coords"] = vector3(1119.65, -639.76, 56.81),},
[18] = { ["label"] = "Mirror4", ["coords"] = vector3(1129.59, -462.59, 66.49),},
[19] = { ["label"] = "City1", ["coords"] = vector3(42.8, -811.45, 31.43),},
[20] = { ["label"] = "City2", ["coords"] = vector3(-509.48, -1001.66, 23.55),},
[21] = { ["label"] = "City3", ["coords"] = vector3(-830.97, -862.41, 20.69),},
[22] = { ["label"] = "Vesp1", ["coords"] = vector3(-1320.26, -1177.34, 4.89),},
[23] = { ["label"] = "Vesp2", ["coords"] = vector3(-1097.63, -1673.24, 8.4),},
[24] = { ["label"] = "Vesp3", ["coords"] = vector3(-1147.61, -1452.1, 4.6),},
[25] = { ["label"] = "Vesp4", ["coords"] = vector3(-1241.69, -1208.39, 8.52),},
[26] = { ["label"] = "Vesp5", ["coords"] = vector3(-1876.92, -584.44, 11.85),},
[27] = { ["label"] = "City4", ["coords"] = vector3(-1303.94, -441.39, 35.22),},
[28] = { ["label"] = "City5", ["coords"] = vector3(-1705.48, -433.46, 42.17),},
[29] = { ["label"] = "City6", ["coords"] = vector3(-1305.99, 336.35, 65.5),},
[30] = { ["label"] = "Vinewood1", ["coords"] = vector3(-741.8, 484.84, 109.47),},
[31] = { ["label"] = "Vinewood2", ["coords"] = vector3(-409.57, 341.49, 108.91),},
[32] = { ["label"] = "Vinewood3", ["coords"] = vector3(-126.44, 588.18, 204.71),},
[33] = { ["label"] = "Vinewood4", ["coords"] = vector3(211.42, -101.42, 73.28),},
[34] = { ["label"] = "Vinewood5", ["coords"] = vector3(490.61, -95.04, 66.44),},
[35] = { ["label"] = "City7", ["coords"] = vector3(387.19, -993.59, 29.42),},
[36] = { ["label"] = "City8", ["coords"] = vector3(-500.47, -712.37, 33.21),},
[37] = { ["label"] = "EastHW", ["coords"] = vector3(2572.2, 479.97, 108.68),},
[38] = { ["label"] = "Vinewood6", ["coords"] = vector3(-430.1, 1205.41, 325.76),},
[39] = { ["label"] = "VinewoodHills1", ["coords"] = vector3(-126.06, 1896.58, 197.33),},
[40] = { ["label"] = "VinewoodHills2", ["coords"] = vector3(-2521.08, 2310.31, 33.22),},
[41] = { ["label"] = "RedwoodsCons", ["coords"] = vector3(1129.01, 2125.14, 55.55),},
[42] = { ["label"] = "RedwoodsFarm", ["coords"] = vector3(1546.64, 2166.56, 78.72),},
[43] = { ["label"] = "Harmony1", ["coords"] = vector3(404.34, 2584.54, 43.52),},
[44] = { ["label"] = "Harmony2", ["coords"] = vector3(180.15, 2792.99, 45.66),},
[45] = { ["label"] = "Harmony3", ["coords"] = vector3(287.67, 2843.89, 44.7),},
[46] = { ["label"] = "Sandy1", ["coords"] = vector3(2030.23, 3184.42, 45.13),},
[47] = { ["label"] = "Sandy2", ["coords"] = vector3(2175.33, 3321.92, 46.13),},
[48] = { ["label"] = "Sandy3", ["coords"] = vector3(2389.61, 3340.98, 47.34),},
[49] = { ["label"] = "Sandy4", ["coords"] = vector3(1716.25, 3295.08, 41.26),},
[50] = { ["label"] = "Sandy5", ["coords"] = vector3(1779.38, 3640.83, 34.5),},
[51] = { ["label"] = "Sandy6", ["coords"] = vector3(1894.59, 3715.34, 32.75),},
[52] = { ["label"] = "Sandy7", ["coords"] = vector3(1861.9, 3857.15, 36.27),},
[53] = { ["label"] = "Sandy8", ["coords"] = vector3(996.38, 3575.07, 34.61),},
[54] = { ["label"] = "Sandy9", ["coords"] = vector3(387.45, 3584.73, 33.29),},
[55] = { ["label"] = "Stab1", ["coords"] = vector3(68.08, 3693.22, 40.66),},
[56] = { ["label"] = "Stab2", ["coords"] = vector3(15.55, 3688.7, 39.81),},
[57] = { ["label"] = "Sandy10", ["coords"] = vector3(2566.59, 4283.34, 41.97),},
[58] = { ["label"] = "Grape1", ["coords"] = vector3(2570.82, 4667.95, 34.08),},
[59] = { ["label"] = "Grape2", ["coords"] = vector3(2882.05, 4511.72, 48.02),},
[60] = { ["label"] = "Grape3", ["coords"] = vector3(2243.78, 5154.02, 57.89),},
[61] = { ["label"] = "Grape4", ["coords"] = vector3(1642.91, 4846.08, 45.51),},
[62] = { ["label"] = "Grape5", ["coords"] = vector3(1308.87, 4362.17, 41.55),},
[63] = { ["label"] = "Paleto1", ["coords"] = vector3(-1090.27, 4940.57, 214.13),},
[64] = { ["label"] = "Paleto2", ["coords"] = vector3(-552.37, 5348.37, 74.76),},
[65] = { ["label"] = "Paleto3", ["coords"] = vector3(-679.02, 5834.27, 17.33),},
[66] = { ["label"] = "Paleto4", ["coords"] = vector3(-481.97, 6276.93, 13.35),},
[67] = { ["label"] = "Paleto5", ["coords"] = vector3(-24.92, 6472.6, 31.49),},
[68] = { ["label"] = "Paleto6", ["coords"] = vector3(36.03, 6549.18, 31.43),},
[69] = { ["label"] = "Paleto6", ["coords"] = vector3(406.08, 6526.43, 27.75),},
[70] = { ["label"] = "Paleto7", ["coords"] = vector3(1522.39, 6329.23, 24.61),},
[71] = { ["label"] = "Paleto8", ["coords"] = vector3(1741.39, 6419.62, 35.04),},
[72] = { ["label"] = "Lighthouse", ["coords"] = vector3(3426.72, 5174.42, 7.4),},
[73] = { ["label"] = "EastSandy", ["coords"] = vector3(2525.99, 2586.62, 38.94),},
[74] = { ["label"] = "Power Station", ["coords"] = vector3(2696.29, 1664.44, 24.52),},
[75] = { ["label"] = "Stripclub", ["coords"] = vector3(106.24, -1280.32, 29.24),},
[76] = { ["label"] = "Vinewood Video", ["coords"] = vector3(223.98, 121.53, 102.76),},
[77] = { ["label"] = "Taxi", ["coords"] = vector3(882.67, -160.26, 77.11),},
[78] = { ["label"] = "Resort", ["coords"] = vector3(-1245.63, 376.21, 75.34),},
[79] = { ["label"] = "Bahama Mamas", ["coords"] = vector3(-1383.1, -639.99, 28.67),},
}
+1 -2
View File
@@ -1,2 +1 @@
3.5.9 3.9.0