diff --git a/client/weed.lua b/client/weed.lua index 909b630..994967a 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -102,8 +102,8 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab title = itemData.label, onSelect = function() if not minigame() then return end - if not progressbar(eventLabelPrefix .. itemData.label) then return end - TriggerServerEvent('md-drugs:server:MakeWeedItems', {item = item, recipe = 'weed', num = k, table = tableName}) + if not progressbar( Bridge.Language.Locale(eventLabelPrefix, itemData.label)) then return end + TriggerServerEvent('md-drugs:server:RollBlunt', tableName, item) end } end @@ -115,11 +115,11 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab end RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data) - createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", Bridge.Language.Locale('weed.bluntWrap'), 'bluntwrap') + createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'weed.bluntWrap', 'bluntwrap') end) RegisterNetEvent('md-drugs:client:rollBlunt', function(data) - createBluntOptions('mddrugsblunts', "Roll Blunts", Bridge.Language.Locale('weed.blunts'), 'blunts') + createBluntOptions('mddrugsblunts', "Roll Blunts", 'weed.rolling', 'blunts') end) for k, v in pairs (locations.WeedSalesman) do diff --git a/locales/en.json b/locales/en.json index 2b7feb1..29a003c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -267,7 +267,9 @@ "invalidTableWarn": "Player: %s attempted to exploit the weed event by triggering the event with an invalid recipe table butter/oil.", "recipeDoesntExistWarn": "Player: %s attempted to exploit the weed event by triggering the event with a non existent recipe name: %s.", "targetMakeButter": "Make Edible Products", - "targetMakeOil": "Make Oil" + "targetMakeOil": "Make Oil", + "making": "Making %s ", + "rolling": "Rolling %s" }, "wholesale": { diff --git a/server/weed.lua b/server/weed.lua index 1da4009..ccd04ca 100644 --- a/server/weed.lua +++ b/server/weed.lua @@ -73,6 +73,16 @@ RegisterServerEvent('md-drugs:server:MakeWeedItems', function(tabl, item, loc) end) +RegisterNetEvent('md-drugs:server:RollBlunt', function(tabl, item) + local src = source + if timeOut(src, 'md-drugs:server:RollBlunt') then return end + local recipe = Config.Weed.Recipes[tabl][item] + if not recipe then + Bridge.Prints.Warn(Bridge.Language.Locale('weed.recipeDoesntExistWarn', Bridge.Framework.GetPlayerIdentifier(src), item)) + return + end + if not craft(src, recipe) then return end +end) Bridge.Framework.RegisterUsableItem("dabrig", function(source, item) local src = source if Bridge.Inventory.HasItem(src, "butanetorch") then diff --git a/shared/config.lua b/shared/config.lua index 640fbf8..1c7d434 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -7,7 +7,7 @@ Config.Tier2 = 300 -- amount to hit for level 3 --- Customizations -Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty' +Config.Dispatch = 'ox' -- either 'ps', 'cd', 'core', 'aty' Config.Minigames = { ps_circle = {amount = 2, speed = 8,}, ps_maze = {timelimit = 15},