finished locales EN
This commit is contained in:
1 parent
37f86bf50d
commit
683eaff7de
46 files changed
+965
-1049
No files matched your search
+31
-9
@@ -30,6 +30,24 @@ local weedStore = {
|
||||
mdwoods =2,
|
||||
}
|
||||
|
||||
local weed = {
|
||||
blunts = {
|
||||
blunt = {take = {bluntwrap = 1, grindedweed = 1}, give = {blunt = 1}},
|
||||
chewyblunt = {take = {bluntwrap = 1, grindedweed = 1, loosecoke = 1}, give = {chewyblunt = 1}},
|
||||
leanblunts = {take = {leanbluntwrap = 1, grindedweed = 1}, give = {leanblunts = 1}},
|
||||
dextroblunts = {take = {dextrobluntwrap = 1, grindedweed = 1}, give = {dextroblunts = 1}}
|
||||
},
|
||||
bluntwrap = {
|
||||
leanbluntwrap = {take = {bluntwrap = 5, mdlean = 1}, give = {leanbluntwrap = 5}},
|
||||
dextrobluntwrap = {take = {bluntwrap = 5, mdreddextro = 1}, give = {dextrobluntwrap = 5}},
|
||||
}
|
||||
}
|
||||
|
||||
ps.registerCallback('md-drugs:server:GetWeedRecipe', function(source, tableName)
|
||||
if not source then return false end
|
||||
return weed[tableName]
|
||||
end)
|
||||
|
||||
ps.registerCallback('md-drugs:server:GetWeedLocs', function(source)
|
||||
return weedLocs
|
||||
end)
|
||||
@@ -37,20 +55,21 @@ end)
|
||||
ps.registerCallback('md-drugs:server:getWeedItems', function(source)
|
||||
return weedStore
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:server:buyWeedItem', function(loc, name, amount)
|
||||
local src = source
|
||||
if not ps.checkDistance(src, weedLocs.WeedSalesman[loc].loc, 3.5) then
|
||||
ps.notify(src, ps.lang('Weed.notHere'), "error")
|
||||
ps.notify(src, ps.lang('Checks.notIn'), "error")
|
||||
return
|
||||
end
|
||||
if not weedStore[name] then
|
||||
ps.notify(src, ps.lang('Weed.notHere'), "error")
|
||||
ps.notify(src, ps.lang('weed.itemDoesntExist'), "error")
|
||||
return
|
||||
end
|
||||
if ps.removeMoney(src, 'cash', weedStore[name] * amount) or ps.removeMoney(src, 'bank', weedStore[name] * amount) then
|
||||
ps.addItem(src, name, amount)
|
||||
else
|
||||
ps.notify(src, ps.lang('Weed.noMoney'), "error")
|
||||
ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -59,12 +78,12 @@ RegisterServerEvent('md-drugs:server:dryoutweed', function()
|
||||
if ps.removeItem(src,"wetcannabis", 1) then
|
||||
ps.addItem(src,"drycannabis", 1)
|
||||
else
|
||||
ps.notify(src, ps.lang('Weed.nodry'), "error")
|
||||
ps.notify(src, ps.lang('weed.noDry'), "error")
|
||||
end
|
||||
end)
|
||||
|
||||
local bluntwrap = {'mdreddextro','mdlean'}
|
||||
for k, v in pairs (bluntwrap) do
|
||||
for k, v in pairs (bluntwrap) do
|
||||
ps.createUseable(v, function(source, item) TriggerClientEvent('md-drugs:client:makeBluntWrap', source) end)
|
||||
end
|
||||
|
||||
@@ -77,7 +96,10 @@ end
|
||||
|
||||
RegisterServerEvent('md-drugs:server:MakeWeedItems', function(data)
|
||||
local src = source
|
||||
if not GetRecipe(src, data.recipe, data.table, data.item) then return end
|
||||
if not ps.craftItem(src, weed[data.table][data.item]) then
|
||||
verifyHas(src, weed[data.table][data.item].take)
|
||||
return
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -88,13 +110,13 @@ ps.createUseable("dabrig", function(source, item)
|
||||
TriggerClientEvent("md-drugs:client:dodabs", src)
|
||||
end
|
||||
else
|
||||
ps.notify(src, 'You Need A Butane Torch', 'error')
|
||||
ps.notify(src, ps.lang('weed.needItem', ps.getItemLabel("butanetorch")), 'error')
|
||||
end
|
||||
end)
|
||||
|
||||
ps.createUseable("weedgrinder", function(source, item)
|
||||
local src = source
|
||||
if not ps.hasItem(src, "drycannabis") then ps.notify(src, 'You Need Dried Cannabis', 'error') return end
|
||||
if not ps.hasItem(src, "drycannabis") then ps.notify(src, ps.lang('weed.needItem', ps.getItemLabel("drycannabis")), 'error') return end
|
||||
local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
|
||||
if not check then return end
|
||||
if ps.removeItem(src, "drycannabis",1 ) then
|
||||
@@ -104,7 +126,7 @@ end)
|
||||
|
||||
ps.createUseable("mdwoods", function(source, item)
|
||||
local src = source
|
||||
local check = ps.callback('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
|
||||
local check = ps.callback('md-drugs:client:uncuff', src, ps.lang('weed.crackBlunt'))
|
||||
if not check then return end
|
||||
if ps.removeItem(src, "mdwoods",1 ) then
|
||||
ps.addItem(src, "bluntwrap", 5)
|
||||
|
||||
Reference in new issue
Block a user