- add locales, fix cornerselling
This commit is contained in:
1 parent
11e7015672
commit
7ceaa97b5f
3 files changed
+11
-9
No files matched your search
+3
-1
@@ -265,7 +265,9 @@
|
|||||||
"cannabisIcon": "fa-solid fa-cannabis",
|
"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",
|
"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.",
|
"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": {
|
"wholesale": {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Bridge.Callback.Register('md-drugs:server:cornerselling:getAvailableDrugs', func
|
|||||||
if count >= 1 then
|
if count >= 1 then
|
||||||
local maths = math.random(1,100)
|
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)
|
beingRobbed(source, k, count, ped)
|
||||||
soldPeds[src][ped] = {item = k, amount = count}
|
soldPeds[src][ped] = {item = k, amount = count}
|
||||||
return 'robbed'
|
return 'robbed'
|
||||||
@@ -123,12 +123,12 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price
|
|||||||
AddRep(src, 'cornerselling', Config.Cornerselling.Drugs[item].rep * amount)
|
AddRep(src, 'cornerselling', Config.Cornerselling.Drugs[item].rep * amount)
|
||||||
DrugDeals[src] = nil
|
DrugDeals[src] = nil
|
||||||
|
|
||||||
if Config.CornerSelling.config.MarkedBills then
|
if Config.Cornerselling.config.MarkedBills then
|
||||||
Bridge.Inventory.AddItem(src, 'markedbills', price, nil, {worth = price})
|
Bridge.Inventory.AddItem(src, 'markedbills', price, nil, {worth = price})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if Config.CornerSelling.config.CustomItem ~= '' then
|
if Config.Cornerselling.config.CustomItem ~= '' then
|
||||||
Bridge.Inventory.AddItem(src, Config.CornerSelling.config.CustomItem, price)
|
Bridge.Inventory.AddItem(src, Config.Cornerselling.config.CustomItem, price)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
Bridge.Framework.AddAccountBalance(src, 'cash', price)
|
Bridge.Framework.AddAccountBalance(src, 'cash', price)
|
||||||
@@ -150,8 +150,8 @@ end)
|
|||||||
|
|
||||||
RegisterCommand('cornersell', function(source, args, raw)
|
RegisterCommand('cornersell', function(source, args, raw)
|
||||||
local src = source
|
local src = source
|
||||||
if #Bridge.Framework.GetPlayersByJob('police') < Config.CornerSelling.config.policeRequired then
|
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')
|
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Cornerselling.notEnoughCops', Config.Cornerselling.config.policeRequired - #Bridge.Framework.GetPlayersByJob('police')), 'error')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
TriggerClientEvent('md-drugs:client:cornerselling', src)
|
TriggerClientEvent('md-drugs:client:cornerselling', src)
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ local function handleFresh(source)
|
|||||||
heroin = 0,
|
heroin = 0,
|
||||||
dealerrep = 0,
|
dealerrep = 0,
|
||||||
cornerselling = {
|
cornerselling = {
|
||||||
price = Config.CornerSellLevel[1].price,
|
price = Config.Cornerselling.CornerSellLevel[1].price,
|
||||||
rep = 0,
|
rep = 0,
|
||||||
label = Config.CornerSellLevel[1].label,
|
label = Config.Cornerselling.CornerSellLevel[1].label,
|
||||||
level = 1
|
level = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user