From e9f722a140b18fd6aade3900533d2ca46c1c7b1d Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:56:34 -0700 Subject: [PATCH] reduce code, more langs, patch work, moved pharma drugs to consumables --- client/animationsandfunctions.lua | 286 ++++++++++++++---------------- client/cornerselling.lua | 4 +- client/crack.lua | 2 +- client/deliveries.lua | 13 +- client/functions.lua | 2 +- client/lean.lua | 2 +- client/pharma.lua | 14 -- client/travellingmerchant.lua | 45 ++--- client/weed.lua | 139 +++++---------- client/xtc.lua | 10 +- server/functions.lua | 1 - server/pharma.lua | 9 - shared/config.lua | 4 +- shared/consumables.lua | 280 +++++++++++++++-------------- shared/english.lua | 14 +- 15 files changed, 377 insertions(+), 448 deletions(-) diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua index 2dbbabd..1c677d7 100644 --- a/client/animationsandfunctions.lua +++ b/client/animationsandfunctions.lua @@ -14,78 +14,73 @@ end function MethCooking() -local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" -lib.requestAnimDict(animDict, 500) -dict = "scr_ornate_heist" -local ped = PlayerPedId() -SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524)) -Wait(1) -local targetPosition = GetEntityCoords(ped) -local animDuration = GetAnimDuration(animDict, animName) * 800 -FreezeEntityPosition(ped, true) -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(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 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) -NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1) -NetworkStartSynchronisedScene(netScene) -Wait(animDuration) -NetworkStopSynchronisedScene(netScene) -DeleteObject(sacid) -DeleteObject(ammonia) -FreezeEntityPosition(ped, false) -lib.requestModel('hei_prop_heist_thermite', 2000) -loadParticle('scr_ornate_heist') - -local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false) -FreezeEntityPosition(thermite, true) -SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true ) -Wait(1000) -local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) -Wait(math.random(10000, 20000)) -StopParticleFxLooped(therm, true) + local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" + lib.requestAnimDict(animDict, 500) + SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524)) + local targetPosition = GetEntityCoords(PlayerPedId()) + local animDuration = GetAnimDuration(animDict, animName) * 800 + FreezeEntityPosition(PlayerPedId(), true) + 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) + NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1) + 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) + NetworkStopSynchronisedScene(netScene) + DeleteObject(sacid) DeleteObject(ammonia) + FreezeEntityPosition(PlayerPedId(), false) + lib.requestModel('hei_prop_heist_thermite', 2000) + loadParticle('scr_ornate_heist') + local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false) + FreezeEntityPosition(thermite, true) + SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true ) + Wait(1000) + local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) + Wait(math.random(10000, 20000)) + StopParticleFxLooped(therm, true) end function SmashMeth() -local ver = "" -local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02" -lib.requestAnimDict(animDict, 500) -local ped = PlayerPedId() -local targetPosition = vector3(1012.628, -3194.619, -39.589) -SetEntityCoords(ped, targetPosition) -Wait(1) -local animDuration = GetAnimDuration(animDict, animName) * 800 -FreezeEntityPosition(ped, true) -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) -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"}, -} -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) + local ver = "" + local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02" + lib.requestAnimDict(animDict, 500) + local ped = PlayerPedId() + local targetPosition = vector3(1012.628, -3194.619, -39.589) + SetEntityCoords(ped, targetPosition) + Wait(1) + local animDuration = GetAnimDuration(animDict, animName) * 800 + FreezeEntityPosition(ped, true) + 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) + 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"}, + } + 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 function BagMeth() -local ver = "" + local ver = "" local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" lib.requestAnimDict(animDict, 500) local animDuration = GetAnimDuration(animDict, animName) * 1000 @@ -142,7 +137,6 @@ for i=1, #scenesList, 1 do end Wait(animDuration-11000) --- Citizen.Wait(45000) for i=1, #scenesList, 1 do NetworkStopSynchronisedScene(scenesList[i]) end @@ -154,18 +148,18 @@ FreezeEntityPosition(ped, false) end function Tray() -local pos = GetEntityCoords(PlayerPedId(), true) -RequestAnimDict('anim@heists@box_carry@') -while (not HasAnimDictLoaded('anim@heists@box_carry@')) do -Wait(7) -end -TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) -RequestModel("bkr_prop_meth_tray_02a") -while not HasModelLoaded("bkr_prop_meth_tray_02a") do -Wait(0) -end -local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) -AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) + local pos = GetEntityCoords(PlayerPedId(), true) + RequestAnimDict('anim@heists@box_carry@') + while (not HasAnimDictLoaded('anim@heists@box_carry@')) do + Wait(7) + end + TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) + RequestModel("bkr_prop_meth_tray_02a") + while not HasModelLoaded("bkr_prop_meth_tray_02a") do + Wait(0) + end + local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) + AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) end @@ -183,52 +177,49 @@ function CutCoke() { hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard"}, { hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard^1"} }, - } -local scenesList, entitiesList = {}, {} -for i=1, #scenes, 1 do - 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) - for j=1, #scenes[i], 1 do - local s = scenes[i][j] - RequestModel(s.hash) - while not HasModelLoaded(s.hash) do - Wait(0) + local scenesList, entitiesList = {}, {} + for i=1, #scenes, 1 do + 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) + for j=1, #scenes[i], 1 do + local s = scenes[i][j] + RequestModel(s.hash) + while not HasModelLoaded(s.hash) do + 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 - 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) + scenesList[#scenesList+1] = scene + end + DisableCamCollisionForEntity(ped) + FreezeEntityPosition(ped, true) + for i=1, #scenesList, 1 do + NetworkStartSynchronisedScene(scenesList[i]) end - scenesList[#scenesList+1] = scene -end -DisableCamCollisionForEntity(ped) -FreezeEntityPosition(ped, true) -for i=1, #scenesList, 1 do - NetworkStartSynchronisedScene(scenesList[i]) -end -Wait(animDuration-11000) -for i=1, #scenesList, 1 do - NetworkStopSynchronisedScene(scenesList[i]) -end -for i=1, #entitiesList, 1 do - DeleteEntity(entitiesList[i]) -end -RemoveAnimDict(animDict) -FreezeEntityPosition(ped, false) + Wait(animDuration-11000) + for i=1, #scenesList, 1 do + NetworkStopSynchronisedScene(scenesList[i]) + end + for i=1, #entitiesList, 1 do + DeleteEntity(entitiesList[i]) + end + RemoveAnimDict(animDict) + FreezeEntityPosition(ped, false) end CreateThread(function() - BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject() BikerCocaine.Style.Set(BikerCocaine.Style.upgrade) BikerCocaine.Security.Set(BikerCocaine.Security.upgrade) BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true) - end) - function BagCoke() +function BagCoke() local ver = "" local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01" lib.requestAnimDict(animDict, 500) @@ -281,7 +272,6 @@ for i=1, #scenesList, 1 do end Wait(animDuration-11000) --- Citizen.Wait(45000) for i=1, #scenesList, 1 do NetworkStopSynchronisedScene(scenesList[i]) end @@ -382,18 +372,18 @@ end local hit = 0 function SpawnCarPedChase() -local ped = GetEntityCoords(PlayerPedId()) -local stoploc = vector3(-1157.63, -3056.71, 13.94) -local start = Config.StartLoc[math.random(1,#Config.StartLoc)] -if started then -- checks if active -else + local stoploc = vector3(-1157.63, -3056.71, 13.94) + local start = Config.StartLoc[math.random(1,#Config.StartLoc)] + if started then + Notify(Lang.lean.act,'error') + else started = true lib.requestModel(`pounder`, Config.RequestModelTime) lib.requestModel("ig_priest", Config.RequestModelTime) lib.requestModel(`cargobob3`, Config.RequestModelTime) - local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true) - local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false) - local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false) + local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true) + local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false) + local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false) FreezeEntityPosition(pilot2, true) SetEntityInvincible(pilot2, true) SetEntityAsMissionEntity(leancar) @@ -401,16 +391,16 @@ else SetPedIntoVehicle(driver, leancar, -1) SetPedFleeAttributes(driver,false) TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0) - SetPedKeepTask(driver, true) -- everything above is ped/ veh spawn - repeat -- repeats Wait(1000) only until + SetPedKeepTask(driver, true) + repeat 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 RemoveBlip(leancar) - if GetEntityHealth(driver) == 0 then -- once one of those thing ends, the loop breaks and carries on from here + if GetEntityHealth(driver) == 0 then AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = 'Steal From Car', action = function() hit = hit + 1 - if not minigame(2,8) then return end + if not minigame() then return end TriggerServerEvent('md-drugs:server:givelean') started = nil if math.random(1,100) <= 30 or hit == 4 then @@ -421,7 +411,7 @@ else end end}, nil) else - repeat -- this second loop is to spawn the helicopter when the truck is in distance + repeat Wait(1000) until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0 Wait( 3 * 1000) @@ -447,7 +437,8 @@ local stoploc = vector3(-1157.63, -3056.71, 13.94) local start = Config.StartLoc[math.random(1,#Config.StartLoc)] local startedmeth = false -if startedmeth then +if startedmeth then + Notify(Lang.meth.act,'error') else startedmeth = true lib.requestModel(`journey`, Config.RequestModelTime) @@ -473,7 +464,7 @@ else icon = 'fa-solid fa-car', label = 'Steal From Car', action = function() - if not minigame(2,8) then return end + if not minigame() then return end TriggerServerEvent('md-drugs:server:givemethingridients') startedmeth = nil if math.random(1,100) <= 30 then @@ -507,26 +498,25 @@ end function SetUpPeds() AddRelationshipGroup('setups') -local ped = GetEntityCoords(PlayerPedId()) -local peds = { - {x = ped.x+3, y = ped.y-5, z = ped.z-1, }, - {x = ped.x+6, y = ped.y-10, z = ped.z-1,}, - {x = ped.x+-2,y = ped.y+5, z = ped.z-1,}, - {x = ped.x+8, y = ped.y-12, z = ped.z-1,}, - {x = ped.x+5, y = ped.y-2, z = ped.z-1, }, - {x = ped.x+2, y = ped.y-20, z = ped.z-1,}, - {x = ped.x+1, y = ped.y-10, z = ped.z-1,}, -} -for i = 1, #peds do - local k = peds[i] - print(GetPedRelationshipGroupHash(i) ) - i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true) - SetPedRelationshipGroupHash(i, 'setups') - GiveWeaponToPed(i, "weapon_pistol", 1, false, true) - TaskCombatPed(i, PlayerPedId(), 0, 16) - SetPedCombatAttributes(i, 46, true) -end - + local ped = GetEntityCoords(PlayerPedId()) + local peds = { + {x = ped.x+3, y = ped.y-5, z = ped.z-1, }, + {x = ped.x+6, y = ped.y-10, z = ped.z-1,}, + {x = ped.x+-2,y = ped.y+5, z = ped.z-1,}, + {x = ped.x+8, y = ped.y-12, z = ped.z-1,}, + {x = ped.x+5, y = ped.y-2, z = ped.z-1, }, + {x = ped.x+2, y = ped.y-20, z = ped.z-1,}, + {x = ped.x+1, y = ped.y-10, z = ped.z-1,}, + } + for i = 1, #peds do + local k = peds[i] + print(GetPedRelationshipGroupHash(i) ) + i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true) + SetPedRelationshipGroupHash(i, 'setups') + GiveWeaponToPed(i, "weapon_pistol", 1, false, true) + TaskCombatPed(i, PlayerPedId(), 0, 16) + SetPedCombatAttributes(i, 46, true) + end end RegisterCommand('DrugRep', function() diff --git a/client/cornerselling.lua b/client/cornerselling.lua index fea3aff..2414e64 100644 --- a/client/cornerselling.lua +++ b/client/cornerselling.lua @@ -47,8 +47,8 @@ function Cornersell() Wait(1000) until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 lib.requestAnimDict("rcmme_tracey1") - TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) - FreezeEntityPosition(targ, true) + TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true) + local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false) if item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end local options = { diff --git a/client/crack.lua b/client/crack.lua index 0a9b887..c10d4e1 100644 --- a/client/crack.lua +++ b/client/crack.lua @@ -3,7 +3,7 @@ local QBCore = exports['qb-core']:GetCoreObject() RegisterNetEvent("md-drugs:client:makecrackone", function(data) if not ItemCheck('bakingsoda') then return end - if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end + if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end TriggerServerEvent("md-drugs:server:makecrackone", data.data) end) diff --git a/client/deliveries.lua b/client/deliveries.lua index dec9466..10f8331 100644 --- a/client/deliveries.lua +++ b/client/deliveries.lua @@ -3,13 +3,15 @@ local isActive = false RegisterNetEvent('md-drugs:client:opendealermenu', function() local dealermenu = {} local rep = GetRep() + print(rep.dealerrep) if Config.StupidassNewQbItemName then for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do - if rep.dealerrep >= v.minrep then + + if rep.dealerrep >= v.minrep then dealermenu[#dealermenu + 1] = { icon = GetImage(v.name), title = GetLabel(v.name), - description = v.price, + description = '$'..v.price, event = "md-drugs:client:travellingmerchantox", args = { item = v.name, @@ -19,6 +21,7 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function() num = k, } } + sorter(dealermenu, 'title') end end else @@ -27,7 +30,7 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function() dealermenu[#dealermenu + 1] = { icon = GetImage(v.name), title = GetLabel(v.name), - description = v.price, + description = '$'..v.price, event = "md-drugs:client:travellingmerchantox", args = { item = v.name, @@ -37,11 +40,11 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function() num = k, } } - + sorter(dealermenu, 'title') end end end - sorter(dealermenu, 'title') + lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu}) lib.showContext('dealermenu') end) diff --git a/client/functions.lua b/client/functions.lua index 63464ca..b376a55 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -215,7 +215,7 @@ end function sorter(sorting, value) - table.sort(sorting, function(a, b) return a[value] < b[value] end) + table.sort(sorting, function(a, b) print(a[value], b[value]) return a[value] < b[value] end) end diff --git a/client/lean.lua b/client/lean.lua index 836792c..eb3f876 100644 --- a/client/lean.lua +++ b/client/lean.lua @@ -36,9 +36,9 @@ for k, v in pairs (items) do table = 'cups' } } + sorter(store, 'title') lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store}) end -sorter(store, 'title') lib.showContext('leanCraft') end) diff --git a/client/pharma.lua b/client/pharma.lua index 00875b1..95759a0 100644 --- a/client/pharma.lua +++ b/client/pharma.lua @@ -41,17 +41,3 @@ RegisterNetEvent("md-drugs:client:unbottle", function(item) if item.name == 'xanaxbottle' then item = 'xanax' end TriggerServerEvent('md-drugs:server:unbottle', item) end) - --- TODO: @Mustachedom convert to consumables -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) diff --git a/client/travellingmerchant.lua b/client/travellingmerchant.lua index 9d33363..a488602 100644 --- a/client/travellingmerchant.lua +++ b/client/travellingmerchant.lua @@ -7,31 +7,32 @@ local current = "g_m_y_famdnf_01" local CurrentLocation = Config.Travellingmerchant[num] local travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false) Freeze(travellingmerchant, true, CurrentLocation.w) - AddSingleModel(travellingmerchant, { label = "Travelling Merchant", icon = "fas fa-eye", action = function() lib.showContext('travellingmerchant') end}, nil) -end) + AddSingleModel(travellingmerchant, { label = "Travelling Merchant", icon = "fas fa-eye", + action = 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 + } + } + sorter(ShopMenu, 'title') + lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu}) + end + + lib.showContext('travellingmerchant') -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 - sorter(ShopMenu, 'title') + end}, nil) end) - RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data) local price = data.cost local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price diff --git a/client/weed.lua b/client/weed.lua index b0cc124..05ce42a 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -122,13 +122,13 @@ CreateThread(function() if hasJob() then return true end end }) -AddBoxZoneSingle('teleinweedout', Config.Teleout, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Telein) end, +AddBoxZoneSingle('teleinweedout', Config.Teleout, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Telein) end, canInteract = function() if hasJob() then return true end end }) -AddBoxZoneSingle('teleinweedin', Config.Telein, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Teleout) end, +AddBoxZoneSingle('teleinweedin', Config.Telein, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Teleout) end, canInteract = function() if hasJob() then return true end end }) -AddBoxZoneSingle('MakeButterCrafting', Config.MakeButter, {label = Lang.Weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fas fa-sign-in-alt", +AddBoxZoneSingle('MakeButterCrafting', Config.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fas fa-sign-in-alt", canInteract = function() if hasJob() then return true end end }) @@ -164,15 +164,9 @@ CreateThread(function() BikerWeedFarm.Security.Set(BikerWeedFarm.Security.upgrade) BikerWeedFarm.Details.Enable(BikerWeedFarm.Details.chairs, true) BikerWeedFarm.Details.Enable({BikerWeedFarm.Details.production, BikerWeedFarm.Details.chairs, BikerWeedFarm.Details.drying}, true) - BikerWeedFarm.Plant1.Clear(false) - BikerWeedFarm.Plant2.Clear(false) - BikerWeedFarm.Plant3.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) + BikerWeedFarm.Plant1.Clear(false) BikerWeedFarm.Plant2.Clear(false) BikerWeedFarm.Plant3.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) local stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false) SetEntityHeading(stove, 270.00) @@ -202,8 +196,8 @@ local current = "u_m_m_jesus_01" lib.requestModel(current, Config.RequestModelTime) local CurrentLocation = Config.WeedSaleman - local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false) - Freeze(WeedGuy, true, CurrentLocation.h) + local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false) + Freeze(WeedGuy, true, CurrentLocation.w) AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fas fa-eye",action = function() lib.showContext('WeedShop')end}, nil) for k, v in pairs (Config.Weed.items) do WeedShop[#WeedShop + 1] = { @@ -219,93 +213,46 @@ local current = "u_m_m_jesus_01" num = k, } } + sorter(WeedShop, 'title') lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop}) end - sorter(WeedShop, 'title') + 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() -local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'edibles') -local items2 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'blunts') -local items3 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'bluntwrap') -local craft, blunt, bluntwrap, label = {}, {}, {}, {} - -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 - craft[#craft + 1] = { - icon = GetImage(item), - description = table.concat(label, ", "), - title = GetLabel(item), - event = "md-drugs:client:MakeWeedItems", - args = { - item = item, - recipe = 'weed', - num = k, - label = 'Cooking Up ' .. GetLabel(item), - table = 'edibles' - - } - } - lib.registerContext({id = 'ButterCraft',title = "Edible Cooking", options = craft}) -end -for k, v in pairs (items2) do - label = {} - local item = '' - for m, d in pairs (items2[k].take) do - table.insert(label, GetLabel(m) .. ' X ' .. d) - end - for m, d in pairs (items2[k].give) do - item = m - end - blunt[#blunt + 1] = { - icon = GetImage(item), - description = table.concat(label, ", "), - title = GetLabel(item), - event = "md-drugs:client:MakeWeedItems", - args = { - item = item, - recipe = 'weed', - num = k, - label = 'Rolling A ' .. GetLabel(item), - table = 'blunts' - } - } - lib.registerContext({id = 'mddrugsblunts',title = "Roll Blunts", options = blunt}) -end -for k, v in pairs (items3) do - label = {} - local item = '' - for m, d in pairs (items3[k].take) do - table.insert(label, GetLabel(m) .. ' X ' .. d) - end - for m,d in pairs (items3[k].give) do - item = m - end - bluntwrap[#bluntwrap + 1] = { - icon = GetImage(item), - description = table.concat(label, ", "), - title = GetLabel(item), - event = "md-drugs:client:MakeWeedItems", - args = { - item = item, - recipe = 'weed', - num = k, - label = 'Dipping Syrup To Make ' .. GetLabel(item), - table = 'bluntwrap' - } - } - lib.registerContext({id = 'mddrugsbluntwraps',title = "Dip Blunt Wrap", options = bluntwrap}) -end -sorter(craft, 'title') -sorter(blunt, 'title') -sorter(bluntwrap, 'title') +createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles') +createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts') +createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap') end) RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data) diff --git a/client/xtc.lua b/client/xtc.lua index 15f935b..372f272 100644 --- a/client/xtc.lua +++ b/client/xtc.lua @@ -71,7 +71,7 @@ RegisterNetEvent("md-drugs:client:XTCMenu", function(type) } }) - lib.showContext('XTCmenu') + lib.showContext('XTCmenu') end) RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press) @@ -164,10 +164,10 @@ RegisterNetEvent("md-drugs:client:buypress", function() id = 'buypresses', title = 'Purchase Presses', options = { - { title = 'Single Press', description = 'Buy a single press for 20k', icon = img, event = 'md-drugs:client:getsinglepress'}, - { title = 'Exchange Single For Dual', description = '20 of each unstamped single stack pill and your single press ', icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}}, - { title = '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 = '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.single, description = Lang.xtc.des.title.single, icon = img, event = 'md-drugs:client:getsinglepress'}, + { title = Lang.xtc.press.title.dual, description = Lang.xtc.des.title.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}}, + { title = Lang.xtc.press.title.triple, description = Lang.xtc.des.title.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}}, + { title = Lang.xtc.press.title.quad, description = Lang.xtc.des.title.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}} } }) lib.showContext('buypresses') diff --git a/server/functions.lua b/server/functions.lua index a5924ba..b201ab9 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -193,7 +193,6 @@ end function GetName(source) local Player = QBCore.Functions.GetPlayer(source) return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - end function getRep(source, type) diff --git a/server/pharma.lua b/server/pharma.lua index 7b00214..6775310 100644 --- a/server/pharma.lua +++ b/server/pharma.lua @@ -42,16 +42,7 @@ QBCore.Functions.CreateUseableItem(d, function(source, item) end) end -local pharmadrugs = { "adderal", "vicodin", "xanax", "morphine"} -for k, v in pairs (pharmadrugs) do QBCore.Functions.CreateUseableItem(v, function(source, item) -local src = source - if TriggerClientEvent('md-drugs:client:takepharma', src, item.name) then - RemoveItem(src, item.name, 1) - Log(GetName(source) .. ' Took ' .. item.name .. '!', 'pharma') - end -end) -end RegisterServerEvent('md-drugs:server:fillprescription', function() local src = source local Player = QBCore.Functions.GetPlayer(src) diff --git a/shared/config.lua b/shared/config.lua index 4222fa3..f1eed7f 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -142,14 +142,12 @@ Config.FillPrescription = {---------- this is where you want people to take thei } 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) -- where you make shatter -Config.WeedSaleman = vector4(1030.46, -3203.63, -38.2, 180.0) +Config.WeedSaleman = vector4(1030.77, -3203.18, -38.2, 262.37) Config.WeedDry = { -- where you dry leaves {loc = vector3(1043.0, -3191.59, -38.39),}, diff --git a/shared/consumables.lua b/shared/consumables.lua index cca4b1f..435a921 100644 --- a/shared/consumables.lua +++ b/shared/consumables.lua @@ -1,141 +1,147 @@ -Consumables = {} -Consumables.defaulttime = 4000 -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.defaultstatval = 0 ---[[ - effect options - alien - ecstacy - meth - coke - trevor - none -]] - ---[[ -add = {} -health = number -- amount of health to give -stress = number -- number of stress to give -speed = number -- number of seconds you a fast boi -hunger = number -- number of hunger to fill -thirst = number -- same shit -strength = number -- how long you are strong boi - -]] -Consumables.Items = { - -- 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 }}, -["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 }}, +Consumables = {} +Consumables.defaulttime = 4000 +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.defaultstatval = 0 +--[[ + effect options + alien + ecstacy + meth + coke + trevor + none +]] + +--[[ +add = {} +health = number -- amount of health to give +stress = number -- number of stress to give +speed = number -- number of seconds you a fast boi +hunger = number -- number of hunger to fill +thirst = number -- same shit +strength = number -- how long you are strong boi + +]] +Consumables.Items = { + -- 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 }}, + 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 }}, + 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 }}, + 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 }}, + 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 }}, } diff --git a/shared/english.lua b/shared/english.lua index bd401d0..9724afd 100644 --- a/shared/english.lua +++ b/shared/english.lua @@ -172,7 +172,8 @@ Lang.Heroin = { Lang.Lean = { marked = ' Car Has Been Marked On Your Map', lean = 'You Got Purple Lean', - dextro = ' You Got Red Dextro' + dextro = ' You Got Red Dextro', + act = 'You Already Have A Lean Task', } Lang.lsd = { @@ -212,7 +213,8 @@ Lang.meth = { ace = 'You Got Some Acetone', eph = 'You Got Some Ephedrine', mix = 'Adding Things To The Mix', - nobag = 'No Bags' + nobag = 'No Bags', + act = 'You Already Have A Meth Task', } Lang.oxy = { @@ -271,7 +273,13 @@ Lang.xtc = { 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 = {