From 9d04b359c10c04496cbec7cbc0919b22b61a3cec Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:27:43 -0800 Subject: [PATCH] vscode settings --- .vscode/settings.json | 26 +++++++++ client/animationsandfunctions.lua | 93 ++++++++++++++++--------------- client/functions.lua | 2 +- client/heroin.lua | 2 +- client/lsd.lua | 2 +- client/meth.lua | 4 +- client/weed.lua | 2 +- server/locations.lua | 4 +- 8 files changed, 81 insertions(+), 54 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5464e9e --- /dev/null +++ b/.vscode/settings.json @@ -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" + ] +} \ No newline at end of file diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua index ef51f70..b9aa20d 100644 --- a/client/animationsandfunctions.lua +++ b/client/animationsandfunctions.lua @@ -1,7 +1,8 @@ local QBCore = exports['qb-core']:GetCoreObject() local started = nil - function loadParticle(dict) + +local function loadParticle(dict) if not HasNamedPtfxAssetLoaded(dict) then RequestNamedPtfxAsset(dict) end @@ -21,9 +22,9 @@ function MethCooking() local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0) local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) - local sacid = CreateObjectNoOffset(`bkr_prop_meth_sacid`, targetPosition, 1, 1, 0) + local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0) NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1) - local ammonia = CreateObjectNoOffset(`bkr_prop_meth_ammonia`, targetPosition, 1, 1, 0) + local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0) NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1) NetworkStartSynchronisedScene(netScene) Wait(animDuration) @@ -56,11 +57,11 @@ function SmashMeth() local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3) NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0) local objects, sceneObjects = {}, { - { hash = `w_me_hammer`, animName = "break_weigh_" .. ver .. "hammer"}, - { hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, animName = "break_weigh_"..ver.."tray01"}, - { hash = `bkr_Prop_Meth_Tray_02a`, animName = "break_weigh_"..ver.."tray01^1"}, - { hash = `bkr_Prop_Meth_Tray_02a`, animName = "break_weigh_"..ver.."tray01^2"}, - { hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, animName = "break_weigh_"..ver.."tray01^3"}, + { hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"}, + { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"}, + { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"}, + { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"}, + { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"}, } for i=1, #sceneObjects, 1 do local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true) @@ -87,28 +88,28 @@ function BagMeth() local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08) local scenes = { { - { hash = `bkr_prop_meth_bigbag_04a`, animName = "break_weigh_"..ver.."box01"}, - { hash = `bkr_prop_meth_bigbag_03a`, animName = "break_weigh_"..ver.."box01^1"}, - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01"} + { hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"}, + { hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"}, + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"} }, { - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^1"}, - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^2"}, - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^3"} + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"}, + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"}, + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"} }, { - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^4"}, - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^5"}, - { hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01^6"} + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"}, + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"}, + { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"} }, { - { hash = `bkr_prop_meth_scoop_01a`, animName = "break_weigh_"..ver.."scoop"}, - { hash = `bkr_prop_coke_scale_01`, animName = "break_weigh_"..ver.."scale"}, - { hash = `bkr_prop_fakeid_penclipboard`, animName = "break_weigh_"..ver.."pen"} + { hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"}, + { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"}, + { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"} }, { - { hash = `bkr_prop_fakeid_clipboard_01a`, animName = "break_weigh_"..ver.."clipboard"}, - { hash = `bkr_Prop_Meth_Tray_02a`, animName = "break_weigh_"..ver.."tray01^5"} + { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"}, + { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"} } } local scenesList, entitiesList = {}, {} @@ -169,9 +170,9 @@ function CutCoke() local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00) local scenes = { { - { hash = `bkr_prop_coke_bakingsoda_o`, animName = "coke_cut_v5_bakingsoda"}, - { hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard"}, - { hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard^1"} + { hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"}, + { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"}, + { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"} }, } local scenesList, entitiesList = {}, {} @@ -225,22 +226,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 scenes = { { - { hash = `bkr_prop_coke_cutblock_01`, animName = "break_weigh_"..ver.."box01"}, - { hash = `bkr_prop_coke_fullmetalbowl_02`, animName = "break_weigh_"..ver.."box01^1"}, - { hash = `bkr_prop_coke_cutblock_01`, animName = "break_weigh_"..ver.."methbag01"} + { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"}, + { hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"}, + { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"} }, { - { hash = `xm3_prop_xm3_bag_coke_01a`, animName = "break_weigh_"..ver.."methbag01^1"}, - { hash = `xm3_prop_xm3_bag_coke_01a`, animName = "break_weigh_"..ver.."methbag01^2"}, - { hash = `xm3_prop_xm3_bag_coke_01a`, animName = "break_weigh_"..ver.."methbag01^3"} + { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"}, + { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"}, + { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"} }, { - { hash = `bkr_prop_coke_fullscoop_01a`, animName = "break_weigh_"..ver.."scoop"}, - { hash = `bkr_prop_coke_scale_01`, animName = "break_weigh_"..ver.."scale"}, - { hash = `bkr_prop_fakeid_penclipboard`, animName = "break_weigh_"..ver.."pen"} + { hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"}, + { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"}, + { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"} }, { - { hash = `bkr_prop_fakeid_clipboard_01a`, animName = "break_weigh_"..ver.."clipboard"}, + { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"}, } } @@ -375,10 +376,10 @@ function SpawnCarPedChase() Notify(Lang.lean.act,'error') else started = true - lib.requestModel(`pounder`, Config.RequestModelTime) + lib.requestModel("pounder", Config.RequestModelTime) lib.requestModel("ig_priest", Config.RequestModelTime) - lib.requestModel(`cargobob3`, Config.RequestModelTime) - local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, false, false) + lib.requestModel("cargobob3", Config.RequestModelTime) + local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, false, 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, false, false) FreezeEntityPosition(pilot2, true) @@ -412,7 +413,7 @@ function SpawnCarPedChase() 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, false,false) + local heli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false) Wait(1000) if DoesEntityExist(heli) then SetEntityInvincible(pilot2, false) @@ -422,7 +423,7 @@ function SpawnCarPedChase() 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, false,false) + heli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false) end end end @@ -439,10 +440,10 @@ if startedmeth then Notify(Lang.meth.act,'error') else startedmeth = true - lib.requestModel(`journey`, Config.RequestModelTime) + lib.requestModel("journey", Config.RequestModelTime) lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime) - lib.requestModel(`cargobob3`, Config.RequestModelTime) - local methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, false, false) + lib.requestModel("cargobob3", Config.RequestModelTime) + local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, false, 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, false, false) FreezeEntityPosition(methpilot, true) @@ -464,7 +465,7 @@ else action = function() if not minigame() then return end TriggerServerEvent('md-drugs:server:givemethingridients') - startedmeth = nil + startedmeth = false if math.random(1,100) <= 30 then DeleteVehicle(methcar) DeleteEntity(methdriver) @@ -477,7 +478,7 @@ else Wait(1000) until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0 Wait( 3 * 1000) - local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false) + local methheli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false) Wait(1000) if DoesEntityExist(methheli) then SetEntityInvincible(methpilot, false) @@ -488,7 +489,7 @@ else 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, false,false) + methheli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false) end end end diff --git a/client/functions.lua b/client/functions.lua index 16fece9..27dc9ca 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -207,7 +207,7 @@ end function GetLabel(label) if GetResourceState('ox_inventory') == 'started' then local Items = exports['ox_inventory']:Items() - if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end + if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end return Items[label]['label'] else if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end diff --git a/client/heroin.lua b/client/heroin.lua index 250f075..ee25cf8 100644 --- a/client/heroin.lua +++ b/client/heroin.lua @@ -95,7 +95,7 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data) SetEntityHeading(dirtylabkitheroin, head) PlaceObjectOnGroundProperly(dirtylabkitheroin) 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", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) SetParticleFxLoopedAlpha(heroinkit, 3.0) SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0) AddMultiModel(dirtylabkitheroin, {{event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean, data = dirtylabkitheroin}}, nil ) diff --git a/client/lsd.lua b/client/lsd.lua index ae074fc..df21000 100644 --- a/client/lsd.lua +++ b/client/lsd.lua @@ -60,7 +60,7 @@ RegisterNetEvent("md-drugs:client:heatliquid", function(data) local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false) SetEntityHeading(dirtylabkit, head) 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", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) PlaceObjectOnGroundProperly(dirtylabkit) SetParticleFxLoopedAlpha(exitPtfx, 3.0) Wait(100) diff --git a/client/meth.lua b/client/meth.lua index 0eb7723..b4237fc 100644 --- a/client/meth.lua +++ b/client/meth.lua @@ -21,7 +21,7 @@ end local function dials() if amonia == true 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()) amonia = nil active = nil @@ -37,7 +37,7 @@ local function smash() if tray then tray = false DeleteObject(trays) - local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) + local bucket = CreateObject("bkr_prop_meth_bigbag_03a", vector3(1012.85, -3194.29, -39.2), true, true, true) Freeze(bucket, true, 90.0) SmashMeth() Wait(100) diff --git a/client/weed.lua b/client/weed.lua index fb994ae..b7dc18d 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -108,7 +108,7 @@ canInteract = function() if hasJob() then return true end end if not ItemCheckMulti({'butane', 'grindedweed'}) then return end if not minigame() then local loc = GetEntityCoords(PlayerPedId()) - AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true) + AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true) exploded = true Notify(Lang.Weed.stovehot, "error") Wait(1000 * 30) diff --git a/server/locations.lua b/server/locations.lua index 198e33e..e21436a 100644 --- a/server/locations.lua +++ b/server/locations.lua @@ -115,8 +115,8 @@ function checkLoc(source, event, num) local ped = source local pos = GetPlayerPed(ped) local coord = GetEntityCoords(pos) - local loc = '' - if type(num) =='string' then + 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