locales and wholesale

This commit is contained in:
Mustache Dom committed 2026-01-22 02:08:35 -07:00
1 parent c1c8b8cb86
commit fc8a623067
15 files changed
+356 -459

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ for k, v in pairs (locations.makecrack) do
Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, { Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
{ {
label = Bridge.Language.Locale('crack.targetMake'), label = Bridge.Language.Locale('crack.targetMake'),
icon = 'fa-solid fa-temperature-high', icon = Bridge.Language.Locale('crack.makeIcon'),
action = function() action = function()
if not itemCheck('baking_soda') then return end if not itemCheck('baking_soda') then return end
if not minigame() then if not minigame() then
@@ -26,7 +26,7 @@ for k, v in pairs (locations.bagcrack) do
Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, { Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
{ {
label = Bridge.Language.Locale('crack.targetBag'), label = Bridge.Language.Locale('crack.targetBag'),
icon = 'fa-solid fa-weight-scale', icon = Bridge.Language.Locale('crack.bagIcon'),
action = function() action = function()
if not itemCheck('empty_weed_bag') then return end if not itemCheck('empty_weed_bag') then return end
if not progressbar(Bridge.Language.Locale('crack.bag')) then return end if not progressbar(Bridge.Language.Locale('crack.bag')) then return end
+7 -7
View File
@@ -9,7 +9,7 @@ local function createLabKit(coord, head)
PlaceObjectOnGroundProperly(heroinlabkit) PlaceObjectOnGroundProperly(heroinlabkit)
Bridge.Target.AddLocalEntity(heroinlabkit, { Bridge.Target.AddLocalEntity(heroinlabkit, {
{ {
icon = "fa-solid fa-temperature-high", icon = Bridge.Language.Locale('heroin.cookIcon'),
label = Bridge.Language.Locale('heroin.targetCook'), label = Bridge.Language.Locale('heroin.targetCook'),
action = function() action = function()
if not itemCheck('empty_vial') then return end if not itemCheck('empty_vial') then return end
@@ -31,7 +31,7 @@ local function createLabKit(coord, head)
end end
}, },
{ {
icon = "fas fa-box-circle-check", icon = Bridge.Language.Locale('heroin.targetPickupIcon'),
label = Bridge.Language.Locale('heroin.targetPickup'), label = Bridge.Language.Locale('heroin.targetPickup'),
action = function() action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbPickup')) then return end if not progressbar(Bridge.Language.Locale('heroin.pbPickup')) then return end
@@ -45,7 +45,7 @@ local function createLabKit(coord, head)
end end
}, },
{ {
icon = "fa-solid fa-hand-sparkles", icon = Bridge.Language.Locale('heroin.targetCleanIcon'),
label = Bridge.Language.Locale('heroin.targetClean'), label = Bridge.Language.Locale('heroin.targetClean'),
action = function() action = function()
if not itemCheck('cleaningkit') then return end if not itemCheck('cleaningkit') then return end
@@ -64,7 +64,7 @@ for k, v in pairs (locations.dryplant) do
Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, { Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
{ {
label = Bridge.Language.Locale('heroin.targetDry'), label = Bridge.Language.Locale('heroin.targetDry'),
icon = 'fa-solid fa-temperature-high', icon = Bridge.Language.Locale('heroin.dryIcon'),
action = function() action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbDry')) then return end if not progressbar(Bridge.Language.Locale('heroin.pbDry')) then return end
TriggerServerEvent("md-drugs:server:dryplant", k) TriggerServerEvent("md-drugs:server:dryplant", k)
@@ -80,7 +80,7 @@ for k, v in pairs (locations.cutheroinone) do
Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, { Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
{ {
label = Bridge.Language.Locale('heroin.targetCutHeroin'), label = Bridge.Language.Locale('heroin.targetCutHeroin'),
icon = 'fa-solid fa-seedling', icon = Bridge.Language.Locale('heroin.cutIcon'),
action = function() action = function()
if not itemCheck('baking_soda') then return end if not itemCheck('baking_soda') then return end
if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin')) then return end if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin')) then return end
@@ -103,7 +103,7 @@ for k, v in pairs (locations.buyKit) do
Bridge.Target.AddLocalEntity(peds[k], { Bridge.Target.AddLocalEntity(peds[k], {
{ {
label = Bridge.Language.Locale('heroin.targetBuyKit'), label = Bridge.Language.Locale('heroin.targetBuyKit'),
icon = 'fa-solid fa-box-open', icon = Bridge.Language.Locale('heroin.buyIcon'),
action = function() action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit')) then return end if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit')) then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit", k) TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
@@ -135,7 +135,7 @@ for k, v in pairs (locations.fillneedle) do
Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, { Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
{ {
label = Bridge.Language.Locale('heroin.targetFill'), label = Bridge.Language.Locale('heroin.targetFill'),
icon = 'fa-solid fa-syringe', icon = Bridge.Language.Locale('heroin.fillNeedleIcon'),
action = function() action = function()
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
if not progressbar(Bridge.Language.Locale('heroin.pbFill')) then return end if not progressbar(Bridge.Language.Locale('heroin.pbFill')) then return end
+2 -2
View File
@@ -50,7 +50,7 @@ local function SpawnCarPedChase(loc)
Bridge.Target.AddLocalEntity(leanCar, { Bridge.Target.AddLocalEntity(leanCar, {
{ {
name = 'leancar', name = 'leancar',
icon = 'fa-solid fa-car', icon = Bridge.Language.Locale('lean.carIcon'),
label = Bridge.Language.Locale('lean.stealFromTruck'), label = Bridge.Language.Locale('lean.stealFromTruck'),
action = function() action = function()
if not minigame() then return end if not minigame() then return end
@@ -74,7 +74,7 @@ for k, v in pairs (location.SyrupVendor) do
Freeze(leanPeds[k], true, v.loc.w) Freeze(leanPeds[k], true, v.loc.w)
Bridge.Target.AddLocalEntity(leanPeds[k], { Bridge.Target.AddLocalEntity(leanPeds[k], {
{ {
icon = "fa-solid fa-hand-holding-medical", icon = Bridge.Language.Locale('lean.startMission'),
label = Bridge.Language.Locale('lean.startMission'), label = Bridge.Language.Locale('lean.startMission'),
action = function() action = function()
SpawnCarPedChase() SpawnCarPedChase()
+94 -152
View File
@@ -1,152 +1,94 @@
--local miss = false local active = false
--local settings = ps.callback('md-drugs:server:GetWSsettings') local active, ped, peds = false, nil, {}
--
--function SetUpPeds(drugCount) local function loop(wholesaleData)
-- local attackerCount = settings.WholesaleAmbushBase local timeout = 600 -- 10 minutes
-- if settings.WholesaleAmbushScale then while active do
-- if drugCount > settings.WholesaleAmbushTier1 then Wait(1000)
-- attackerCount = 3 local dist = #(GetEntityCoords(PlayerPedId()) - vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z))
-- end if dist < 100.0 then
-- if drugCount > settings.WholesaleAmbushTier2 then if IsEntityDead(PlayerPedId()) then
-- attackerCount = 4 active = false
-- end Bridge.Point.Remove('md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier())
-- if drugCount > settings.WholesaleAmbushTier3 then TriggerServerEvent('md-drugs:server:getkilledFuckingNoob')
-- attackerCount = 5 for k, v in pairs (peds) do
-- end DeleteEntity(v)
-- end end
-- local weaponTier = settings.WholesaleWeaponsTier1 peds = {}
-- if settings.WholesaleWeaponTiers then break
-- if drugCount > settings.WholesaleAmbushTier3 then end
-- weaponTier = settings.WholesaleWeaponsTier4 end
-- elseif drugCount > settings.WholesaleAmbushTier2 then timeout = timeout - 1
-- weaponTier = settings.WholesaleWeaponsTier3 if timeout <= 0 then
-- elseif drugCount > settings.WholesaleAmbushTier1 then break
-- weaponTier = settings.WholesaleWeaponsTier2 end
-- end end
-- end end
-- local playerPed = PlayerPedId()
-- local playerCoords = GetEntityCoords(playerPed, false) function SetUpPeds(attackerCount, location)
-- local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"} local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"}
-- for i = 1, attackerCount do for i = 1, attackerCount do
-- local angle = (360 / attackerCount) * i local angle = (360 / attackerCount) * i
-- local x = playerCoords.x + math.cos(math.rad(angle)) * 15 local x = location.x + math.cos(math.rad(angle)) * 15
-- local y = playerCoords.y + math.sin(math.rad(angle)) * 15 local y = location.y + math.sin(math.rad(angle)) * 15
-- local z = playerCoords.z local z = location.z
-- local modelHash = GetHashKey(models[math.random(1, #models)]) local modelHash = GetHashKey(models[math.random(1, #models)])
-- requestModel(modelHash) requestModel(modelHash)
-- local ped = CreatePed(4, modelHash, x, y, z, 0.0, true, false) peds[#peds+1] = CreatePed(4, modelHash, x, y, z, 0.0, true, true)
-- local weapon = weaponTier[math.random(1, #weaponTier)] local weapon = math.random(1, 2) == 1 and "WEAPON_PISTOL" or "WEAPON_BAT"
-- SetPedRelationshipGroupHash(ped, GetHashKey("HATES_PLAYER")) SetPedRelationshipGroupHash(peds[#peds], GetHashKey("HATES_PLAYER"))
-- SetPedCombatAttributes(ped, 46, true) SetPedCombatAttributes(peds[#peds], 46, true)
-- SetPedCombatAttributes(ped, 0, true) SetPedCombatAttributes(peds[#peds], 0, true)
-- SetPedCombatAttributes(ped, 5, true) SetPedCombatAttributes(peds[#peds], 5, true)
-- SetPedCombatAttributes(ped, 2, true) SetPedCombatAttributes(peds[#peds], 2, true)
-- local healthMultiplier = 1.0 GiveWeaponToPed(peds[#peds], GetHashKey(weapon), 500, false, true)
-- if drugCount > settings.WholesaleAmbushTier3 then TaskCombatPed(peds[#peds], PlayerPedId(), 0, 16)
-- healthMultiplier = 1.5 end
-- elseif drugCount > settings.WholesaleAmbushTier2 then end
-- healthMultiplier = 1.3
-- elseif drugCount > settings.WholesaleAmbushTier1 then RegisterNetEvent("md-drugs:client:GetLocation", function(wholesaleData)
-- healthMultiplier = 1.2 if active then return end
-- end if not wholesaleData then return end
-- local baseHealth = GetEntityHealth(ped) active = true
-- SetEntityHealth(ped, math.floor(baseHealth * healthMultiplier)) SetNewWaypoint(wholesaleData.location.x, wholesaleData.location.y)
-- GiveWeaponToPed(ped, GetHashKey(weapon), 500, false, true) Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
-- TaskCombatPed(ped, playerPed, 0, 16) Bridge.Point.Register(
-- local blip = AddBlipForEntity(ped) 'md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier(),
-- SetBlipAsShortRange(blip, true) vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z),
-- SetBlipColour(blip, 1) 50.0,
-- SetBlipScale(blip, 0.7) nil,
-- SetEntityAsNoLongerNeeded(ped) function(point, data)
-- end if wholesaleData.ambush then
-- local tierName = "Basic" SetUpPeds(wholesaleData.attackerCount, wholesaleData.location)
-- if drugCount > settings.WholesaleAmbushTier3 then loop(wholesaleData)
-- tierName = "Elite" end
-- elseif drugCount > settings.WholesaleAmbushTier2 then requestModel(GetHashKey("s_m_m_ammucountry"))
-- tierName = "Advanced" ped = CreatePed(4, GetHashKey("s_m_m_ammucountry"), wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z, wholesaleData.location.w, false, true)
-- elseif drugCount > settings.WholesaleAmbushTier1 then FreezeEntityPosition(ped, true)
-- tierName = "Medium" TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT", 0, true)
-- end Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.meet_dealer'), 'info')
-- Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.ambush'), attackerCount, tierName), 'error') Bridge.Target.AddLocalEntity(ped, {
--end {
-- label = Bridge.Language.Locale('wholesale.sell_drugs'),
--RegisterNetEvent("md-drugs:client:GetLocation", function(drug) icon = Bridge.Language.Locale('wholesale.sell_drugs_icon'),
-- if miss then action = function()
-- SetNewWaypoint(drug.location.x, drug.location.y) if not progressbar(Bridge.Language.Locale('wholesale.selling_drugs'), 15000) then return end
-- else TriggerServerEvent('md-drugs:server:SuccessSale')
-- local loc = drug.location DeleteEntity(ped)
-- local timer = 0 active = false
-- miss = true Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
-- SetNewWaypoint(loc.x, loc.y) end
-- if settings.WholesaleShowEstimates and drug.count > 0 then }
-- local bonusTiers = math.floor(drug.count / 10) })
-- local potentialBonus = math.min(bonusTiers * settings.WholesaleQuantityBonus, settings.WholesaleMaxBonus) end,
-- local bonusPercent = math.floor(potentialBonus * 100) function(point, data)
-- local minPayout = math.floor(drug.price.min * (1 + potentialBonus)) Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
-- local maxPayout = math.floor(drug.price.max * (1 + potentialBonus)) return data
-- local totalMinPayout = drug.count * minPayout end)
-- local totalMaxPayout = drug.count * maxPayout end)
-- Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.count'), drug.count), 'info')
-- if bonusPercent > 0 then
-- Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.bonus'), bonusPercent), 'info') RegisterNetEvent('md-drugs:client:MarkLocation', function(data)
-- end SetNewWaypoint(data.x, data.y)
-- Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.estimate'), totalMinPayout, totalMaxPayout), 'info') Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
-- elseif drug.count <= 0 then end)
-- Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.no_drugs'), 'error')
-- end
-- requestModel("g_m_y_famdnf_01", settings.RequestModelTime)
-- local current = "g_m_y_famdnf_01"
-- local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
-- FreezeEntityPosition(drugdealer, true)
-- SetEntityInvincible(drugdealer, true)
-- Bridge.Target.AddLocalEntity(drugdealer, {{
-- label = Bridge.Language.Locale('wholesale.targetBuyer'),
-- icon = "fas fa-eye",
-- action = function()
-- local luck = math.random(1,100)
-- if luck <= settings.SuccessfulChance then
-- if not ps.progressbar(Bridge.Language.Locale('wholesale.wholesaling')) then return end
-- TriggerServerEvent("md-drugs:server:SuccessSale", drug)
-- else
-- ps.progressbar("Deal Going Bad")
-- if settings.WholesaleAmbushEnabled then
-- SetUpPeds(drug.count)
-- end
-- if settings.WholesaleFailPoliceAlert > 0 then
-- local alertChance = math.random(1, 100)
-- if alertChance <= settings.WholesaleFailPoliceAlert then
-- PoliceCall(100)
-- end
-- end
-- TriggerServerEvent('md-drugs:server:CleanupWholesale')
-- end
-- Wait(3000)
-- DeleteEntity(drugdealer)
-- miss = false
-- end
-- }},drugdealer )
-- repeat
-- Wait(1000)
-- timer = timer + 1
-- until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == settings.WholesaleTimeout + 1
-- PoliceCall(settings.AlertPoliceWholesale)
-- if timer <= settings.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
-- timer = 0
-- else
-- Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.tooLong'), 'error')
-- DeleteEntity(drugdealer)
-- TriggerServerEvent('md-drugs:server:CleanupWholesale')
-- if settings.WholesaleResetOnTimeout then
-- miss = false
-- end
-- end
-- end
--end)
--
--RegisterNetEvent('md-drugs:client:WholesaleComplete', function(data)
-- local bonusText = ""
-- if data.bonus > 0 then
-- bonusText = " (+" .. data.bonus .. "% quantity bonus)"
-- end
-- Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.complete'), data.quantity, data.payout, bonusText), 'success')
--end)
+32 -19
View File
@@ -1,6 +1,6 @@
{ {
"Catches": { "Catches": {
"notIn": "You Are Not In The Correct Location", "outOfRangeWarn": "Player: %s attempted to exploit Event: '%s' by triggering the event out of range.",
"needItems": "You Do Not Have The Required Items", "needItems": "You Do Not Have The Required Items",
"notEnoughMoney": "Youre To Broke", "notEnoughMoney": "Youre To Broke",
"buySuccess": "You Bought %s %s For $%s", "buySuccess": "You Bought %s %s For $%s",
@@ -8,8 +8,9 @@
"itemNeeded": "You Need %s", "itemNeeded": "You Need %s",
"cooldown": "Slow Down Speed Racer", "cooldown": "Slow Down Speed Racer",
"invalidItem": "This Item Is Not Sold Here", "invalidItem": "This Item Is Not Sold Here",
"onCooldownWarn": "%s Attempted To Run Event %s \n while on cooldown", "onCooldownWarn": "Player: %s Attempted To Run Event %s \n while on cooldown",
"noCops": "Not Enough Police Online" "noCops": "Not Enough Police Online",
"missedTable": "Player: %s attempted to exploit Event: '%s' by triggering the event without being in a server table"
}, },
"coke": { "coke": {
@@ -54,9 +55,12 @@
"crack": { "crack": {
"targetMake": "Cook Some Crack", "targetMake": "Cook Some Crack",
"makeIcon": "fa-solid fa-temperature-high",
"cook": "Cooking Crack", "cook": "Cooking Crack",
"targetBag": "Bag Crack", "targetBag": "Bag Crack",
"bag": "Bagging Crack" "bagIcon": "fa-solid fa-weight-scale",
"bag": "Bagging Crack",
"breakdown": "Breaking Down Crack Even Further"
}, },
"Deliveries": { "Deliveries": {
@@ -87,21 +91,29 @@
"picking": "Picking Heroin", "picking": "Picking Heroin",
"targetCook": "Cook Heroin", "targetCook": "Cook Heroin",
"pbCook": "Cooking Up Heroin", "pbCook": "Cooking Up Heroin",
"cookIcon": "fa-solid fa-temperature-high",
"targetPickup": "Pick Up Lab", "targetPickup": "Pick Up Lab",
"targetPickupIcon": "fa-solid fa-box-circle-check",
"pbPickup": "Picking Up Lab", "pbPickup": "Picking Up Lab",
"targetClean": "Clean Lab", "targetClean": "Clean Lab",
"targetCleanIcon": "fa-solid fa-broom",
"pbClean": "Cleaning Lab", "pbClean": "Cleaning Lab",
"targetDry": "Dry Out Plant", "targetDry": "Dry Out Plant",
"dryIcon": "fa-solid fa-temperature-high",
"pbDry": "Drying Out Plant", "pbDry": "Drying Out Plant",
"targetCutHeroin": "Cut Heroin", "targetCutHeroin": "Cut Heroin",
"pbCutHeroin": "Cutting Heroin", "pbCutHeroin": "Cutting Heroin",
"cutIcon": "fa-solid fa-mortal-pestle",
"targetBuyKit": "Buy Heroin Lab Kit", "targetBuyKit": "Buy Heroin Lab Kit",
"buyIcon": "fa-solid fa-box-open",
"fillNeedleIcon": "fa-solid fa-syringe",
"pbBuyKit": "Buying Heroin Lab Kit", "pbBuyKit": "Buying Heroin Lab Kit",
"tableout": "You Already Have A Table Out", "tableout": "You Already Have A Table Out",
"placing": "Placing Down Table", "placing": "Placing Down Table",
"targetFill": "Fill Syringe", "targetFill": "Fill Syringe",
"pbFill": "Filling Syringe", "pbFill": "Filling Syringe",
"hasKitAlready": "You Already Have A Heroin Lab Kit", "hasKitAlready": "You Already Have A Heroin Lab Kit",
"hasKitAlreadyPlaced": "You Already Have A Heroin Lab Kit Placed",
"notEnoughMoney": "You Need $%s In Cash For This", "notEnoughMoney": "You Need $%s In Cash For This",
"placedKit": "You Placed Down Your Heroin Lab Kit", "placedKit": "You Placed Down Your Heroin Lab Kit",
"failed": "You Failed To Make Heroin And Lost Your Ingredients" "failed": "You Failed To Make Heroin And Lost Your Ingredients"
@@ -111,7 +123,15 @@
"stealFromTruck": "Steal From Truck", "stealFromTruck": "Steal From Truck",
"startMission": "Start Lean Mission", "startMission": "Start Lean Mission",
"notOnRun": "You Are Not On A Lean Run", "notOnRun": "You Are Not On A Lean Run",
"alreadyChasing": "You Are Already Chasing A Truck" "alreadyChasing": "You Are Already Chasing A Truck",
"carIcon": "fa-solid fa-truck-fast",
"startMissionIcon": "fa-solid fa-hand-holding-medical",
"makingLean": "Making Lean",
"makeLeanMenuTitle": "Lean Creation",
"makeLeanMenuDesc": "Choose Your Ingredients",
"vehDoesntExist": "Player: %s attempted to exploit the lean event by triggering the event when the vehicle does not exist.",
"wrongVehModel": "Player: %s attempted to exploit the lean event by triggering the event in the wrong vehicle model.",
"maxTaken": "You Have Taken The Maximum Amount Of Lean From This Run"
}, },
"lsd": { "lsd": {
@@ -223,20 +243,13 @@
}, },
"wholesale": { "wholesale": {
"alreadyWholesale": "Already Wholesaling", "go_location": "Your Meeting Spot Has Been Marked On Your GPS",
"targetBuyer": "Talk To The Buyer", "sell_drugs": "Hand Over Product",
"wholesaling": "Wholesaling Drugs", "sell_drugs_icon": "fa-solid fa-handshake",
"uhoh": "The Buyer Is Getting Sketchy", "selling_drugs": "Handing Over The Product",
"tooLong": "The Buyer Waited Too Long", "not_enough_police": "Not Enough Police Online To Start A Wholesale Deal",
"notEnoughCops": "Not Enough Cops On Duty", "not_enough_drugs": "Wholesale Is Meant For Large Amounts Of Drugs",
"count": "Quantity detected: %s", "ambush_fail_warn": "Player: %s attempted to exploit the wholesale Sale event by triggering the event when they should be ambushed."
"bonus": "Quantity bonus: +%s%%",
"estimate": "Estimated payout: $%s - $%s",
"no_drugs": "You do not have any of this drug to sell",
"ambush": "Ambush! %s attackers with %s weapons are approaching!",
"complete": "Sold %s items for $%s%s",
"min_quantity": "You must sell at least %s items to wholesale",
"deal_failed_cleanup": "Deal failed - you can try again"
}, },
"xtc": { "xtc": {
+17 -11
View File
@@ -128,20 +128,26 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
AddRep(src, 'coke', 1) AddRep(src, 'coke', 1)
end) end)
local cokecut = {loosecokestagetwo = 2, loosecokestagethree = 3} local cokecut = {
loosecokestagetwo = {give = {loosecoke =2}, take = {loosecokestagetwo = 1, bakingsoda = 1}},
loosecokestagethree = {give = {loosecokestagetwo = 3}, take = {loosecokestagethree = 1, bakingsoda = 1}},
}
for k, v in pairs (cokecut) do for k, v in pairs (cokecut) do
Bridge.Framework.RegisterUsableItem(k, function(source, item) Bridge.Framework.RegisterUsableItem(k, function(source, item)
local src = source local src = source
if not Bridge.Inventory.HasItem(src, 'bakingsoda') then local can = true
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('coke.needBakingSoda'), 'error') for k, v in pairs (v.take) do
return local count = Bridge.Inventory.GetItemCount(src, k)
end if count < v then
if Bridge.Inventory.HasItem(src,item.name) then can = false
local check = Bridge.Callback.Trigger('md-drugs:client:uncuff', src, Bridge.Language.Locale('coke.cutCokeAgain')) break
if not check then return end
if Bridge.Inventory.RemoveItem(src, k, 1) and Bridge.Inventory.RemoveItem(src, 'bakingsoda', 1) then
Bridge.Inventory.AddItem(src, 'loosecoke', v)
end end
end end
if not can then
return craft(src, v)
end
local progress = Bridge.Callback.Trigger("md-drugs:client:uncuff", src, Bridge.Language.Locale('coke.cutCokeAgain'))
if not progress then return end
craft(src, v)
end) end)
end end
+1 -11
View File
@@ -157,15 +157,6 @@ local function getDrugBack(source, item, amount)
end end
end end
local function getLoc(src, ped)
local coords, peds = GetEntityCoords(GetPlayerPed(src)), GetEntityCoords(ped)
local dist = #(coords - peds)
if dist < 5.0 then
return true
end
return false
end
Bridge.Callback.Register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped) Bridge.Callback.Register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
local src = source local src = source
local rep = getRep(source, 'cornerselling') local rep = getRep(source, 'cornerselling')
@@ -284,8 +275,7 @@ end)
RegisterCommand('cornersell', function(source, args, raw) RegisterCommand('cornersell', function(source, args, raw)
local src = source local src = source
local jobCount = Bridge.Framework.GetPlayersByJob('police') if #Bridge.Framework.GetPlayersByJob('police') < cornsellConfig.policeRequired then
if #jobCount < cornsellConfig.policeRequired then
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Catches.noCops'), 'error') Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Catches.noCops'), 'error')
return return
end end
+17 -11
View File
@@ -81,21 +81,27 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num)
end end
end) end)
local cokecut = {crackrockstagetwo = 2, crackrockstagethree = 3} local cokecut = {
crackrockstagetwo = {give = {crackrock = 2}, take = {crackrockstagetwo = 1, bakingsoda = 1}},
crackrockstagethree = { give = {crackrock = 3}, take = {crackrockstagethree = 1, bakingsoda = 1}},
}
for k, v in pairs (cokecut) do for k, v in pairs (cokecut) do
Bridge.Framework.RegisterUsableItem(k, function(source, item) Bridge.Framework.RegisterUsableItem(k, function(source, item)
local src = source local src = source
if not Bridge.Inventory.HasItem(src, 'bakingsoda') then local can = true
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('coke.needBakingSoda'), 'error') for k, v in pairs (v.take) do
return local count = Bridge.Inventory.GetItemCount(src, k)
end if count < v then
if Bridge.Inventory.HasItem(src,item.name) then can = false
local check = Bridge.Callback.Trigger('md-drugs:client:uncuff', src, 'Cutting It Further') break
if not check then return end
if Bridge.Inventory.RemoveItem(src, k, 1) and Bridge.Inventory.RemoveItem(src, 'bakingsoda', 1) then
Bridge.Inventory.AddItem(src, 'crackrock', v)
end end
end end
if not can then
return craft(src, v)
end
local progress = Bridge.Callback.Trigger("md-drugs:client:uncuff", src, Bridge.Language.Locale('crack.breakdown'))
if not progress then return end
craft(src, v)
end) end)
end end
+3 -3
View File
@@ -2,6 +2,7 @@ local timeOutPlayers = {}
local playerRep = {} local playerRep = {}
local playerWarnings = {} local playerWarnings = {}
local trollExploiters = true local trollExploiters = true
local function trollPlayer(src) local function trollPlayer(src)
if not trollExploiters then return end if not trollExploiters then return end
CreateThread(function() CreateThread(function()
@@ -40,8 +41,7 @@ end
function timeOut(src, event) function timeOut(src, event)
if timeOutPlayers[src] then if timeOutPlayers[src] then
local first, last = Bridge.Framework.GetPlayerName(src) Bridge.Prints.Warn(Bridge.Language.Locale('Catches.onCooldownWarn', Bridge.Framework.GetPlayerIdentifier(src), event))
Bridge.Prints.Warn(Bridge.Language.Locale('Catches.onCooldownWarn', first .. ' ' .. last, event))
playerWarnings[src] = (playerWarnings[src] or 0) + 1 playerWarnings[src] = (playerWarnings[src] or 0) + 1
if playerWarnings[src] >= 5 then if playerWarnings[src] >= 5 then
trollPlayer(src) trollPlayer(src)
@@ -156,4 +156,4 @@ Bridge.Callback.Register('md-drugs:server:GetRep', function(source, cb, args)
return rep return rep
end) end)
--TODO: fix versioncheck --TODO: fix versioncheck
Bridge.Version.VersionChecker('Mustachedom/md-drugs/', false) Bridge.Version.VersionChecker('Mustachedom/md-drugs', false)
+3 -5
View File
@@ -101,6 +101,7 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num)
for item, tiers in pairs (itemList) do for item, tiers in pairs (itemList) do
if Bridge.Inventory.HasItem(src, item) then if Bridge.Inventory.HasItem(src, item) then
tier = tiers tier = tiers
break
end end
end end
end end
@@ -167,7 +168,6 @@ Bridge.Framework.RegisterUsableItem('heroinlabkit', function(source, item)
if Bridge.Inventory.RemoveItem(src, 'heroinlabkit', 1) then if Bridge.Inventory.RemoveItem(src, 'heroinlabkit', 1) then
heroinLabKits[src] = { heroinLabKits[src] = {
src = src, src = src,
ownerid = Bridge.Framework.GetPlayerIdentifier(src),
coords = loc, coords = loc,
} }
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('heroin.placedKit'), "success") Bridge.Notify.SendNotify(src, Bridge.Language.Locale('heroin.placedKit'), "success")
@@ -181,11 +181,10 @@ RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
if timeOut(src, 'md-drugs:server:heatliquidheroin') then return end if timeOut(src, 'md-drugs:server:heatliquidheroin') then return end
if not heroinLabKits[src] then if not heroinLabKits[src] then
Bridge.Prints.Warn(src, Bridge.Language.Locale('Catches.notIn'), 'error') Bridge.Prints.Warn(src, Bridge.Language.Locale('Catches.missedTable', Bridge.Framework.GetPlayerIdentifier(src), 'md-drugs:server:heatliquidheroin'), 'error')
return return
end end
if not Bridge.Inventory.HasItem(src, 'emptyvial', 1) then return end
local tier = 'tier1' local tier = 'tier1'
if Config.TierSystem then if Config.TierSystem then
local itemList = { local itemList = {
@@ -209,8 +208,7 @@ RegisterServerEvent('md-drugs:server:failheatingheroin', function()
local src = source local src = source
if not heroinLabKits[src] then if not heroinLabKits[src] then
Bridge.Prints.Warn(src, Bridge.Language.Locale('Catches.notIn'), 'error') Bridge.Prints.Warn(src, Bridge.Language.Locale('Catches.missedTable', Bridge.Framework.GetPlayerIdentifier(src), 'md-drugs:server:failheatingheroin'), 'error')
return
end end
local itemList = { local itemList = {
+5 -32
View File
@@ -60,13 +60,15 @@ RegisterServerEvent('md-drugs:server:givelean', function()
end end
local veh = onRun[src].vehicle local veh = onRun[src].vehicle
if not veh or veh == 0 then if not veh or veh == 0 then
Bridge.Prints.Warn(src, Bridge.Language.Locale('lean.vehDoesntExist', Bridge.Framework.GetPlayerIdentifier(src)), 'error')
return return
end end
if GetEntityModel(veh) ~= GetHashKey('pounder') then if GetEntityModel(veh) ~= GetHashKey('pounder') then
Bridge.Prints.Warn(src, Bridge.Language.Locale('lean.wrongVehModel', Bridge.Framework.GetPlayerIdentifier(src)), 'error')
return return
end end
local pcoords, vcoords = GetEntityCoords(GetPlayerPed(src)), GetEntityCoords(veh) local pcoords, vcoords = GetEntityCoords(GetPlayerPed(src)), GetEntityCoords(veh)
if #(pcoords - vcoords) > 10.0 then if not checkDistance(src, vcoords, 5.0, 'md-drugs:server:givelean') then
return return
end end
onRun[src].taken = onRun[src].taken + 1 onRun[src].taken = onRun[src].taken + 1
@@ -80,37 +82,6 @@ RegisterServerEvent('md-drugs:server:givelean', function()
end end
end) end)
exports.ps_lib:registerCrafter({
loc = Locations.Lean.MakeLean,
recipes = {
cupoflean = {
amount = 1,
time = 5000,
anim = 'uncuff',
recipe = {
leancup = 1,
mdlean = 1,
sprunk = 1
}
},
cupofdextro = {
amount = 1,
time = 5000,
anim = 'uncuff',
recipe = {
leancup = 1,
mdreddextro = 1,
sprunk = 1
}
}
},
targetData = {
size = {height = 1.0, width = 1.0, length = 1.0, rotation = 180.0},
label = 'Make Lean',
icon = 'fa-solid fa-mug-saucer',
},
})
Bridge.Callback.Register('md-drugs:server:registerLean', function(source, loc, vehicleNetId) Bridge.Callback.Register('md-drugs:server:registerLean', function(source, loc, vehicleNetId)
local src = source local src = source
if onRun[src] then if onRun[src] then
@@ -120,10 +91,12 @@ Bridge.Callback.Register('md-drugs:server:registerLean', function(source, loc, v
return false return false
end end
if not vehicleNetId then if not vehicleNetId then
Bridge.Prints.Warn(src, Bridge.Language.Locale('lean.vehDoesntExist', Bridge.Framework.GetPlayerIdentifier(src)), 'error')
return false return false
end end
local veh = NetworkGetEntityFromNetworkId(vehicleNetId) local veh = NetworkGetEntityFromNetworkId(vehicleNetId)
if not veh or veh == 0 or GetEntityModel(veh) ~= GetHashKey('pounder') then if not veh or veh == 0 or GetEntityModel(veh) ~= GetHashKey('pounder') then
Bridge.Prints.Warn(src, Bridge.Language.Locale('lean.wrongVehModel', Bridge.Framework.GetPlayerIdentifier(src)), 'error')
return false return false
end end
+1 -1
View File
@@ -1,4 +1,4 @@
Recipes, locations = Recipes or {}, locations or {} Recipes, Locations = Recipes or {}, Locations or {}
Locations.Mescaline = { Locations.Mescaline = {
DryOutMescaline = { -- where to dry out your mescaline DryOutMescaline = { -- where to dry out your mescaline
-3
View File
@@ -227,9 +227,6 @@ for k, v in pairs (plantData) do
v.coolDown(loc) v.coolDown(loc)
v.itemGive(src) v.itemGive(src)
end end
else
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Catches.notIn'), 'error')
return
end end
end) end)
::continue:: ::continue::
+170 -197
View File
@@ -1,197 +1,170 @@
--
--local burners = { local burners = {
-- cokeburner = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"}, cokeburner = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"},
-- crackburner = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"}, crackburner = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"},
-- lsdburner = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'}, lsdburner = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'},
-- heroinburner = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'}, heroinburner = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'},
-- xtcburner = {"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" }, xtcburner = {"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" },
-- methburner = {'methbaggy'}, methburner = {'methbaggy'},
--} }
--local active = {} local active = {}
--local settings = {} local settings = {}
--
--settings.WholesaleQuantityBonus = 0.05 -- 5% bonus per 10 units sold (up to 20%) settings.WholesaleQuantityBonus = 0.05 -- 5% bonus per 10 units sold (up to 20%)
--settings.WholesaleMaxBonus = 0.20 -- Maximum 20% bonus settings.WholesaleMaxBonus = 0.20 -- Maximum 20% bonus
--settings.WholesaleMinQuantity = 1 -- Minimum quantity required for wholesale settings.WholesaleMinQuantity = 5 -- Minimum quantity required for wholesale
--settings.WholesaleAmbushEnabled = true -- Enable or disable ambush on failed deals settings.WholesaleAmbushEnabled = true -- Enable or disable ambush on failed deals
--settings.WholesaleAmbushBase = 2 -- Base number of attackers on failed deals settings.WholesaleAmbushBase = 2 -- Base number of attackers on failed deals
--settings.WholesaleAmbushScale = true -- Scale number of attackers based on drug quantity settings.WholesaleAmbushScale = true -- Scale number of attackers based on drug quantity
--settings.WholesaleAmbushTier1 = 10 -- Drug quantity threshold for 3 attackers settings.WholesaleAmbushTier1 = 10 -- Drug quantity threshold for 3 attackers
--settings.WholesaleAmbushTier2 = 20 -- Drug quantity threshold for 4 attackers settings.WholesaleAmbushTier2 = 20 -- Drug quantity threshold for 4 attackers
--settings.WholesaleAmbushTier3 = 30 -- Drug quantity threshold for 5 attackers settings.WholesaleAmbushTier3 = 30 -- Drug quantity threshold for 5 attackers
--settings.WholesaleWeaponTiers = true -- Scale weapon difficulty based on drug quantity settings.FailChance = 20 -- Percentage chance of ambush occurring on a failed deal
--settings.WholesaleWeaponsTier1 = { -- Basic weapons (default) settings.PoliceCount = 0 -- Minimum police required to initiate a wholesale deal
-- "WEAPON_PISTOL", local Price = {
-- "WEAPON_BAT", cokeburner = {
-- "WEAPON_KNIFE", min = 25,
-- "WEAPON_MACHETE" max = 50
--} },
--settings.WholesaleWeaponsTier2 = { -- Medium weapons (10+ drugs) crackburner = {
-- "WEAPON_COMBATPISTOL", min = 25,
-- "WEAPON_MICROSMG", max = 50
-- "WEAPON_SAWNOFFSHOTGUN", },
-- "WEAPON_CROWBAR" lsdburner = {
--} min = 25,
--settings.WholesaleWeaponsTier3 = { -- Advanced weapons (20+ drugs) max = 50
-- "WEAPON_APPISTOL", },
-- "WEAPON_SMG", heroinburner = {
-- "WEAPON_PUMPSHOTGUN", min = 25,
-- "WEAPON_CARBINERIFLE" max = 50
--} },
--settings.WholesaleWeaponsTier4 = { -- Elite weapons (30+ drugs) xtcburner = {
-- "WEAPON_HEAVYPISTOL", min = 25,
-- "WEAPON_ASSAULTSMG", max = 50
-- "WEAPON_ASSAULTSHOTGUN", },
-- "WEAPON_SPECIALCARBINE" methburner = {
--} min = 25,
--settings.WholesaleShowEstimates = true -- Show estimated value before deal max = 50
--settings.WholesaleFailPoliceAlert = 75 -- Chance to alert police on failed deals (0-100) }
--settings.WholesaleResetOnTimeout = true -- Reset wholesale flag when buyer times out }
--settings.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
--settings.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police settings.Locs = {
--settings.WholesaleTimeout = 600 -- time in seconds to get to the location vector4(-2352.32, 266.78, 165.3, 23.46),
--settings.PoliceCount = 0 vector4(-1467.49, 874.01, 183.59, 298.45),
-- vector4(-856.71, 874.26, 202.85, 205.3),
--local Price = { vector4(950.58, -128.49, 74.42, 205.3),
-- cokeburner = { vector4(1152.71, -328.43, 69.21, 205.3),
-- min = 25, vector4(112.66, -1955.67, 20.75, 37.94),
-- max = 50 vector4(-544.4, -1684.8, 19.89, 252.07),
-- }, vector4(-1185.02, -1805.4, 3.91, 184.83),
-- crackburner = { vector4(-1641.4, -981.99, 7.58, 35.38),
-- min = 25, vector4(-1827.93, 782.36, 138.29, 219.99),
-- max = 50 vector4(-320.84, 2818.73, 59.45, 337.22),
-- }, vector4(474.88, 2609.56, 44.48, 357.0),
-- lsdburner = { }
-- min = 25, Locations = Locations or {}
-- max = 50
-- },
-- heroinburner = { GlobalState.MDDrugsLocations.Wholesale = settings
-- min = 25,
-- max = 50 for k, v in pairs (burners) do
-- }, Bridge.Framework.RegisterUsableItem(k, function(source, item)
-- xtcburner = { local src = source
-- min = 25, if active[source] then
-- max = 50 TriggerClientEvent("md-drugs:client:MarkLocation", src, active[source].location)
-- }, return
-- methburner = { end
-- min = 25, if #Bridge.Framework.GetPlayersByJob('police') < settings.PoliceCount then
-- max = 50 return Bridge.Notify.SendNotify(source, Bridge.Language.Locale('wholesale.not_enough_police'), 'error')
-- } end
--} local itemCount, itemList = 0, {}
--local locs = { for m, d in pairs (v) do
-- vector4(-2352.32, 266.78, 165.3, 23.46), local amt = Bridge.Inventory.GetItemCount(source, d) or 0
-- vector4(-1467.49, 874.01, 183.59, 298.45), if amt > 0 then
-- vector4(-856.71, 874.26, 202.85, 205.3), itemCount = itemCount + amt
-- vector4(950.58, -128.49, 74.42, 205.3), itemList[d] = amt
-- vector4(1152.71, -328.43, 69.21, 205.3), end
-- vector4(112.66, -1955.67, 20.75, 37.94), end
-- vector4(-544.4, -1684.8, 19.89, 252.07), if itemCount < settings.WholesaleMinQuantity then
-- vector4(-1185.02, -1805.4, 3.91, 184.83), return Bridge.Notify.SendNotify(source, Bridge.Language.Locale('wholesale.not_enough_drugs'), 'error')
-- vector4(-1641.4, -981.99, 7.58, 35.38), end
-- vector4(-1827.93, 782.36, 138.29, 219.99),
-- vector4(-320.84, 2818.73, 59.45, 337.22), if Bridge.Inventory.RemoveItem(src, k, 1) then
-- vector4(474.88, 2609.56, 44.48, 357.0), active[src] = {
--} count = itemCount,
-- itemList = itemList,
--ps.registerCallback('md-drugs:server:GetWSsettings', function(source) location = settings.Locs[math.random(1, #settings.Locs)],
-- return settings price = math.random(Price[k].min, Price[k].max),
--end) drugType = k,
-- ambush = math.random(1, 100) <= settings.FailChance and true or false,
--function getRandW(source) }
-- local rand = math.random(1, #locs) if active[src].ambush and settings.WholesaleAmbushEnabled then
-- return locs[rand] active[src].attackerCount = settings.WholesaleAmbushBase
--end if settings.WholesaleAmbushScale then
-- if active[src].count > settings.WholesaleAmbushTier1 then
--for k, v in pairs (burners) do active[src].attackerCount = active[src].attackerCount + 1
-- ps.createUseable(k, function(source, item) end
-- if active[ps.getIdentifier(source)] then if active[src].count > settings.WholesaleAmbushTier2 then
-- TriggerClientEvent("md-drugs:client:GetLocation", active[ps.getIdentifier(source)].src, active[ps.getIdentifier(source)]) active[src].attackerCount = active[src].attackerCount + 1
-- return end
-- end if active[src].count > settings.WholesaleAmbushTier3 then
-- if ps.getJobTypeCount('leo') < settings.PoliceCount then return Bridge.Notify.SendNotify(source, Bridge.Language.Locale('wholesale.notEnoughCops'), 'error') end active[src].attackerCount = active[src].attackerCount + 1
-- if ps.removeItem(source, k, 1) then end
-- local drugs, count = {}, 0 end
-- for m, d in pairs (v) do else
-- local amt = ps.getItemCount(source, d) or 0 active[src].attackerCount = 0
-- if amt > 0 then end
-- drugs[d] = (drugs[d] or 0) + amt TriggerClientEvent("md-drugs:client:GetLocation", src, active[src])
-- count = count + amt end
-- end end)
-- end end
-- if count < settings.WholesaleMinQuantity then
-- ps.addItem(source, k, 1) RegisterNetEvent('md-drugs:server:SuccessSale', function(entity)
-- Bridge.Notify.SendNotify(source, Bridge.Language.Locale('wholesale.not_enough_drugs') or 'Not enough drugs for wholesale deal', 'error') local src = source
-- return if not active[src] then
-- end return
-- active[ps.getIdentifier(source)] = { end
-- src = source, if active[src].ambush then
-- item = k, Bridge.Prints.Warn(Bridge.Language.Locale('wholesale.ambush_fail_warn', Bridge.Framework.GetPlayerIdentifier(src)))
-- location = getRandW(source), return
-- price = Price[k], end
-- count = count, if not checkDistance(src, active[src].location, 5.0, 'md-drugs:server:SuccessSale') then
-- drugs = drugs return
-- } end
-- TriggerClientEvent("md-drugs:client:GetLocation", active[ps.getIdentifier(source)].src, active[ps.getIdentifier(source)]) local basePrice = active[src].price * active[src].count
-- end local bonusMultiplier = math.min(math.floor(active[src].count / 10) * settings.WholesaleQuantityBonus, settings.WholesaleMaxBonus)
-- end) local totalPrice = math.floor(basePrice * (1 + bonusMultiplier))
--end for k, v in pairs (active[src].itemList) do
-- local has = Bridge.Inventory.GetItemCount(src, k) or 0
--local function getBonus(quantity) if has < v then
-- local bonus = math.floor(quantity / 10) * settings.WholesaleQuantityBonus return
-- if bonus > settings.WholesaleMaxBonus then end
-- bonus = settings.WholesaleMaxBonus end
-- end for k, v in pairs (active[src].itemList) do
-- return bonus if not Bridge.Inventory.RemoveItem(src, k, v) then
--end return
--RegisterNetEvent('md-drugs:server:SuccessSale', function() end
-- local src = source end
-- local id = ps.getIdentifier(source) Bridge.Framework.AddAccountBalance(src, 'cash', totalPrice)
-- end)
-- if not active[id] then
-- return RegisterNetEvent('md-drugs:server:CleanupWholesale', function()
-- end local src = source
-- local deal = active[id] if active[src] then
-- if deal.count < settings.WholesaleMinQuantity then active[src] = nil
-- Bridge.Notify.SendNotify(src, 'Not enough drugs for wholesale deal', 'error') end
-- active[id] = nil end)
-- return
-- end RegisterNetEvent('md-drugs:server:getkilledFuckingNoob', function()
-- local basePrice = math.floor(((deal.price.min + deal.price.max) / 2) * deal.count) local src = source
-- local bonus = getBonus(deal.count) if not active[src] then
-- local finalPrice = math.floor(basePrice + (basePrice * bonus)) return
-- local need, have = 0,0 end
-- for k, v in pairs (deal.drugs) do for k, v in pairs (active[src].itemList) do
-- need = need + 1 local has = Bridge.Inventory.GetItemCount(src, k) or 0
-- if ps.hasItem(src, k, v) then if has > 0 then
-- have = have + 1 Bridge.Inventory.RemoveItem(src, k, has)
-- end end
-- end end
-- if need ~= have then active[src] = nil
-- Bridge.Notify.SendNotify(src, 'You are missing some drugs for the deal', 'error') end)
-- active[id] = nil
-- return
-- end
-- local removed = true
-- for k, v in pairs (deal.drugs) do
-- if not ps.removeItem(src, k, v) then
-- removed = false
-- break
-- end
-- end
-- if not removed then
-- Bridge.Notify.SendNotify(src,'Failed to remove drugs for the deal', 'error')
-- active[id] = nil
-- return
-- end
-- ps.addMoney(src, 'cash', finalPrice, 'Wholesale sale successful' .. ' $' .. finalPrice)
-- Bridge.Notify.SendNotify(src, 'Wholesale sale successful' .. ' $' .. finalPrice, 'success')
-- active[id] = nil
--end)
--
--RegisterNetEvent('md-drugs:server:CleanupWholesale', function()
-- local src = source
-- local id = ps.getIdentifier(source)
-- if active[id] then
-- active[id] = nil
-- end
--end)
+2 -3
View File
@@ -1,10 +1,7 @@
Config = {} --Ignore. Config = {} --Ignore.
Bridge = exports.community_bridge:Bridge() Bridge = exports.community_bridge:Bridge()
ps = exports.ps_lib:init() --Ignore.
ps.loadLangs("en") -- set your language
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel, ox_fuel
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.Emotes = 'rp' -- rp, dp, scully, custom Config.Emotes = 'rp' -- rp, dp, scully, custom
----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE ----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE
@@ -32,11 +29,13 @@ Config.Minigames = {
glmath = {timeLimit = 300000}, glmath = {timeLimit = 300000},
} }
Config.minigametype = 'ps_circle' -- look above for options or choose none if you dont want any minigames Config.minigametype = 'ps_circle' -- look above for options or choose none if you dont want any minigames
Config.DefaultAnimation = { Config.DefaultAnimation = {
dict = "mp_arresting", dict = "mp_arresting",
clip = "a_uncuff", clip = "a_uncuff",
flag = 49, flag = 49,
} }
Config.ProgressBar = { Config.ProgressBar = {
Disables = { Disables = {
move = true, -- Disable movement move = true, -- Disable movement