- half done
This commit is contained in:
1 parent
d2f70d78ed
commit
ebc47ba5d7
41 files changed
+1499
-1012
No files matched your search
@@ -7,7 +7,7 @@ local function spawn()
|
||||
Freeze(ped, true, data.loc.w)
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
label = ps.lang('merchant.targetOpen'),
|
||||
label = Bridge.Language.Locale('merchant.targetOpen'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (data.items) do
|
||||
|
||||
+24
-21
@@ -1,11 +1,11 @@
|
||||
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
local locations = ps.callback('md-drugs:server:GetCokeLocations')
|
||||
local locations = GlobalState.MDDrugsLocations.Cocaine
|
||||
|
||||
local function CutCoke(coords, offset, rotation)
|
||||
cuttingcoke = true
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
ps.requestAnim(animDict, 500)
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
@@ -48,12 +48,14 @@ local function CutCoke(coords, offset, rotation)
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
cuttingcoke = nil
|
||||
end
|
||||
|
||||
local function BagCoke(coords, offset, rotation)
|
||||
baggingcoke = true
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
ps.requestAnim(animDict, 500)
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
@@ -109,19 +111,20 @@ local function BagCoke(coords, offset, rotation)
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
baggingcoke = nil
|
||||
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}, {
|
||||
Bridge.Target.AddBoxZone('cocaplant'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('coke.targetMakePow'),
|
||||
label = Bridge.Language.Locale('coke.targetMakePow'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('coca_leaf') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('coca_leaf')), 'error')
|
||||
if not Bridge.Inventory.HasItem('coca_leaf') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('coca_leaf').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('coke.makePow'), 4000, 'weld') then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -132,13 +135,13 @@ for k, v in pairs (locations.MakePowder) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.CuttingCoke) do
|
||||
ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
|
||||
Bridge.Target.AddBoxZone('cutcoke'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('coke.targetCutCoke'),
|
||||
label = Bridge.Language.Locale('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')
|
||||
if not Bridge.Inventory.HasItem('bakingsoda') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('bakingsoda').label), 'error')
|
||||
return
|
||||
end
|
||||
CutCoke(v.loc, v.offset, v.rotation)
|
||||
@@ -154,13 +157,13 @@ for k, v in pairs (locations.CuttingCoke) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.BaggingCoke) do
|
||||
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
|
||||
Bridge.Target.AddBoxZone('bagcoke'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('coke.targetBagCoke'),
|
||||
label = Bridge.Language.Locale('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')
|
||||
if not Bridge.Inventory.HasItem('empty_weed_bag') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('empty_weed_bag').label), 'error')
|
||||
return
|
||||
end
|
||||
BagCoke(v.loc, v.offset, v.rotation)
|
||||
@@ -176,10 +179,10 @@ for k, v in pairs (locations.BaggingCoke) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cokeTele) do
|
||||
ps.boxTarget('coke_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('coke_tele'..k, v.inside, vector3(v.l, v.w, 2.0), v.inside.w or 180.0,{
|
||||
{
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('coke.teleOut'),
|
||||
label = Bridge.Language.Locale('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
@@ -188,10 +191,10 @@ for k, v in pairs (locations.cokeTele) do
|
||||
end
|
||||
}
|
||||
})
|
||||
ps.boxTarget('coke_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('coke_teleout'..k, v.outside, vector3(v.l, v.w, 2.0), v.outside.w or 180.0,{
|
||||
{
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('coke.teleIn'),
|
||||
label = Bridge.Language.Locale('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
|
||||
+59
-28
@@ -9,31 +9,56 @@ end
|
||||
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
PoliceCall(20)
|
||||
if ps.vehicleData() then
|
||||
ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
|
||||
if IsPedInAnyVehicle(PlayerPedId(), true) then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inVeh'), 'error')
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
|
||||
if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', ps.getLabel(item), price)), 4000, 'uncuff') then walkAway(targ) return end
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.selling', Bridge.Inventory.GetItemInfo(item).label, price), 4000, 'uncuff') then
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
buyers[targ] = 'sold'
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price, NetworkGetNetworkIdFromEntity(targ))
|
||||
walkAway(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
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.deny'), 4000, 'argue5') then return end
|
||||
walkAway(targ)
|
||||
end
|
||||
|
||||
local function getClosestPed()
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
local distance = 10.0
|
||||
local pedList = GetGamePool('CPed')
|
||||
local closestDistance = 1000.0
|
||||
local PED = nil
|
||||
for i = 1, #pedList do
|
||||
local ped = pedList[i]
|
||||
if ped ~= PlayerPedId() then
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local dist = #(coords - pedCoords)
|
||||
if dist < closestDistance then
|
||||
PED = ped
|
||||
closestDistance = dist
|
||||
end
|
||||
end
|
||||
end
|
||||
if PED and closestDistance < distance then
|
||||
return PED, closestDistance
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
local function findPed()
|
||||
local targ = nil
|
||||
repeat
|
||||
Wait(100)
|
||||
targ = ps.getNearestPed(GetEntityCoords(PlayerPedId()), 8)
|
||||
|
||||
targ = getClosestPed()
|
||||
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then
|
||||
targ = nil
|
||||
end
|
||||
@@ -47,15 +72,17 @@ local function findPed()
|
||||
if not sell then return end
|
||||
buyers[targ] = true
|
||||
|
||||
ps.drawText(ps.lang('Cornerselling.wait'))
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.wait'))
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone
|
||||
|
||||
if not sell then return end
|
||||
|
||||
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
|
||||
ps.hideText()
|
||||
Bridge.HelpText.HideHelpText()
|
||||
CreateThread(function()
|
||||
Wait(45000)
|
||||
walkAway(targ)
|
||||
@@ -65,14 +92,17 @@ local function findPed()
|
||||
end
|
||||
|
||||
local function checkItems()
|
||||
local count = 0
|
||||
local has = false
|
||||
for k, v in pairs (GlobalState.DrugNames) do
|
||||
if ps.hasItem(v) then
|
||||
count = count + 1
|
||||
if Bridge.Inventory.HasItem(v) then
|
||||
has = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if count == 0 then ps.notify(ps.lang('Cornerselling.nodrugs', 'error')) return false end
|
||||
if not has then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.nodrugs', 'error'))
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -89,10 +119,10 @@ local function Cornersell()
|
||||
return
|
||||
end
|
||||
|
||||
ps.drawText(ps.lang('Cornerselling.searching'))
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.searching'))
|
||||
|
||||
local targ = findPed()
|
||||
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:cornerselling:getAvailableDrugs', NetworkGetNetworkIdFromEntity(targ))
|
||||
if data == false then
|
||||
sell = false
|
||||
return
|
||||
@@ -102,13 +132,13 @@ local function Cornersell()
|
||||
TaskGoStraightToCoord(targ, -1858.232910, -1242.395630, 8.60510, 100.0, -1, 0.0, 0.0)
|
||||
SetPedMoveRateOverride(targ, 10.0)
|
||||
local got = false
|
||||
ps.entityTarget(targ, {
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
{
|
||||
label = ps.lang('Cornerselling.targetTakeBack'),
|
||||
label = Bridge.Language.Locale('Cornerselling.targetTakeBack'),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
got = true
|
||||
TriggerServerEvent('md-drugs:server:getBackRobbed')
|
||||
TriggerServerEvent('md-drugs:server:getBackRobbed', NetworkGetNetworkIdFromEntity(targ))
|
||||
Cornersell()
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -116,14 +146,15 @@ local function Cornersell()
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}}, nil)
|
||||
}
|
||||
})
|
||||
else
|
||||
ps.requestAnim("rcmme_tracey1")
|
||||
Bridge.Anim.RequestDict("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
FreezeEntityPosition(targ, true)
|
||||
ps.entityTarget(targ, {
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
{
|
||||
label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
|
||||
label = Bridge.Language.Locale('Cornerselling.targetSell', data.amount, Bridge.Inventory.GetItemInfo(data.item).label, data.price),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
sellDrug(data.item, data.amount, data.price, targ)
|
||||
@@ -136,7 +167,7 @@ local function Cornersell()
|
||||
end,
|
||||
},
|
||||
{
|
||||
label = ps.lang('Cornerselling.targetDeny'),
|
||||
label = Bridge.Language.Locale('Cornerselling.targetDeny'),
|
||||
icon = "fa-solid fa-person-harassing",
|
||||
action = function()
|
||||
deny(targ)
|
||||
@@ -156,11 +187,11 @@ end
|
||||
RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
if sell then
|
||||
sell = false
|
||||
ps.hideText()
|
||||
ps.notify(ps.lang('Cornerselling.stopped'), 'error')
|
||||
Bridge.HelpText.HideHelpText()
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.stopped'), 'error')
|
||||
else
|
||||
sell = true
|
||||
ps.notify(ps.lang('Cornerselling.start'), 'success')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.start'), 'success')
|
||||
Cornersell()
|
||||
end
|
||||
end)
|
||||
@@ -170,4 +201,4 @@ CreateThread(function()
|
||||
local box = ps.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
|
||||
onEnter = function() inZone = true end, onExit = function() inZone = false end})
|
||||
end
|
||||
end)
|
||||
end)
|
||||
+11
-11
@@ -1,20 +1,20 @@
|
||||
local locations = ps.callback('md-drugs:server:GetCrackLocations')
|
||||
local locations = GlobalState.MDDrugsLocations.Crack
|
||||
|
||||
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}, {
|
||||
Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('crack.targetMake'),
|
||||
label = Bridge.Language.Locale('crack.targetMake'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
if not Bridge.Inventory.HasItem('bakingsoda') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('bakingsoda').label), '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
|
||||
if not progressbar(Bridge.Language.Locale('crack.cook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:makecrackone', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -26,16 +26,16 @@ for k, v in pairs (locations.makecrack) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.bagcrack) do
|
||||
ps.boxTarget('bagCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('crack.targetBag'),
|
||||
label = Bridge.Language.Locale('crack.targetBag'),
|
||||
icon = 'fa-solid fa-weight-scale',
|
||||
action = function()
|
||||
if not ps.hasItem('empty_weed_bag') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
|
||||
if not Bridge.Inventory.HasItem('empty_weed_bag') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('empty_weed_bag').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('crack.bag'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
|
||||
+27
-17
@@ -1,20 +1,25 @@
|
||||
local isActive = false
|
||||
local dealer = {}
|
||||
|
||||
--TODO: Finish Dealers
|
||||
local function SpawnDealer()
|
||||
local getDealers = ps.callback('md-drugs:server:getDealers')
|
||||
for k,v in pairs(getDealers) do
|
||||
if #dealer >= 1 then
|
||||
for k,v in pairs (dealer) do
|
||||
DeletePed(v)
|
||||
end
|
||||
dealer = {}
|
||||
end
|
||||
for k,v in pairs(GlobalState.MDDrugsLocations.Dealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
ps.requestModel(Ped, 30000)
|
||||
requestModel(Ped, 30000)
|
||||
local loc = json.decode(v.coords)
|
||||
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
|
||||
Freeze(dealer[k], true, loc.h)
|
||||
ps.entityTarget(dealer[k], {
|
||||
Bridge.Target.AddLocalEntity(dealer[k], {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetGetDel'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetGetDel'),
|
||||
action = function()
|
||||
local data = ps.callback('md-drugs:server:GetDeliveryItem', k)
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:GetDeliveryItem', k)
|
||||
if type(data) == 'table' and data.coords then
|
||||
TriggerEvent('md-drugs:client:setLocation', data)
|
||||
end
|
||||
@@ -22,24 +27,29 @@ local function SpawnDealer()
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-store",
|
||||
label = ps.lang('Deliveries.targetOpenShop'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetOpenShop'),
|
||||
action = function()
|
||||
local rep = GetRep()
|
||||
local items = ps.callback('md-drugs:server:dealerList')
|
||||
local items = Bridge.Callback.Trigger('md-drugs:server:dealerList', k)
|
||||
local options = {}
|
||||
for m, d in pairs (items) do
|
||||
if rep.dealerrep >= d.minrep then
|
||||
options[#options+1] = {
|
||||
title = ps.getLabel(d.name),
|
||||
title = Bridge.Inventory.GetItemInfo(d.name).label,
|
||||
description = '$' .. d.price,
|
||||
icon = ps.getImage(d.name),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m)
|
||||
icon = Bridge.Inventory.GetItemInfo(d.name).image,
|
||||
onSelect = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m, k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
ps.menu(ps.lang('Deliveries.shopHeader'), ps.lang('Deliveries.shopHeader'), options)
|
||||
Bridge.Menu.Open({
|
||||
id = 'DealerMenu',
|
||||
title = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
description = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
options = options
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
||||
@@ -59,12 +69,12 @@ RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
isActive = true
|
||||
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
|
||||
Freeze(Buyer, true, coord.w)
|
||||
ps.entityTarget(Buyer, {
|
||||
Bridge.Target.AddLocalEntity(Buyer, {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetHandOff'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
|
||||
+101
-38
@@ -2,6 +2,20 @@
|
||||
local minigametype = Config.minigametype
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
function requestModel(ped, timeout)
|
||||
timeout = timeout or 15000
|
||||
local startTime = GetGameTimer()
|
||||
RequestModel(ped)
|
||||
while not HasModelLoaded(ped) do
|
||||
Wait(0)
|
||||
if GetGameTimer() - startTime > timeout then
|
||||
Bridge.Prints.Debug('requestModel timed out', ped, GetGameTimer() - startTime)
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function minigame()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
@@ -90,39 +104,19 @@ end
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
if dispatch == 'ps' then
|
||||
exports['ps-dispatch']:DrugSale()
|
||||
elseif dispatch == 'cd' then
|
||||
local data = exports['cd_dispatch']:GetPlayerInfo()
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police', },
|
||||
coords = data.coords,
|
||||
title = '420-69 Drug Sale',
|
||||
message = 'A '..data.sex..' robbing a store at '..data.street,
|
||||
flash = 0,
|
||||
unique_id = data.unique_id,
|
||||
sound = 1,
|
||||
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
|
||||
})
|
||||
elseif dispatch == 'core' then
|
||||
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
|
||||
{icon="fa-ruler", info="4.5 MILES"},
|
||||
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
|
||||
elseif dispatch == 'aty' then
|
||||
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
|
||||
elseif dispatch == 'qs' then
|
||||
exports['qs-dispatch']:DrugSale()
|
||||
elseif dispatch == 'codem' then
|
||||
local Data = {
|
||||
type = 'Drug Sale',
|
||||
header = 'Someone Selling Drugs',
|
||||
text = 'Hurry up and save the community',
|
||||
code = '420-69',
|
||||
}
|
||||
exports['codem-dispatch']:CustomDispatch(Data)
|
||||
else
|
||||
print('Congrats, You Choose 0 of the options :)')
|
||||
end
|
||||
Bridge.Dispatch.SendAlert({
|
||||
message = "Suspisous Handoff",
|
||||
code = "10-31",
|
||||
coords = GetEntityCoords(PlayerPedId()),
|
||||
jobs = {"police"},
|
||||
blipData = {
|
||||
sprite = 161,
|
||||
color = 1,
|
||||
scale = 1.0
|
||||
},
|
||||
time = 300000,
|
||||
icon = "fas fa-exclamation-triangle"
|
||||
})
|
||||
else
|
||||
return
|
||||
end
|
||||
@@ -131,7 +125,7 @@ end
|
||||
function GetCops(number)
|
||||
if number == 0 then return true end
|
||||
local amount = ps.callback('md-drugs:server:GetCoppers')
|
||||
if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
if amount >= number then return true else Bridge.Notify.SendNotify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
end
|
||||
|
||||
function Freeze(entity, toggle, head)
|
||||
@@ -249,8 +243,77 @@ RegisterCommand('DrugRep', function()
|
||||
})
|
||||
end, false)
|
||||
|
||||
function handleGang(gang)
|
||||
if gang == nil or gang == '' or gang == "" then return true end
|
||||
if ps.getGangName() == gang or gang == 1 then return true end
|
||||
return false
|
||||
if Bridge.Framework.GetResourceName() == 'es_extended' then
|
||||
function handleGang(gang)
|
||||
return true
|
||||
end
|
||||
else
|
||||
function handleGang(gang)
|
||||
if not gang then
|
||||
return true
|
||||
end
|
||||
if #gang == 0 then
|
||||
return true
|
||||
end
|
||||
local data = Bridge.Framework.GetPlayerData()
|
||||
if not data.gang then
|
||||
return false
|
||||
end
|
||||
return data.gang.name == gang
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'rp' then
|
||||
function playEmote(emote)
|
||||
return exports["rpemotes"]:EmoteCommandStart(emote)
|
||||
end
|
||||
function stopEmote()
|
||||
return exports["rpemotes"]:EmoteCancel()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'dp' then
|
||||
function playEmote(emote)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {emote})
|
||||
end
|
||||
function stopEmote()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'scully' then
|
||||
function playEmote(emote)
|
||||
exports.scully_emotemenu:playEmoteByCommand(emote)
|
||||
end
|
||||
function stopEmote()
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'custom' then
|
||||
function playEmote(emote)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {emote})
|
||||
end
|
||||
function stopEmote()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end
|
||||
|
||||
function progressbar(text, time, emote, cancel)
|
||||
playEmote(emote)
|
||||
if not cancel then
|
||||
cancel = {
|
||||
move = true,
|
||||
car = true,
|
||||
combat = true
|
||||
}
|
||||
end
|
||||
local success = Bridge.ProgressBar.Open({
|
||||
duration = time,
|
||||
label = text,
|
||||
canCancel = true,
|
||||
disable = cancel,
|
||||
})
|
||||
stopEmote()
|
||||
return success
|
||||
end
|
||||
+36
-35
@@ -1,32 +1,32 @@
|
||||
|
||||
local herointable = false
|
||||
local dirty = false
|
||||
local locations = ps.callback('md-drugs:server:GetHeroinLocations')
|
||||
local locations = GlobalState.MDDrugsLocations.Heroin
|
||||
|
||||
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)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
ps.entityTarget(heroinlabkit, {
|
||||
Bridge.Target.AddLocalEntity(heroinlabkit, {
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('heroin.targetCook'),
|
||||
label = Bridge.Language.Locale('heroin.targetCook'),
|
||||
action = function()
|
||||
if not ps.hasItem('emptyvial') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('emptyvial')), 'error')
|
||||
if not Bridge.Inventory.HasItem('emptyvial') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('emptyvial').label), 'error')
|
||||
return
|
||||
end
|
||||
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
ps.requestPTFX("core")
|
||||
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", heroinlabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
local coords = GetEntityCoords(heroinlabkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
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
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -35,9 +35,9 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('heroin.targetPickup'),
|
||||
label = Bridge.Language.Locale('heroin.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('heroin.pbPickup'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbPickup'), 4000, 'uncuff') then return end
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
@@ -49,14 +49,14 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('heroin.targetClean'),
|
||||
label = Bridge.Language.Locale('heroin.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('cleaningkit')), 'error')
|
||||
if not Bridge.Inventory.HasItem('cleaningkit') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('cleaningkit').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = ps.callback('removeCleaningkit', false)
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = Bridge.Callback.Trigger('md-drugs:server:removeCleaningKitHeroin', false)
|
||||
if done then dirty = false end
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -67,12 +67,12 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.dryplant) do
|
||||
ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('heroin.targetDry'),
|
||||
label = Bridge.Language.Locale('heroin.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('heroin.pbDry'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbDry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -83,16 +83,16 @@ for k, v in pairs (locations.dryplant) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cutheroinone) do
|
||||
ps.boxTarget('cutHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('heroin.targetCutHeroin'),
|
||||
label = Bridge.Language.Locale('heroin.targetCutHeroin'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
if not Bridge.Inventory.HasItem('bakingsoda') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo('bakingsoda').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -101,19 +101,20 @@ for k, v in pairs (locations.cutheroinone) do
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local peds = {}
|
||||
for k, v in pairs (locations.buyKit) do
|
||||
ps.requestModel(v.ped, 1000)
|
||||
requestModel(v.ped, 1000)
|
||||
peds[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
SetBlockingOfNonTemporaryEvents(peds[k], true)
|
||||
SetEntityInvincible(peds[k], true)
|
||||
ps.entityTarget(peds[k], {
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
{
|
||||
label = ps.lang('heroin.targetBuyKit'),
|
||||
label = Bridge.Language.Locale('heroin.targetBuyKit'),
|
||||
icon = 'fa-solid fa-box-open',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('heroin.pbBuyKit'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -125,28 +126,28 @@ for k, v in pairs (locations.buyKit) do
|
||||
end
|
||||
|
||||
|
||||
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
|
||||
Bridge.Callback.Register("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
ps.notify(ps.lang('heroin.tableout'), 'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('heroin.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
herointable = true
|
||||
local location, head = StartRay()
|
||||
if not location then herointable = false return end
|
||||
if not ps.progressbar(ps.lang('heroin.placing'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(location, head)
|
||||
return true, location
|
||||
end
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.fillneedle) do
|
||||
ps.boxTarget('fillNeedle'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('heroin.targetFill'),
|
||||
label = Bridge.Language.Locale('heroin.targetFill'),
|
||||
icon = 'fa-solid fa-syringe',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbFill'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbFill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@ 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(ps.lang('lean.alreadyChasing'), 'error') return end
|
||||
if started then Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.alreadyChasing'), 'error') return end
|
||||
started = true
|
||||
|
||||
ps.callback('md-drugs:server:RegisterLean')
|
||||
@@ -39,7 +39,7 @@ local function SpawnCarPedChase()
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = ps.lang('lean.stealFromTruck'),
|
||||
label = Bridge.Language.Locale('lean.stealFromTruck'),
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
@@ -69,7 +69,7 @@ for k, v in pairs (location.SyrupVendor) do
|
||||
ps.entityTarget(leanPeds[k], {
|
||||
{
|
||||
icon = "fa-solid fa-hand-holding-medical",
|
||||
label = ps.lang('lean.startMission'),
|
||||
label = Bridge.Language.Locale('lean.startMission'),
|
||||
action = function()
|
||||
SpawnCarPedChase()
|
||||
end,
|
||||
|
||||
+41
-50
@@ -1,18 +1,10 @@
|
||||
local tableout = false
|
||||
local dirtylsd = false
|
||||
local locations = ps.callback('md-drugs:server:GetLSDLocations')
|
||||
local locations = GlobalState.MDDrugsLocations.LSD
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
local function createLabKit(coord, head)
|
||||
requestModel("v_ret_ml_tablea")
|
||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
@@ -21,17 +13,16 @@ local function createLabKit(coord, head)
|
||||
local options = {
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('lsd.targetHeat'),
|
||||
label = Bridge.Language.Locale('lsd.targetHeat'),
|
||||
action = function()
|
||||
local dict = "scr_ie_svm_technical2"
|
||||
if not minigame() then
|
||||
local coords = GetEntityCoords(labkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
dirtylsd = true
|
||||
loadParticle(dict)
|
||||
local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", labkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.heating'), 7000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.heating'), 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -40,14 +31,14 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('lsd.targetRefine'),
|
||||
label = Bridge.Language.Locale('lsd.targetRefine'),
|
||||
action = function()
|
||||
if not ps.hasItem('lsd_one_vial') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('lsd_one_vial')), 'error')
|
||||
if not Bridge.Inventory.HasItem('lsd_one_vial') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('lsd_one_vial').label), '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
|
||||
if not progressbar(Bridge.Language.Locale('lsd.refining'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -56,14 +47,14 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-regular fa-note-sticky",
|
||||
label = ps.lang('lsd.targetDipping'),
|
||||
label = Bridge.Language.Locale('lsd.targetDipping'),
|
||||
action = function()
|
||||
if not ps.hasItem('tab_paper') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('tab_paper')), 'error')
|
||||
if not Bridge.Inventory.HasItem('tab_paper') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('tab_paper').label), '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
|
||||
if not progressbar(Bridge.Language.Locale('lsd.dipping'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -71,11 +62,10 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('lsd.targetPickup'),
|
||||
label = Bridge.Language.Locale('lsd.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('lsd.packup'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.packup'), 4000, 'uncuff') then return end
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
@@ -86,14 +76,14 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('lsd.targetClean'),
|
||||
label = Bridge.Language.Locale('lsd.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cleaningkit')), 'error')
|
||||
if not Bridge.Inventory.HasItem('cleaningkit') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('cleaningkit').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = ps.callback('md-drugs:server:removecleaningkit')
|
||||
if not progressbar(Bridge.Language.Locale('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = Bridge.Callback.Trigger('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
dirtylsd = false
|
||||
end
|
||||
@@ -101,17 +91,17 @@ local function createLabKit(coord, head)
|
||||
canInteract = function() if dirtylsd then return true end end
|
||||
}
|
||||
}
|
||||
ps.entityTarget(labkit, options)
|
||||
Bridge.Target.AddLocalEntity(labkit, options)
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.lysergicacid) do
|
||||
ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('lysergicacid'..k,v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('lsd.targetLys'),
|
||||
label = Bridge.Language.Locale('lsd.targetLys'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealLys'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealLys'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -123,13 +113,13 @@ for k, v in pairs (locations.lysergicacid) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.diethylamide) do
|
||||
ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('diethylamide'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('lsd.targetDie'),
|
||||
label = Bridge.Language.Locale('lsd.targetDie'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealDie'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -141,9 +131,9 @@ for k, v in pairs (locations.diethylamide) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.gettabs) do
|
||||
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('gettabs'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('lsd.targetBuyTab'),
|
||||
label = Bridge.Language.Locale('lsd.targetBuyTab'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper", k)
|
||||
@@ -155,21 +145,22 @@ for k, v in pairs (locations.gettabs) do
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local seller = {}
|
||||
for k, v in pairs (locations.buyLSDkit) do
|
||||
ps.requestModel(v.ped, 1000)
|
||||
requestModel(v.ped, 1000)
|
||||
seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(seller[k], true, v.loc.w)
|
||||
ps.entityTarget(seller[k], {
|
||||
Bridge.Target.AddLocalEntity(seller[k], {
|
||||
{
|
||||
label = ps.lang('lsd.targetBuyKit'),
|
||||
label = Bridge.Language.Locale('lsd.targetBuyKit'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
if ps.hasItem('lsdlabkit') then
|
||||
ps.notify(ps.lang('lsd.alreadyOwn'), 'error')
|
||||
if Bridge.Inventory.HasItem('lsdlabkit') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.alreadyOwn'), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.buyingKit'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.buyingKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:getlabkit', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -180,15 +171,15 @@ for k, v in pairs (locations.buyLSDkit) do
|
||||
})
|
||||
end
|
||||
|
||||
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
|
||||
Bridge.Callback.Register("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
ps.notify(ps.lang('lsd.tableout'), 'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false return end
|
||||
if not ps.progressbar(ps.lang('lsd.placing'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
end
|
||||
|
||||
+16
-13
@@ -1,28 +1,30 @@
|
||||
local locations = ps.callback('md-drugs:server:GetMescalineLocs')
|
||||
local badTrip = 20
|
||||
|
||||
local badTrip = 100
|
||||
|
||||
local function AlienEffect()
|
||||
CreateThread(function()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
Wait(math.random(25000, 35000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local locations = GlobalState.MDDrugsLocations.Mescaline
|
||||
for k, v in pairs (locations.DryOutMescaline) do
|
||||
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0,{
|
||||
{
|
||||
label = ps.lang('mesc.targetDry'),
|
||||
label = Bridge.Language.Locale('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')
|
||||
if not Bridge.Inventory.HasItem('cactusbulb') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('cactusbulb').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -37,10 +39,11 @@ RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
local chance, chance2 = math.random(1,100), math.random(1,100)
|
||||
local weapon = ''
|
||||
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
|
||||
if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
|
||||
if chance <= badTrip then
|
||||
if not progressbar(Bridge.Language.Locale('mescaline.eat'), 4000, 'uncuff') then return end
|
||||
if chance <= badTrip then
|
||||
AlienEffect()
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
Wait(math.random(3000,6000))
|
||||
local clone = ClonePed(PlayerPedId(), true, true, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
GiveWeaponToPed(clone, weapon, 1, false, true)
|
||||
|
||||
+70
-73
@@ -1,37 +1,36 @@
|
||||
local amonia = false
|
||||
local tray = false
|
||||
local heated = false
|
||||
local active = false
|
||||
local trays = nil
|
||||
|
||||
local locations = ps.callback('md-drugs:server:GetMethLocs')
|
||||
local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil
|
||||
local locations = GlobalState.MDDrugsLocations.Meth
|
||||
--- meth heist
|
||||
local startedmeth = false
|
||||
|
||||
local function SpawnMethCarPedChase()
|
||||
|
||||
local function SpawnMethCarPedChase(loc)
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
|
||||
if startedmeth then
|
||||
ps.notify(ps.lang('meth.alreadyChasing'),'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
|
||||
else
|
||||
startedmeth = true
|
||||
ps.callback('md-drugs:server:registerMeth')
|
||||
|
||||
ps.requestModel("journey", 30000)
|
||||
ps.requestModel("a_m_m_hillbilly_02", 30000)
|
||||
ps.requestModel("cargobob3", 30000)
|
||||
|
||||
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
requestModel("journey", 30000)
|
||||
requestModel("a_m_m_hillbilly_02", 30000)
|
||||
requestModel("cargobob3", 30000)
|
||||
methVan = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
|
||||
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||
|
||||
local can = Bridge.Callback.Trigger('md-drugs:server:registerMeth', loc, NetworkGetNetworkIdFromEntity(methVan))
|
||||
if not can then
|
||||
startedmeth = false
|
||||
DeleteVehicle(methVan)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
return
|
||||
end
|
||||
FreezeEntityPosition(methpilot, true)
|
||||
SetEntityInvincible(methpilot, true)
|
||||
SetEntityAsMissionEntity(methcar)
|
||||
AddBlipForEntity(methcar)
|
||||
SetPedIntoVehicle(methdriver, methcar, -1)
|
||||
SetEntityAsMissionEntity(methVan)
|
||||
AddBlipForEntity(methVan)
|
||||
SetPedIntoVehicle(methdriver, methVan, -1)
|
||||
SetPedFleeAttributes(methdriver,false)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methVan, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(methdriver, true)
|
||||
|
||||
repeat
|
||||
@@ -39,25 +38,22 @@ local function SpawnMethCarPedChase()
|
||||
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
|
||||
|
||||
if GetEntityHealth(methdriver) == 0 then
|
||||
ps.entityTarget(methcar, {
|
||||
Bridge.Target.AddLocalEntity(methVan, {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = ps.lang('meth.targetStealFromCar'),
|
||||
label = Bridge.Language.Locale('meth.targetStealFromCar'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients', NetworkGetNetworkIdFromEntity(methVan))
|
||||
startedmeth = false
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end,
|
||||
}
|
||||
})
|
||||
else
|
||||
DeleteVehicle(methcar)
|
||||
DeleteVehicle(methVan)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
@@ -68,14 +64,13 @@ local peds = {}
|
||||
for k, v in pairs (locations.MethHeist) do
|
||||
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
ps.entityTarget(peds[k], {
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
{
|
||||
name = 'methheist'..k,
|
||||
icon = 'fa-solid fa-user-secret',
|
||||
label = ps.lang('meth.targetHeist'),
|
||||
label = Bridge.Language.Locale('meth.targetHeist'),
|
||||
action = function()
|
||||
if startedmeth then ps.notify(ps.lang('meth.alreadyChasing'),'error') return end
|
||||
SpawnMethCarPedChase()
|
||||
if startedmeth then Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error') return end
|
||||
SpawnMethCarPedChase(k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
@@ -94,21 +89,23 @@ local function loadParticle(dict)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
local function dialSuccess(coords)
|
||||
ps.requestModel('hei_prop_heist_thermite', 2000)
|
||||
requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1006.09, -3201.29, -39.30), true, false, false)
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', coords.x - 0.5, coords.y - 0.5, coords.z -0.5, true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
||||
SetEntityVisible(thermite, false)
|
||||
Wait(1000)
|
||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
Wait(math.random(10000, 20000))
|
||||
StopParticleFxLooped(therm, true)
|
||||
DeleteObject(thermite)
|
||||
end
|
||||
|
||||
local function MethCooking(coords, offset, rotation)
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
ps.requestAnim(animDict, 500)
|
||||
Bridge.Anim.RequestDict(animDict)
|
||||
SetEntityCoords(PlayerPedId(), coords)
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
@@ -131,7 +128,7 @@ end
|
||||
local function SmashMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
ps.requestAnim(animDict, 500)
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = coords
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
@@ -166,7 +163,7 @@ end
|
||||
local function BagMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
ps.requestAnim(animDict, 500)
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
SetEntityCoords(ped, coords)
|
||||
@@ -235,13 +232,13 @@ end
|
||||
|
||||
local function startcook(num, coords, offset, rotation)
|
||||
if not amonia then
|
||||
local adding = ps.callback('md-drugs:server:startcook', num)
|
||||
local adding = Bridge.Callback.Trigger('md-drugs:server:startcook', num)
|
||||
if not adding then return end
|
||||
active = true
|
||||
MethCooking(coords, offset, rotation)
|
||||
amonia = true
|
||||
else
|
||||
ps.notify(ps.lang('meth.started'), "error")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.started'), "error")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -252,8 +249,9 @@ local function dials(coords)
|
||||
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
||||
amonia = false
|
||||
active = false
|
||||
return end
|
||||
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
||||
return
|
||||
end
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.increaseHeat'), "success")
|
||||
dialSuccess(coords)
|
||||
heated = true
|
||||
end
|
||||
@@ -267,11 +265,11 @@ local function smash(coords, offset, rotation, buckets, k)
|
||||
Freeze(bucket, true, buckets.w)
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
ps.entityTarget(bucket, {
|
||||
Bridge.Target.AddLocalEntity(bucket, {
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = "fa-solid fa-sack-xmark",
|
||||
label = ps.lang('meth.targetBag'),
|
||||
label = Bridge.Language.Locale('meth.targetBag'),
|
||||
action = function()
|
||||
DeleteObject(bucket)
|
||||
active = false
|
||||
@@ -293,9 +291,9 @@ end
|
||||
local function trayscarry()
|
||||
if amonia and heated then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
Bridge.Anim.RequestDict('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
ps.requestModel('bkr_prop_meth_tray_02a')
|
||||
requestModel('bkr_prop_meth_tray_02a')
|
||||
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
tray = true
|
||||
@@ -311,9 +309,9 @@ CreateThread(function()
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.CookMeth) do
|
||||
ps.boxTarget('cookMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
Bridge.Target.AddBoxZone('cookMeth'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('meth.targetCook'),
|
||||
label = Bridge.Language.Locale('meth.targetCook'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
@@ -327,7 +325,7 @@ for k, v in pairs (locations.CookMeth) do
|
||||
},
|
||||
{
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = ps.lang('meth.targetGrabTray'),
|
||||
label = Bridge.Language.Locale('meth.targetGrabTray'),
|
||||
action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
@@ -340,28 +338,28 @@ for k, v in pairs (locations.CookMeth) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethDials) do
|
||||
ps.boxTarget('adjustMethDials'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
Bridge.Target.AddBoxZone('adjustMethDials'..k, v.loc, vector3(v.l, v.w, 1.0), v.loc.w or 180.0, {
|
||||
{
|
||||
name = 'adjustdials',
|
||||
icon = "fa-solid fa-temperature-three-quarters",
|
||||
label = ps.lang('meth.targetHeat'),
|
||||
label = Bridge.Language.Locale('meth.targetHeat'),
|
||||
action = function()
|
||||
dials(locations.CookMeth[k].loc)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if amonia and heated == false then return true end
|
||||
end
|
||||
--canInteract = function()
|
||||
-- if not handleGang(v.gang) then return false end
|
||||
-- if amonia and heated == false then return true end
|
||||
--end
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethSmash) do
|
||||
ps.boxTarget('smashMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
Bridge.Target.AddBoxZone('smashMeth'..k, v.loc, vector3(v.l, v.w, 1.0), v.loc.w or 180.0, {
|
||||
{
|
||||
name = 'smash',
|
||||
icon = "fa-solid fa-weight-scale",
|
||||
label = ps.lang('meth.targetSmash'),
|
||||
label = Bridge.Language.Locale('meth.targetSmash'),
|
||||
action = function()
|
||||
smash(v.loc, v.offset, v.rotation, v.bucket,k)
|
||||
end,
|
||||
@@ -374,10 +372,10 @@ for k, v in pairs (locations.MethSmash) do
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethTele) do
|
||||
ps.boxTarget('meth_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('meth_tele'..k, v.inside, vector3(v.l, v.w, 1.0), v.rot, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('coke.teleOut'),
|
||||
label = Bridge.Language.Locale('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
@@ -386,10 +384,10 @@ for k, v in pairs (locations.MethTele) do
|
||||
end
|
||||
}
|
||||
})
|
||||
ps.boxTarget('meth_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
Bridge.Target.AddBoxZone('meth_teleout'..k, v.outside, vector3(v.l, v.w, 1.0), v.rot, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('coke.teleIn'),
|
||||
label = Bridge.Language.Locale('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
@@ -408,12 +406,12 @@ RegisterCommand('offset', function()
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.MethEph) do
|
||||
ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
Bridge.Target.AddBoxZone('stealMethEph'..k, v.loc, vector3(v.l, v.w, 1.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('meth.targetStealEPH'),
|
||||
label = Bridge.Language.Locale('meth.targetStealEPH'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('meth.stealingEPH'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingEPH'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -423,12 +421,12 @@ for k, v in pairs (locations.MethEph) do
|
||||
})
|
||||
end
|
||||
for k, v in pairs (locations.MethAce) do
|
||||
ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
Bridge.Target.AddBoxZone('stealMethAce'..k, v.loc, vector3(v.l, v.w, 1.0), v.loc.w or 180.0, {
|
||||
{
|
||||
label = ps.lang('meth.targetStealACE'),
|
||||
label = Bridge.Language.Locale('meth.targetStealACE'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('meth.stealingACE'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingACE'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -437,5 +435,4 @@ for k, v in pairs (locations.MethAce) do
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
+8
-8
@@ -6,7 +6,7 @@ local pdAlert = 90
|
||||
local function getRoute()
|
||||
local Route = ps.callback('md-drugs:server:getRoute')
|
||||
if not Route then
|
||||
ps.notify(ps.lang('oxy.ditchCar'), "error")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.ditchCar'), "error")
|
||||
onMission = false
|
||||
return false
|
||||
end
|
||||
@@ -25,11 +25,11 @@ local function getRoute()
|
||||
PoliceCall(pdAlert)
|
||||
ps.entityTarget(oxybuyer,{
|
||||
{
|
||||
label = ps.lang('oxy.targetHandoff'),
|
||||
label = Bridge.Language.Locale('oxy.targetHandoff'),
|
||||
icon = "fa-solid fa-dollar-sign",
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not ps.progressbar(ps.lang('oxy.handingoff'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('oxy.handingoff'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
@@ -37,7 +37,7 @@ local function getRoute()
|
||||
carryPackage = nil
|
||||
getRoute()
|
||||
else
|
||||
ps.notify(ps.lang('oxy.emptyHands'), "error")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.emptyHands'), "error")
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -48,7 +48,7 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-truck-fast',
|
||||
label = ps.lang('oxy.targetPay'),
|
||||
label = Bridge.Language.Locale('oxy.targetPay'),
|
||||
action = function()
|
||||
ps.requestModel("burrito3", 30000)
|
||||
|
||||
@@ -62,17 +62,17 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
end
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
|
||||
ps.notify(ps.lang('oxy.keys'), 'success')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.keys'), 'success')
|
||||
onMission = true
|
||||
getRoute()
|
||||
|
||||
ps.entityTarget(oxycar, {
|
||||
{
|
||||
icon = "fa-solid fa-box",
|
||||
label = ps.lang('oxy.targetGetPackage'),
|
||||
label = Bridge.Language.Locale('oxy.targetGetPackage'),
|
||||
action = function()
|
||||
if carryPackage then
|
||||
ps.notify(ps.lang('oxy.alreadyCarrying'), "error")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.alreadyCarrying'), "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
|
||||
+13
-9
@@ -1,18 +1,22 @@
|
||||
local locations = ps.callback('md-drugs:server:GetPharmaLocs')
|
||||
|
||||
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
|
||||
if ps.getJobType() ~= 'ems' then return end
|
||||
local input = ps.input(ps.lang('pharma.input.header'), {
|
||||
{type = 'select', title = ps.lang('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = ps.lang('pharma.input.title2'), options = op}
|
||||
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function(data, op)
|
||||
local job = ps.getPlayerData().job.name
|
||||
if job ~= 'ambulance' then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('pharma.notPharma'), 'error')
|
||||
return
|
||||
end
|
||||
local input = ps.input(Bridge.Language.Locale('pharma.input.header'), {
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title2'), options = op}
|
||||
})
|
||||
if not input[1] then return end
|
||||
if not ps.progressbar(ps.lang('pharma.write'), 4000, 'notepad') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.write'), 4000, 'notepad') then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
|
||||
ps.registerCallback("md-drugs:client:unbottle", function()
|
||||
if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.opening'), 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
@@ -21,9 +25,9 @@ for k, v in pairs (locations.FillPrescription) do
|
||||
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-capsules',
|
||||
label = ps.lang('pharma.targetFill'),
|
||||
label = Bridge.Language.Locale('pharma.targetFill'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.fill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", k)
|
||||
end,
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,41 +1,41 @@
|
||||
|
||||
local DrugPlants = {
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = ps.lang('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = Bridge.Language.Locale('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('coke.picking'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('coke.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.cocaine,
|
||||
},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = Bridge.Language.Locale('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('heroin.picking'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('heroin.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.heroin,
|
||||
},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = Bridge.Language.Locale('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('mesc.picking'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('mesc.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.mescaline,
|
||||
|
||||
},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = ps.lang('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = Bridge.Language.Locale('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('weed.picking'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('weed.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.weed,
|
||||
},
|
||||
{model = 'mushroom', label = 'shrooms', langs = ps.lang('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
{model = 'mushroom', label = 'shrooms', langs = Bridge.Language.Locale('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('shrooms.picking'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('shrooms.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ local function EcstasyEffect()
|
||||
end
|
||||
|
||||
ps.registerCallback("md-drugs:client:shrooms", function()
|
||||
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('shrooms.eat'), 5000, 'eat') then return end
|
||||
CreateThread(function()
|
||||
EcstasyEffect()
|
||||
end)
|
||||
|
||||
+12
-12
@@ -4,10 +4,10 @@ for k, v in pairs (locations.WeedDry) do
|
||||
ps.boxTarget('weed_dry'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-cannabis',
|
||||
label = ps.lang('weed.targetDry'),
|
||||
label = Bridge.Language.Locale('weed.targetDry'),
|
||||
action = function()
|
||||
if not ps.hasItem('wetcannabis', 1) then
|
||||
ps.notify(ps.lang('weed.noDry'), "error")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.noDry'), "error")
|
||||
return
|
||||
end
|
||||
if drying then return end
|
||||
@@ -15,13 +15,13 @@ for k, v in pairs (locations.WeedDry) do
|
||||
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
|
||||
drying = true
|
||||
FreezeEntityPosition(weedplant, true)
|
||||
ps.notify(ps.lang('weed.wait'), "success")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.wait'), "success")
|
||||
Wait(math.random(1000,5000))
|
||||
ps.notify(ps.lang('weed.take'), "success")
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.take'), "success")
|
||||
ps.entityTarget(weedplant, {
|
||||
{
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetDryed'),
|
||||
label = Bridge.Language.Locale('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
@@ -42,7 +42,7 @@ for k, v in pairs (locations.WeedTele) do
|
||||
ps.boxTarget('weed_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('weed.teleportOut'),
|
||||
label = Bridge.Language.Locale('weed.teleportOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end
|
||||
@@ -51,7 +51,7 @@ for k, v in pairs (locations.WeedTele) do
|
||||
ps.boxTarget('weed_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('weed.teleportIn'),
|
||||
label = Bridge.Language.Locale('weed.teleportIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end
|
||||
@@ -83,7 +83,7 @@ local function AlienEffect()
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
@@ -110,11 +110,11 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", ps.lang('weed.bluntWrap'), 'bluntwrap')
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", Bridge.Language.Locale('weed.bluntWrap'), 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", ps.lang('weed.blunts'), 'blunts')
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", Bridge.Language.Locale('weed.blunts'), 'blunts')
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.WeedSalesman) do
|
||||
@@ -126,7 +126,7 @@ for k, v in pairs (locations.WeedSalesman) do
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetSales'),
|
||||
label = Bridge.Language.Locale('weed.targetSales'),
|
||||
action = function()
|
||||
local itemList = ps.callback('md-drugs:server:getWeedItems')
|
||||
local options = {}
|
||||
@@ -140,7 +140,7 @@ for k, v in pairs (locations.WeedSalesman) do
|
||||
{type = 'number', title = 'How Many To Buy', min = 1, max = 1000}
|
||||
})
|
||||
if not input and input[1] then return end
|
||||
if not ps.progressbar(ps.lang('weed.buying', ps.getLabel(m)), 2000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('weed.buying', ps.getLabel(m)), 2000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
|
||||
end
|
||||
}
|
||||
|
||||
+26
-26
@@ -45,32 +45,32 @@ local function spawnShops()
|
||||
FreezeEntityPosition(ped, true)
|
||||
SetEntityInvincible(ped, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
label = ps.lang('Whippit.targetShop'),
|
||||
icon = 'fa-solid fa-cart-shopping',
|
||||
action = function()
|
||||
local menu = {}
|
||||
local items = ps.callback('md-drugs:server:getwhippitShop')
|
||||
for item, price in pairs (items) do
|
||||
menu[#menu + 1] = {
|
||||
title = ps.getLabel(item),
|
||||
icon = ps.getImage(item),
|
||||
description = '$' .. price,
|
||||
action = function()
|
||||
local amount = ps.input(ps.getLabel(item), {
|
||||
{type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
|
||||
})
|
||||
if amount and amount[1] then
|
||||
TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
ps.menu(ps.lang('Whippit.shopHeader'), ps.lang('Whippit.shopHeader'), menu)
|
||||
end
|
||||
},
|
||||
})
|
||||
--ps.entityTarget(ped, {
|
||||
-- {
|
||||
-- label = Bridge.Language.Locale('Whippit.targetShop'),
|
||||
-- icon = 'fa-solid fa-cart-shopping',
|
||||
-- action = function()
|
||||
-- local menu = {}
|
||||
-- local items = ps.callback('md-drugs:server:getwhippitShop')
|
||||
-- for item, price in pairs (items) do
|
||||
-- menu[#menu + 1] = {
|
||||
-- title = ps.getLabel(item),
|
||||
-- icon = ps.getImage(item),
|
||||
-- description = '$' .. price,
|
||||
-- action = function()
|
||||
-- local amount = ps.input(ps.getLabel(item), {
|
||||
-- {type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
|
||||
-- })
|
||||
-- if amount and amount[1] then
|
||||
-- TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
|
||||
-- end
|
||||
-- end
|
||||
-- }
|
||||
-- end
|
||||
-- ps.menu(Bridge.Language.Locale('Whippit.shopHeader'), Bridge.Language.Locale('Whippit.shopHeader'), menu)
|
||||
-- end
|
||||
-- },
|
||||
--})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ function SetUpPeds(drugCount)
|
||||
elseif drugCount > settings.WholesaleAmbushTier1 then
|
||||
tierName = "Medium"
|
||||
end
|
||||
ps.notify(string.format(ps.lang('wholesale.ambush'), attackerCount, tierName), 'error')
|
||||
Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.ambush'), attackerCount, tierName), 'error')
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
@@ -86,13 +86,13 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
local maxPayout = math.floor(drug.price.max * (1 + potentialBonus))
|
||||
local totalMinPayout = drug.count * minPayout
|
||||
local totalMaxPayout = drug.count * maxPayout
|
||||
ps.notify(string.format(ps.lang('wholesale.count'), drug.count), 'info')
|
||||
Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.count'), drug.count), 'info')
|
||||
if bonusPercent > 0 then
|
||||
ps.notify(string.format(ps.lang('wholesale.bonus'), bonusPercent), 'info')
|
||||
Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.bonus'), bonusPercent), 'info')
|
||||
end
|
||||
ps.notify(string.format(ps.lang('wholesale.estimate'), totalMinPayout, totalMaxPayout), 'info')
|
||||
Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.estimate'), totalMinPayout, totalMaxPayout), 'info')
|
||||
elseif drug.count <= 0 then
|
||||
ps.notify(ps.lang('wholesale.no_drugs'), 'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.no_drugs'), 'error')
|
||||
end
|
||||
ps.requestModel("g_m_y_famdnf_01", settings.RequestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
@@ -100,12 +100,12 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
ps.entityTarget(drugdealer, {{
|
||||
label = ps.lang('wholesale.targetBuyer'),
|
||||
label = Bridge.Language.Locale('wholesale.targetBuyer'),
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck <= settings.SuccessfulChance then
|
||||
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('wholesale.wholesaling'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
else
|
||||
ps.progressbar("Deal Going Bad", 4000, 'uncuff')
|
||||
@@ -133,7 +133,7 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if timer <= settings.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.tooLong'), 'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.tooLong'), 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
TriggerServerEvent('md-drugs:server:CleanupWholesale')
|
||||
if settings.WholesaleResetOnTimeout then
|
||||
@@ -148,5 +148,5 @@ RegisterNetEvent('md-drugs:client:WholesaleComplete', function(data)
|
||||
if data.bonus > 0 then
|
||||
bonusText = " (+" .. data.bonus .. "% quantity bonus)"
|
||||
end
|
||||
ps.notify(string.format(ps.lang('wholesale.complete'), data.quantity, data.payout, bonusText), 'success')
|
||||
Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('wholesale.complete'), data.quantity, data.payout, bonusText), 'success')
|
||||
end)
|
||||
+24
-24
@@ -9,19 +9,19 @@ end
|
||||
|
||||
ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
if xtcpress then
|
||||
ps.notify(ps.lang('xtc.alreadyOut'), 'error')
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.alreadyOut'), 'error')
|
||||
return
|
||||
end
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
if not ps.progressbar(ps.lang('xtc.settingDown'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.settingDown'), 4000, 'uncuff') then return end
|
||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
Freeze(press, true, head)
|
||||
local options = {
|
||||
{
|
||||
icon = "fas fa-eye",
|
||||
label = ps.lang('xtc.targetMake'),
|
||||
label = Bridge.Language.Locale('xtc.targetMake'),
|
||||
distance = 2.0,
|
||||
action = function()
|
||||
local options = {}
|
||||
@@ -32,8 +32,8 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
title = ps.getLabel(k),
|
||||
description = descript,
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.making', ps.getLabel(k)), 4000, 'uncuff') then return end
|
||||
if not minigame() then Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.making', ps.getLabel(k)), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makextc", k)
|
||||
end,
|
||||
distance = 2.0
|
||||
@@ -47,9 +47,9 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
},
|
||||
{
|
||||
icon = "fas fa-eye",
|
||||
label = ps.lang('xtc.targetPickup'),
|
||||
label = Bridge.Language.Locale('xtc.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.picking'), 5000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.picking'), 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback")
|
||||
@@ -67,10 +67,10 @@ for k, v in pairs(locations.mdp2p) do
|
||||
ps.boxTarget('mdp2p'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStealMDP2P'),
|
||||
label = Bridge.Language.Locale('xtc.targetStealMDP2P'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingMDP2P'), 4000, 'uncuff') then return end
|
||||
if not minigame() then Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.stealingMDP2P'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -83,10 +83,10 @@ for k, v in pairs(locations.isosafrole) do
|
||||
ps.boxTarget('isosafrole'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStealIsosafrole'),
|
||||
label = Bridge.Language.Locale('xtc.targetStealIsosafrole'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingIsosafrole'), 4000, 'uncuff') then return end
|
||||
if not minigame() then Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.stealingIsosafrole'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -100,10 +100,10 @@ for k, v in pairs(locations.rawxtcloc) do
|
||||
ps.boxTarget('xtcraw'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetRaw'),
|
||||
label = Bridge.Language.Locale('xtc.targetRaw'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.makingRaw'), 4000, 'uncuff') then return end
|
||||
if not minigame() then Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.makingRaw'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -120,7 +120,7 @@ for k, v in pairs(locations.xtcpress) do
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.getPress'),
|
||||
label = Bridge.Language.Locale('xtc.getPress'),
|
||||
action = function()
|
||||
local options = {}
|
||||
local recipeList = ps.callback('md-drugs:server:getpressrecipes')
|
||||
@@ -129,10 +129,10 @@ for k, v in pairs(locations.xtcpress) do
|
||||
options[#options + 1] = {
|
||||
icon = ps.getImage(m),
|
||||
title = ps.getLabel(m),
|
||||
description = ps.lang('xtc.buySingle', d.cash),
|
||||
description = Bridge.Language.Locale('xtc.buySingle', d.cash),
|
||||
type = d.type,
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buypress',k, m)
|
||||
end,
|
||||
}
|
||||
@@ -144,7 +144,7 @@ for k, v in pairs(locations.xtcpress) do
|
||||
description = descript,
|
||||
type = d.type,
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:upgradepress", k, m)
|
||||
end,
|
||||
distance = 2.0
|
||||
@@ -163,7 +163,7 @@ for k, v in pairs (locations.stamp) do
|
||||
ps.boxTarget('xtcstamp'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStamp'),
|
||||
label = Bridge.Language.Locale('xtc.targetStamp'),
|
||||
action = function()
|
||||
local item = {
|
||||
{item = 'white_xtc', label = ps.getLabel('white_xtc'), color = 'white'},
|
||||
@@ -176,10 +176,10 @@ for k, v in pairs (locations.stamp) do
|
||||
options[#options + 1] = {
|
||||
icon = ps.getImage(d.item),
|
||||
title = d.label,
|
||||
description = ps.lang('xtc.stamp_desc', d.color),
|
||||
description = Bridge.Language.Locale('xtc.stamp_desc', d.color),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stamping', d.label), 4000, 'uncuff') then return end
|
||||
if not minigame() then Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('xtc.stamping', d.label), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamp", k, d.color)
|
||||
end,
|
||||
distance = 2.0
|
||||
|
||||
Reference in new issue
Block a user