- add locales, fix cornerselling

This commit is contained in:
Mustache Dom committed 2026-01-31 02:44:07 -07:00
1 parent 11e7015672
commit 7ceaa97b5f
3 files changed
+11 -9

No files matched your search

+3 -1
View File
@@ -265,7 +265,9 @@
"cannabisIcon": "fa-solid fa-cannabis",
"itemDoesntExistWarn": "Player: %s attempted to exploit the weed salesman event by trying to purchase an item that does not exist in the weed salesman: %s",
"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."
"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"
},
"wholesale": {
+6 -6
View File
@@ -55,7 +55,7 @@ Bridge.Callback.Register('md-drugs:server:cornerselling:getAvailableDrugs', func
if count >= 1 then
local maths = math.random(1,100)
if maths <= Config.CornerSelling.config.robChance then
if maths <= Config.Cornerselling.config.robChance then
beingRobbed(source, k, count, ped)
soldPeds[src][ped] = {item = k, amount = count}
return 'robbed'
@@ -123,12 +123,12 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price
AddRep(src, 'cornerselling', Config.Cornerselling.Drugs[item].rep * amount)
DrugDeals[src] = nil
if Config.CornerSelling.config.MarkedBills then
if Config.Cornerselling.config.MarkedBills then
Bridge.Inventory.AddItem(src, 'markedbills', price, nil, {worth = price})
return
end
if Config.CornerSelling.config.CustomItem ~= '' then
Bridge.Inventory.AddItem(src, Config.CornerSelling.config.CustomItem, price)
if Config.Cornerselling.config.CustomItem ~= '' then
Bridge.Inventory.AddItem(src, Config.Cornerselling.config.CustomItem, price)
return
end
Bridge.Framework.AddAccountBalance(src, 'cash', price)
@@ -150,8 +150,8 @@ end)
RegisterCommand('cornersell', function(source, args, raw)
local src = source
if #Bridge.Framework.GetPlayersByJob('police') < Config.CornerSelling.config.policeRequired then
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Cornerselling.notEnoughCops', Config.CornerSelling.config.policeRequired - #Bridge.Framework.GetPlayersByJob('police')), 'error')
if #Bridge.Framework.GetPlayersByJob('police') < Config.Cornerselling.config.policeRequired then
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Cornerselling.notEnoughCops', Config.Cornerselling.config.policeRequired - #Bridge.Framework.GetPlayersByJob('police')), 'error')
return
end
TriggerClientEvent('md-drugs:client:cornerselling', src)
+2 -2
View File
@@ -92,9 +92,9 @@ local function handleFresh(source)
heroin = 0,
dealerrep = 0,
cornerselling = {
price = Config.CornerSellLevel[1].price,
price = Config.Cornerselling.CornerSellLevel[1].price,
rep = 0,
label = Config.CornerSellLevel[1].label,
label = Config.Cornerselling.CornerSellLevel[1].label,
level = 1
}
}