- added languages
This commit is contained in:
1 parent
51059f6aed
commit
ca50437751
23 files changed
+1837
-63
No files matched your search
+10
-2
@@ -114,11 +114,11 @@ end
|
||||
for k, v in pairs (locations.MakePowder) do
|
||||
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = ps.lang('coke.makePow'),
|
||||
label = ps.lang('coke.targetMakePow'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('coca_leaf') then
|
||||
ps.notify(ps.lang('coke.noleaf'), 'error')
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('coca_leaf')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
|
||||
@@ -137,6 +137,10 @@ for k, v in pairs (locations.CuttingCoke) do
|
||||
label = ps.lang('coke.targetCutCoke'),
|
||||
icon = 'fa-solid fa-mortar-pestle',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
return
|
||||
end
|
||||
CutCoke(v.loc, v.offset, v.rotation)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -154,6 +158,10 @@ for k, v in pairs (locations.BaggingCoke) do
|
||||
label = ps.lang('coke.targetBagCoke'),
|
||||
icon = 'fa-solid fa-sack-xmark',
|
||||
action = function()
|
||||
if not ps.hasItem('empty_weed_bag') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
|
||||
return
|
||||
end
|
||||
BagCoke(v.loc, v.offset, v.rotation)
|
||||
end,
|
||||
canInteract = function()
|
||||
|
||||
@@ -8,7 +8,7 @@ local function walkAway(targ)
|
||||
end
|
||||
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
-- PoliceCall(20)
|
||||
PoliceCall(20)
|
||||
if ps.vehicleData() then
|
||||
ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
|
||||
walkAway(targ)
|
||||
@@ -22,7 +22,7 @@ local function sellDrug(item, amount, price, targ)
|
||||
end
|
||||
|
||||
local function deny(targ)
|
||||
-- PoliceCall(20)
|
||||
PoliceCall(20)
|
||||
buyers[targ] = 'sold'
|
||||
if not ps.progressbar(ps.lang('Cornerselling.deny'), 4000, 'argue5') then return end
|
||||
walkAway(targ)
|
||||
@@ -93,7 +93,6 @@ local function Cornersell()
|
||||
|
||||
local targ = findPed()
|
||||
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
|
||||
|
||||
if data == false then
|
||||
sell = false
|
||||
return
|
||||
@@ -122,7 +121,7 @@ local function Cornersell()
|
||||
ps.requestAnim("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
FreezeEntityPosition(targ, true)
|
||||
ps.entityTarget(data.ped, {
|
||||
ps.entityTarget(targ, {
|
||||
{
|
||||
label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
@@ -158,10 +157,10 @@ RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
if sell then
|
||||
sell = false
|
||||
ps.hideText()
|
||||
ps.notify(ps.lang('Cornerselling.stopped', 'error'))
|
||||
ps.notify(ps.lang('Cornerselling.stopped'), 'error')
|
||||
else
|
||||
sell = true
|
||||
ps.notify(ps.lang('Cornerselling.start', 'success'))
|
||||
ps.notify(ps.lang('Cornerselling.start'), 'success')
|
||||
Cornersell()
|
||||
end
|
||||
end)
|
||||
|
||||
+14
-4
@@ -1,14 +1,21 @@
|
||||
local locations = ps.callback('md-drugs:server:GetCrackLocations')
|
||||
|
||||
for k, v in pairs (locations.makecrack) do
|
||||
ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = ps.lang('crack.targetMake'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", k) return end
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failcrackone", k)
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('crack.cook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makecrack", k)
|
||||
TriggerServerEvent('md-drugs:server:makecrackone', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
@@ -24,7 +31,10 @@ for k, v in pairs (locations.bagcrack) do
|
||||
label = ps.lang('crack.targetBag'),
|
||||
icon = 'fa-solid fa-weight-scale',
|
||||
action = function()
|
||||
if not ps.hasItem('empty_weed_bag') then return end
|
||||
if not ps.hasItem('empty_weed_bag') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", k)
|
||||
end,
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
local minigametype = Config.minigametype
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
RegisterCommand('te', function(source, args)
|
||||
if #args < 1 then
|
||||
print('Usage: /te eventname [arg1] [arg2] ...')
|
||||
return
|
||||
end
|
||||
|
||||
local eventName = args[1]
|
||||
|
||||
local eventArgs = {}
|
||||
for i = 2, #args do
|
||||
local arg = args[i]
|
||||
local num = tonumber(arg)
|
||||
table.insert(eventArgs, num ~= nil and num or arg)
|
||||
end
|
||||
|
||||
TriggerServerEvent(eventName, table.unpack(eventArgs))
|
||||
end, false)
|
||||
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
|
||||
+11
-2
@@ -2,6 +2,7 @@
|
||||
local herointable = false
|
||||
local dirty = false
|
||||
local locations = ps.callback('md-drugs:server:GetHeroinLocations')
|
||||
|
||||
local function createLabKit(coord, head)
|
||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
@@ -11,7 +12,11 @@ local function createLabKit(coord, head)
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('heroin.targetCook'),
|
||||
action = function()
|
||||
if not ps.hasItem('emptyvial') then return end
|
||||
if not ps.hasItem('emptyvial') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('emptyvial')), 'error')
|
||||
return
|
||||
end
|
||||
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
@@ -20,6 +25,7 @@ local function createLabKit(coord, head)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
return end
|
||||
|
||||
if not ps.progressbar(ps.lang('heroin.pbCook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end,
|
||||
@@ -45,7 +51,10 @@ local function createLabKit(coord, head)
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('heroin.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then return end
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('cleaningkit')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = ps.callback('removeCleaningkit', false)
|
||||
if done then dirty = false end
|
||||
|
||||
+11
-10
@@ -2,11 +2,12 @@
|
||||
local started = false
|
||||
local hit = 0
|
||||
local location = ps.callback('md-drugs:server:GetLeanLocs')
|
||||
|
||||
local function SpawnCarPedChase()
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = location.StartLoc[math.random(1,#location.StartLoc)]
|
||||
|
||||
if started then ps.notify(Lang.lean.act,'error') return end
|
||||
if started then ps.notify(ps.lang('lean.alreadyChasing'), 'error') return end
|
||||
started = true
|
||||
|
||||
ps.callback('md-drugs:server:RegisterLean')
|
||||
@@ -41,15 +42,15 @@ local function SpawnCarPedChase()
|
||||
label = ps.lang('lean.stealFromTruck'),
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = false
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = false
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
+15
-7
@@ -32,7 +32,10 @@ local function createLabKit(coord, head)
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('lsd.targetRefine'),
|
||||
action = function()
|
||||
if not ps.hasItem('lsd_one_vial') then return end
|
||||
if not ps.hasItem('lsd_one_vial') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('lsd_one_vial')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not ps.progressbar(ps.lang('lsd.refining'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
@@ -45,7 +48,10 @@ local function createLabKit(coord, head)
|
||||
icon = "fa-regular fa-note-sticky",
|
||||
label = ps.lang('lsd.targetDipping'),
|
||||
action = function()
|
||||
if not ps.hasItem('tab_paper') then return end
|
||||
if not ps.hasItem('tab_paper') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('tab_paper')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not ps.progressbar(ps.lang('lsd.dipping'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
@@ -72,9 +78,9 @@ local function createLabKit(coord, head)
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('lsd.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('lsd.needCleaning'), 'error')
|
||||
return
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cleaningkit')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = ps.callback('md-drugs:server:removecleaningkit')
|
||||
@@ -112,7 +118,6 @@ for k, v in pairs (locations.diethylamide) do
|
||||
label = ps.lang('lsd.targetDie'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('empty_weed_bag') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
|
||||
@@ -150,7 +155,10 @@ for k, v in pairs (locations.buyLSDkit) do
|
||||
label = ps.lang('lsd.targetBuyKit'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.alreadyOwn'), 'error') return end
|
||||
if ps.hasItem('lsdlabkit') then
|
||||
ps.notify(ps.lang('lsd.alreadyOwn'), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.buyingKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:getlabkit', k)
|
||||
end,
|
||||
|
||||
@@ -5,7 +5,10 @@ for k, v in pairs (locations.DryOutMescaline) do
|
||||
label = ps.lang('mesc.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error') return end
|
||||
if not ps.hasItem('cactusbulb') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
||||
end,
|
||||
|
||||
Reference in new issue
Block a user