finished locales EN
This commit is contained in:
1 parent
37f86bf50d
commit
683eaff7de
46 files changed
+965
-1049
No files matched your search
@@ -0,0 +1,27 @@
|
||||
|
||||
local function spawn()
|
||||
local location, menus = ps.callback('md-drugs:server:GetMerchant')
|
||||
local model = 's_m_m_trucker_01'
|
||||
ps.requestModel(model)
|
||||
local ped = CreatePed(4, model, location.x, location.y, location.z, location.w, false, true)
|
||||
Freeze(ped, true, location.w)
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
label = ps.lang('merchant.targetOpen'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (menus) do
|
||||
options[#options+1] = {
|
||||
title = ps.getLabel(k),
|
||||
description = '$'..v,
|
||||
action = function()
|
||||
ps.triggerServerEvent('md-drugs:server:purchaseGoods', k)
|
||||
end
|
||||
}
|
||||
end
|
||||
ps.menu('Travelling Merchant', 'Travelling Merchant', options)
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
spawn()
|
||||
@@ -86,26 +86,4 @@ function AlienEffect()
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
+15
-9
@@ -114,14 +114,14 @@ 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('.targets.coke.pick'),
|
||||
label = ps.lang('coke.makePow'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('coca_leaf') then
|
||||
ps.notify('You Need A Coke Leaf')
|
||||
ps.notify(ps.lang('coke.noleaf'), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('Coke.makepow'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -134,7 +134,7 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.coke.cut'),
|
||||
label = ps.lang('coke.targetCutCoke'),
|
||||
icon = 'fa-solid fa-mortar-pestle',
|
||||
action = function()
|
||||
CutCoke(v.loc, v.offset, v.rotation)
|
||||
@@ -151,7 +151,7 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.coke.bag'),
|
||||
label = ps.lang('coke.targetBagCoke'),
|
||||
icon = 'fa-solid fa-sack-xmark',
|
||||
action = function()
|
||||
BagCoke(v.loc, v.offset, v.rotation)
|
||||
@@ -169,19 +169,25 @@ for k, v in pairs (locations.cokeTele) do
|
||||
ps.boxTarget('coke_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('targets.coke.telein'),
|
||||
label = ps.lang('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
ps.boxTarget('coke_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('targets.coke.teleout'),
|
||||
label = ps.lang('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
|
||||
for k, v in pairs (status) do
|
||||
if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
|
||||
for k, v in pairs (status) do
|
||||
if k == 'health' then
|
||||
local cur = GetEntityHealth(PlayerPedId())
|
||||
SetEntityHealth(PlayerPedId(), cur + v)
|
||||
@@ -56,7 +56,5 @@ RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
else
|
||||
|
||||
end
|
||||
end)
|
||||
@@ -10,7 +10,7 @@ end
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
-- PoliceCall(20)
|
||||
if ps.vehicleData() then
|
||||
ps.notify(ps.lang('Cornerselling.inveh', 'error'))
|
||||
ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
@@ -47,7 +47,7 @@ local function findPed()
|
||||
|
||||
buyers[targ] = true
|
||||
|
||||
ps.drawText('Waiting For Customer')
|
||||
ps.drawText(ps.lang('Cornerselling.wait'))
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
@@ -89,7 +89,7 @@ local function Cornersell()
|
||||
return
|
||||
end
|
||||
|
||||
ps.drawText('Searching For Nearby Customers')
|
||||
ps.drawText(ps.lang('Cornerselling.searching'))
|
||||
|
||||
local targ = findPed()
|
||||
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
|
||||
@@ -105,7 +105,7 @@ local function Cornersell()
|
||||
local got = false
|
||||
ps.entityTarget(targ, {
|
||||
{
|
||||
label = "Take Back Drugs",
|
||||
label = ps.lang('Cornerselling.targetTakeBack'),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
got = true
|
||||
@@ -124,7 +124,7 @@ local function Cornersell()
|
||||
FreezeEntityPosition(targ, true)
|
||||
ps.entityTarget(data.ped, {
|
||||
{
|
||||
label = string.format(ps.lang('targets.CornerSell.sell', data.amount, ps.getLabel(data.item), data.price)),
|
||||
label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
sellDrug(data.item, data.amount, data.price, targ)
|
||||
@@ -137,7 +137,7 @@ local function Cornersell()
|
||||
end,
|
||||
},
|
||||
{
|
||||
label = ps.lang('targets.CornerSell.deny'),
|
||||
label = ps.lang('Cornerselling.targetDeny'),
|
||||
icon = "fa-solid fa-person-harassing",
|
||||
action = function()
|
||||
deny(targ)
|
||||
@@ -161,14 +161,14 @@ RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
ps.notify(ps.lang('Cornerselling.stopped', 'error'))
|
||||
else
|
||||
sell = true
|
||||
ps.notify(ps.lang('Cornerselling.started', 'success'))
|
||||
ps.notify(ps.lang('Cornerselling.start', 'success'))
|
||||
Cornersell()
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs (QBConfig.NoSellZones) do
|
||||
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
|
||||
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)
|
||||
+4
-4
@@ -2,12 +2,12 @@ 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('targets.crack.makecrack'),
|
||||
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.progressbar(ps.lang('Crack.makecrack'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('crack.cook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makecrack", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -21,11 +21,11 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.crack.bagcrack'),
|
||||
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.progressbar(ps.lang('Crack.bagcrack'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
|
||||
+38
-23
@@ -1,33 +1,48 @@
|
||||
local isActive = false
|
||||
local dealer = {}
|
||||
|
||||
RegisterNetEvent('md-drugs:client:opendealermenu', function()
|
||||
local rep = GetRep()
|
||||
makeMenu('dealermenu', rep)
|
||||
lib.showContext('dealermenu')
|
||||
end)
|
||||
|
||||
local function SpawnDealer()
|
||||
local getDealers = ps.callback('md-drugs:server:getDealers')
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
lib.requestModel(Ped, Config.RequestModelTime)
|
||||
ps.requestModel(Ped, Config.RequestModelTime)
|
||||
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)
|
||||
AddMultiModel(dealer[k], {
|
||||
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
|
||||
action = function()
|
||||
local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
|
||||
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
|
||||
}}, dealer[k])
|
||||
ps.entityTarget(dealer[k], {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetGetDel'),
|
||||
action = function()
|
||||
local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-store",
|
||||
label = ps.lang('Deliveries.targetOpenShop'),
|
||||
action = function()
|
||||
local rep = GetRep()
|
||||
local items = ps.callback('md-drugs:server:dealerList')
|
||||
local options = {}
|
||||
for m, d in pairs (items) do
|
||||
if rep.dealerrep >= d.minrep then
|
||||
options[#options+1] = {
|
||||
title = ps.getLabel(d.name),
|
||||
description = '$' .. d.price,
|
||||
icon = ps.getImage(d.name),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
ps.menu(ps.lang('Deliveries.shopHeader'), ps.lang('Deliveries.shopHeader'), options)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,11 +61,11 @@ 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)
|
||||
AddSingleModel(Buyer, {
|
||||
ps.entityTarget(Buyer, {
|
||||
icon = 'fas fa-user-secret',
|
||||
label = Lang.targets.Delivery.hand,
|
||||
label = ps.lang('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
|
||||
if not progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
|
||||
+27
-125
@@ -13,50 +13,24 @@ function loadParticle(dict)
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
function minigame()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
if minigametype == 'ps_circle' then
|
||||
local check
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
check = success
|
||||
end, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||
local check = exports['ps-ui']:Circle(false, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||
return check
|
||||
elseif minigametype == 'ps_maze' then
|
||||
local check
|
||||
exports['ps-ui']:Maze(function(success)
|
||||
check = success
|
||||
end, game['ps_maze'].timelimit)
|
||||
repeat Wait(10) until check ~= nil
|
||||
local check = exports['ps-ui']:Maze(false, game['ps_maze'].timelimit)
|
||||
return check
|
||||
elseif minigametype == 'ps_scrambler' then
|
||||
local check
|
||||
exports['ps-ui']:Scrambler(function(success)
|
||||
check = success
|
||||
end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
|
||||
repeat Wait(10) until check ~= nil
|
||||
local check = exports['ps-ui']:Scrambler(false, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
|
||||
return check
|
||||
elseif minigametype == 'ps_var' then
|
||||
local check
|
||||
exports['ps-ui']:VarHack(function(success)
|
||||
check = success
|
||||
end, game['ps_var'].numBlocks, game['ps_var'].time)
|
||||
repeat Wait(10) until check ~= nil
|
||||
local check = exports['ps-ui']:VarHack(false, game['ps_var'].numBlocks, game['ps_var'].time)
|
||||
return check
|
||||
elseif minigametype == 'ps_thermite' then
|
||||
local check
|
||||
exports['ps-ui']:Thermite(function(success)
|
||||
check = success
|
||||
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
|
||||
repeat Wait(10) until check ~= nil
|
||||
return check
|
||||
local check = exports['ps-ui']:Thermite(false, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
|
||||
return check
|
||||
elseif minigametype == 'ox' then
|
||||
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
|
||||
return success
|
||||
@@ -129,63 +103,6 @@ function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function makeMenu(name, rep)
|
||||
local menu = {}
|
||||
local data = ps.callback('md-drugs:server:menu', name)
|
||||
for k, v in pairs (data.table) do
|
||||
local allow = false
|
||||
if rep == nil then
|
||||
allow = true
|
||||
else
|
||||
if rep.dealerrep >= v.minrep then allow = true end
|
||||
end
|
||||
if allow then
|
||||
menu[#menu + 1] = {
|
||||
icon = GetImage(v.name),
|
||||
description = '$'.. v.price,
|
||||
title = GetLabel(v.name),
|
||||
onSelect = function()
|
||||
local settext = "Cost: $"..v.price
|
||||
local dialog = exports.ox_lib:inputDialog(v.name .."!", {
|
||||
{ type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
|
||||
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
|
||||
})
|
||||
if not dialog[1] then return end
|
||||
TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
sorter(menu, 'title')
|
||||
lib.registerContext({id = data.id, title = data.title, options = menu})
|
||||
end
|
||||
|
||||
|
||||
function Email(sender, subject, message)
|
||||
if Config.Phone == 'yflip' then
|
||||
local receiver = GetPlayerServerId(PlayerId())
|
||||
local insertId, received = exports["yflip-phone"]:SendMail({
|
||||
title = subject,
|
||||
sender = sender,
|
||||
senderDisplayName = sender,
|
||||
content = message,
|
||||
}, 'phoneNumber', receiver)
|
||||
elseif Config.Phone == 'qs' then
|
||||
TriggerServerEvent('qs-smartphone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
button = {}
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
@@ -242,28 +159,18 @@ function Freeze(entity, toggle, head)
|
||||
SetBlockingOfNonTemporaryEvents(entity, toggle)
|
||||
end
|
||||
|
||||
function tele(coords)
|
||||
DoScreenFadeOut(500)
|
||||
Wait(1000)
|
||||
SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
|
||||
Wait(1000)
|
||||
DoScreenFadeIn(500)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local created = false
|
||||
local heading = 180.0
|
||||
function StartRay()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
lib.requestModel('v_ret_ml_tablea', 30000)
|
||||
ps.requestModel('v_ret_ml_tablea', 30000)
|
||||
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
ps.drawText([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
@@ -280,7 +187,7 @@ function StartRay()
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
ps.hideText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
@@ -288,7 +195,7 @@ function StartRay()
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
ps.hideText()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
@@ -301,13 +208,13 @@ end
|
||||
function StartRay2()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
lib.requestModel('bkr_prop_coke_press_01aa', 30000)
|
||||
ps.requestModel('bkr_prop_coke_press_01aa', 30000)
|
||||
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
ps.drawText([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
@@ -324,7 +231,7 @@ function StartRay2()
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
ps.hideText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
@@ -332,7 +239,7 @@ function StartRay2()
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
ps.hideText()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
@@ -343,10 +250,10 @@ function StartRay2()
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
LoadModel('prop_plant_01b')
|
||||
LoadModel('prop_plant_01a')
|
||||
LoadModel('prop_cactus_03')
|
||||
LoadModel('prop_weed_01')
|
||||
ps.requestModel('prop_plant_01b')
|
||||
ps.requestModel('prop_plant_01a')
|
||||
ps.requestModel('prop_cactus_03')
|
||||
ps.requestModel('prop_weed_01')
|
||||
TriggerEvent('weed:init')
|
||||
TriggerEvent('heroin:init')
|
||||
TriggerEvent('coke:init')
|
||||
@@ -363,18 +270,13 @@ end)
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = ps.callback('md-drugs:server:GetRep', false)
|
||||
lib.registerContext({
|
||||
id = 'DrugRep',
|
||||
title = 'Drug Reputation',
|
||||
options = {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
}
|
||||
})
|
||||
lib.showContext('DrugRep')
|
||||
ps.menu('Drug Rep', 'Drug Rep', {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
})
|
||||
end, false)
|
||||
|
||||
function handleGang(gang)
|
||||
|
||||
+19
-20
@@ -9,19 +9,18 @@ local function createLabKit(coord, head)
|
||||
ps.entityTarget(heroinlabkit, {
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('Heroin.cook'),
|
||||
label = ps.lang('heroin.targetCook'),
|
||||
action = function()
|
||||
if not ps.hasItem('emptyvial') then return end
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
ps.requestPTFX("core")
|
||||
lib.requestNamedPtfxAsset("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)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
return end
|
||||
if not ps.progressbar(ps.lang('Heroin.success'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbCook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -30,9 +29,9 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('Heroin.up'),
|
||||
label = ps.lang('heroin.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Heroin.pickup'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbPickup'), 4000, 'uncuff') then return end
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
@@ -43,12 +42,11 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:cleanheroinlabkit",
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('Heroin.clean'),
|
||||
label = ps.lang('heroin.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then return end
|
||||
if not ps.progressbar(ps.lang('Heroin.clean'), 4000, 'clean') then 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
|
||||
end,
|
||||
@@ -62,10 +60,10 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.heroin.dry'),
|
||||
label = ps.lang('heroin.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Heroin.dryout'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbDry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -78,11 +76,11 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.heroin.cut'),
|
||||
label = ps.lang('heroin.targetCutHeroin'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then return end
|
||||
if not ps.progressbar(ps.lang('Heroin.cutting'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -100,15 +98,16 @@ for k, v in pairs (locations.buyKit) do
|
||||
SetEntityInvincible(peds[k], true)
|
||||
ps.entityTarget(peds[k], {
|
||||
{
|
||||
label = ps.lang('targets.heroin.buykit'),
|
||||
label = ps.lang('heroin.targetBuyKit'),
|
||||
icon = 'fa-solid fa-box-open',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Heroin.secret'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbBuyKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return true
|
||||
end
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
@@ -116,13 +115,13 @@ end
|
||||
|
||||
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
ps.notify(ps.lang('Heroin.tableout'), 'error')
|
||||
ps.notify(ps.lang('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.table'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(location, head)
|
||||
return true, location
|
||||
end
|
||||
@@ -131,11 +130,11 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.heroin.fill'),
|
||||
label = ps.lang('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.needles'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbFill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
|
||||
+6
-2
@@ -38,7 +38,7 @@ local function SpawnCarPedChase()
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = Lang.targets.lean.st,
|
||||
label = ps.lang('lean.stealFromTruck'),
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
@@ -68,10 +68,14 @@ for k, v in pairs (location.SyrupVendor) do
|
||||
ps.entityTarget(leanPeds[k], {
|
||||
{
|
||||
icon = "fa-solid fa-hand-holding-medical",
|
||||
label = ps.lang('Lean.buylean'),
|
||||
label = ps.lang('lean.startMission'),
|
||||
action = function()
|
||||
SpawnCarPedChase()
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
},
|
||||
})
|
||||
end
|
||||
+21
-30
@@ -11,16 +11,9 @@ local function createLabKit(coord, head)
|
||||
local options = {
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('targets.lsd.heat'),
|
||||
label = ps.lang('lsd.targetHeat'),
|
||||
action = function()
|
||||
local dict = "scr_ie_svm_technical2"
|
||||
if not ps.hasItems({
|
||||
lysergic_acid = 1,
|
||||
diethylamide = 1
|
||||
}) then
|
||||
ps.notify(ps.lang('lsd.need'), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then
|
||||
dirtylsd = true
|
||||
loadParticle(dict)
|
||||
@@ -28,7 +21,7 @@ local function createLabKit(coord, head)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.heating'), 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -37,11 +30,11 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('targets.lsd.refine'),
|
||||
label = ps.lang('lsd.targetRefine'),
|
||||
action = function()
|
||||
if not ps.hasItem('lsd_one_vial') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not ps.progressbar(ps.lang('lsd.refine'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.refining'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -50,11 +43,11 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-regular fa-note-sticky",
|
||||
label = ps.lang('targets.lsd.dab'),
|
||||
label = ps.lang('lsd.targetDipping'),
|
||||
action = function()
|
||||
if not ps.hasItem('tab_paper') then return end
|
||||
if not ps.hasItem('tab_paper') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not ps.progressbar(ps.lang('lsd.dip'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.dipping'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -64,9 +57,9 @@ local function createLabKit(coord, head)
|
||||
{
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('targets.lsd.back'),
|
||||
label = ps.lang('lsd.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.packup'), 4000, 'uncuff') then return end
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
@@ -77,13 +70,13 @@ local function createLabKit(coord, head)
|
||||
},
|
||||
{
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('targets.lsd.clean'),
|
||||
label = ps.lang('lsd.targetClean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('lsd.needclean'), 'error')
|
||||
ps.notify(ps.lang('lsd.needCleaning'), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.clean'), 4000, 'clean') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = ps.callback('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
dirtylsd = false
|
||||
@@ -98,12 +91,11 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.lsd.lys'),
|
||||
label = ps.lang('lsd.targetLys'),
|
||||
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:faillysergic") return end
|
||||
if not ps.progressbar(ps.lang('lsd.steallys'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealLys'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -117,12 +109,12 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.lsd.die'),
|
||||
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
|
||||
if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -136,10 +128,9 @@ 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}, {
|
||||
{
|
||||
label = ps.lang('targets.lsd.buyt'),
|
||||
label = ps.lang('lsd.targetBuyTab'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
if not ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
|
||||
TriggerEvent("md-drugs:client:buytabs", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -156,11 +147,11 @@ for k, v in pairs (locations.buyLSDkit) do
|
||||
Freeze(seller[k], true, v.loc.w)
|
||||
ps.entityTarget(seller[k], {
|
||||
{
|
||||
label = ps.lang('targets.lsd.buy'),
|
||||
label = ps.lang('lsd.targetBuyKit'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
|
||||
if not ps.progressbar(ps.lang('lsd.buykit'), 4000, 'uncuff') then 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,
|
||||
canInteract = function()
|
||||
@@ -179,7 +170,7 @@ ps.registerCallback("md-drugs:client:setlsdlabkit", function()
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false return end
|
||||
if not ps.progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
end
|
||||
|
||||
@@ -2,11 +2,11 @@ local locations = ps.callback('md-drugs:server:GetMescalineLocs')
|
||||
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}, {
|
||||
{
|
||||
label = ps.lang('mescaline.dry'),
|
||||
label = ps.lang('mesc.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('mescaline.needbulb'), 'error') return end
|
||||
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'drymescaline') then 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,
|
||||
canInteract = function()
|
||||
|
||||
+45
-37
@@ -11,7 +11,7 @@ local function SpawnMethCarPedChase()
|
||||
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.act'),'error')
|
||||
ps.notify(ps.lang('meth.alreadyChasing'),'error')
|
||||
else
|
||||
startedmeth = true
|
||||
ps.callback('md-drugs:server:RegisterMeth')
|
||||
@@ -42,7 +42,7 @@ local function SpawnMethCarPedChase()
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = Lang.targets.meth.stealfromcar,
|
||||
label = ps.lang('meth.targetStealFromCar'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
@@ -71,9 +71,9 @@ for k, v in pairs (locations.MethHeist) do
|
||||
{
|
||||
name = 'methheist'..k,
|
||||
icon = 'fa-solid fa-user-secret',
|
||||
label = ps.lang('targets.meth.heist'),
|
||||
label = ps.lang('meth.targetHeist'),
|
||||
action = function()
|
||||
if startedmeth then ps.notify(ps.lang('meth.act'),'error') return end
|
||||
if startedmeth then ps.notify(ps.lang('meth.alreadyChasing'),'error') return end
|
||||
SpawnMethCarPedChase()
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -239,7 +239,7 @@ local function startcook(num, coords, offset, rotation)
|
||||
MethCooking(coords, offset, rotation)
|
||||
amonia = true
|
||||
else
|
||||
ps.notify(ps.lang('meth.inside'), "error")
|
||||
ps.notify(ps.lang('meth.started'), "error")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -251,7 +251,7 @@ local function dials(coords)
|
||||
amonia = false
|
||||
active = false
|
||||
return end
|
||||
ps.notify(ps.lang('meth.increaseheat'), "success")
|
||||
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
||||
heated = true
|
||||
end
|
||||
end
|
||||
@@ -266,7 +266,7 @@ local function smash(coords, offset, rotation, buckets, k)
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = "fa-solid fa-sack-xmark",
|
||||
label = ps.lang('targets.meth.bag'),
|
||||
label = ps.lang('meth.targetBag'),
|
||||
canInteract = function()
|
||||
if active == false then return false end
|
||||
end,
|
||||
@@ -309,22 +309,25 @@ 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},{
|
||||
{
|
||||
label = 'Cook Meth',
|
||||
label = ps.lang('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))
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if not amonia and not active then
|
||||
return true
|
||||
end
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = ps.lang('targets.meth.tray'),
|
||||
label = ps.lang('meth.targetGrabTray'),
|
||||
action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if heated and amonia and not tray then
|
||||
return true
|
||||
end
|
||||
@@ -338,11 +341,12 @@ for k, v in pairs (locations.MethDials) do
|
||||
{
|
||||
name = 'adjustdials',
|
||||
icon = "fa-solid fa-temperature-three-quarters",
|
||||
label = ps.lang('targets.meth.adjust'),
|
||||
label = ps.lang('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
|
||||
}
|
||||
@@ -354,11 +358,12 @@ for k, v in pairs (locations.MethSmash) do
|
||||
{
|
||||
name = 'smash',
|
||||
icon = "fa-solid fa-weight-scale",
|
||||
label = ps.lang('targets.meth.smash'),
|
||||
label = ps.lang('meth.targetSmash'),
|
||||
action = function()
|
||||
smash(v.loc, v.offset, v.rotation, v.bucket,k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if heated and amonia and tray then return true end
|
||||
end
|
||||
}
|
||||
@@ -372,30 +377,33 @@ RegisterCommand('offset', function()
|
||||
print("Offset: ", offset)
|
||||
end)
|
||||
|
||||
if not Config.MethHeist then
|
||||
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},{
|
||||
{
|
||||
label = 'Steal Ephedrine',
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", k)
|
||||
end,
|
||||
}
|
||||
})
|
||||
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},{
|
||||
{
|
||||
label = 'Steal Acetone',
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar('Stealing Acetone', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", k)
|
||||
end,
|
||||
}
|
||||
})
|
||||
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},{
|
||||
{
|
||||
label = ps.lang('meth.targetStealEPH'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('meth.stealingEPH'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
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},{
|
||||
{
|
||||
label = ps.lang('meth.targetStealACE'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('meth.stealingACE'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
+12
-8
@@ -1,10 +1,11 @@
|
||||
local carryPackage = nil
|
||||
local onMission = false
|
||||
local locations = ps.callback('md-drugs:server:GetOxyLocs')
|
||||
|
||||
local function getRoute()
|
||||
local Route = ps.callback('md-drugs:server:getRoute')
|
||||
if not Route then
|
||||
ps.notify(ps.lang('oxy.done'), "success")
|
||||
ps.notify(ps.lang('oxy.ditchCar'), "error")
|
||||
onMission = false
|
||||
return false
|
||||
end
|
||||
@@ -23,11 +24,11 @@ local function getRoute()
|
||||
PoliceCall(Config.PoliceAlertOxy)
|
||||
ps.entityTarget(oxybuyer,{
|
||||
{
|
||||
label = ps.lang('targets.oxy.talk'),
|
||||
label = ps.lang('oxy.targetHandoff'),
|
||||
icon = "fa-solid fa-dollar-sign",
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not ps.progressbar(ps.lang('oxy.hand'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('oxy.handingoff'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
@@ -35,7 +36,7 @@ local function getRoute()
|
||||
carryPackage = nil
|
||||
getRoute()
|
||||
else
|
||||
ps.notify(ps.lang('oxy.empty'), "error")
|
||||
ps.notify(ps.lang('oxy.emptyHands'), "error")
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -46,7 +47,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('targets.oxy.buytruck'),
|
||||
label = ps.lang('oxy.targetPay'),
|
||||
action = function()
|
||||
ps.requestModel("burrito3", Config.RequestModelTime)
|
||||
|
||||
@@ -56,17 +57,17 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
|
||||
ps.notify(ps.lang('oxy.truck'), 'success')
|
||||
ps.notify(ps.lang('oxy.keys'), 'success')
|
||||
onMission = true
|
||||
getRoute()
|
||||
|
||||
ps.entityTarget(oxycar, {
|
||||
{
|
||||
icon = "fa-solid fa-box",
|
||||
label = ps.lang('targets.oxy.pack'),
|
||||
label = ps.lang('oxy.targetGetPackage'),
|
||||
action = function()
|
||||
if carryPackage then
|
||||
ps.notify(ps.lang('oxy.cantcarry'), "error")
|
||||
ps.notify(ps.lang('oxy.alreadyCarrying'), "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
@@ -76,6 +77,9 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
end,
|
||||
|
||||
+9
-8
@@ -1,17 +1,18 @@
|
||||
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 = exports.ps_lib:input('Who To Give A Prescription To?',{
|
||||
{type = 'select', title = 'Player Name', options = data},
|
||||
{type = 'select', title = 'Prescription', options = op}
|
||||
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}
|
||||
})
|
||||
if not input[1] then return end
|
||||
if not ps.progressbar(ps.lang('Pharma.write'), 4000, 'notepad') then return end
|
||||
if not ps.progressbar(ps.lang('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.open'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
@@ -20,11 +21,11 @@ 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.fillprescription'),
|
||||
label = ps.lang('pharma.targetFill'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", k)
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
+10
-30
@@ -1,64 +1,44 @@
|
||||
|
||||
local DrugPlants = {
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = ps.lang('targets.coke.pick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = ps.lang('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(ps.lang('coke.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
target = {
|
||||
icon = "fa-solid fa-seedling",
|
||||
label = ps.lang('targets.coke.pick'),
|
||||
},
|
||||
allow = Config.Drugs.cocaine,
|
||||
},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('targets.heroin.pick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('Heroin.pick'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
target = {
|
||||
icon = "fa-solid fa-seedling",
|
||||
label = ps.lang('targets.heroin.pick'),
|
||||
},
|
||||
allow = Config.Drugs.heroin,
|
||||
},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('targets.mescaline.pick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('mescaline.pick'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('mesc.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
target = {
|
||||
icon = "fa-solid fa-seedling",
|
||||
label = ps.lang('targets.mescaline.pick'),
|
||||
},
|
||||
allow = Config.Drugs.mescaline,
|
||||
|
||||
},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = ps.lang('targets.weed.pick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = ps.lang('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(ps.lang('weed.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
target = {
|
||||
icon = "fa-solid fa-seedling",
|
||||
label = ps.lang('targets.weed.pick'),
|
||||
},
|
||||
allow = Config.Drugs.weed,
|
||||
},
|
||||
{model = 'mushroom', label = 'shrooms', langs = ps.lang('targets.shrooms.pick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
{model = 'mushroom', label = 'shrooms', langs = ps.lang('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not ps.progressbar(ps.lang('Shrooms.pick'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('shrooms.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
target = {
|
||||
icon = "fa-solid fa-hand",
|
||||
label = ps.lang('targets.shrooms.pick'),
|
||||
},
|
||||
allow = Config.Drugs.shrooms,
|
||||
},
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
ps.registerCallback("md-drugs:client:shrooms", function()
|
||||
if not ps.progressbar(ps.lang('Shrooms.eat'), 5000, 'eat') then return end
|
||||
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
|
||||
CreateThread(function()
|
||||
EcstasyEffect()
|
||||
end)
|
||||
|
||||
+13
-13
@@ -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('targets.weed.dry'),
|
||||
label = ps.lang('weed.targetDry'),
|
||||
action = function()
|
||||
if not ps.hasItem('wetcannabis', 1) then
|
||||
ps.notify(ps.lang('Weed.nodry'), "error")
|
||||
ps.notify(ps.lang('weed.nodry'), "error")
|
||||
return
|
||||
end
|
||||
if drying then return end
|
||||
@@ -15,12 +15,12 @@ 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")
|
||||
ps.notify(ps.lang('weed.wait'), "success")
|
||||
Wait(math.random(1000,5000))
|
||||
ps.notify(ps.lang('Weed.take'), "success")
|
||||
ps.notify(ps.lang('weed.take'), "success")
|
||||
ps.entityTarget(weedplant, {
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('targets.weed.dpick'),
|
||||
label = ps.lang('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
@@ -36,7 +36,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('targets.weed.telein'),
|
||||
label = ps.lang('weed.teleportOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end
|
||||
@@ -45,7 +45,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('targets.weed.teleout'),
|
||||
label = ps.lang('weed.teleportIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end
|
||||
@@ -66,13 +66,13 @@ CreateThread(function()
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
if not ps.progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
|
||||
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
AlienEffect()
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
local items = ps.callback('md-drugs:server:GetRecipe', 'weed',tableName)
|
||||
local items = ps.callback('md-drugs:server:GetWeedRecipe', 'weed', tableName)
|
||||
for k, v in pairs(items) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
@@ -94,11 +94,11 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", ps.lang('weed.bluntWrap'), 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", ps.lang('weed.blunts'), 'blunts')
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.WeedSalesman) do
|
||||
@@ -110,7 +110,7 @@ for k, v in pairs (locations.WeedSalesman) do
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('targets.weed.salesman'),
|
||||
label = ps.lang('weed.targetSales'),
|
||||
action = function()
|
||||
local itemList = ps.callback('md-drugs:server:getWeedItems')
|
||||
local options = {}
|
||||
@@ -124,7 +124,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('Buying ' .. ps.getLabel(m), 2000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('weed.buying', ps.getLabel(m)), 2000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
|
||||
end
|
||||
}
|
||||
|
||||
+31
-12
@@ -1,30 +1,49 @@
|
||||
local miss = false
|
||||
|
||||
local function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
ps.notify(Lang.Wholesale.al, 'error')
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
|
||||
else
|
||||
local loc = drug.location
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(loc.x, loc.y)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
|
||||
ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
AddMultiModel(drugdealer, {{
|
||||
label = Lang.targets.Wholesale.talk,
|
||||
ps.entityTarget(drugdealer, {{
|
||||
label = ps.lang('wholesale.targetBuyer'),
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck <= Config.SuccessfulChance then
|
||||
if not ps.progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
else
|
||||
ps.progressbar("YOU FUCKED NOW", 4000, 'uncuff')
|
||||
SetUpPeds()
|
||||
ps.notify(ps.lang('wholesale.uhoh'), 'error')
|
||||
SetUpPeds()
|
||||
end
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
@@ -39,7 +58,7 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
ps.notify('The Buyer Waited To Long', 'error')
|
||||
ps.notify(ps.lang('wholesale.tooLong'), 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
end
|
||||
end
|
||||
|
||||
+29
-19
@@ -9,19 +9,19 @@ end
|
||||
|
||||
ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
if xtcpress then
|
||||
ps.notify(Lang.xtc.out, 'error')
|
||||
ps.notify(ps.lang('xtc.alreadyOut'), 'error')
|
||||
return
|
||||
end
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
if not ps.progressbar('Setting Press On The Ground', 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('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('targets.xtc.make'),
|
||||
label = ps.lang('xtc.targetMake'),
|
||||
distance = 2.0,
|
||||
action = function()
|
||||
local options = {}
|
||||
@@ -33,7 +33,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
description = descript,
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(string.format(ps.lang('xtc.make'), ps.getLabel(k)), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('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('targets.xtc.pick'),
|
||||
label = ps.lang('xtc.targetPickup'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.pickup'), 5000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('xtc.picking'), 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback")
|
||||
@@ -67,11 +67,14 @@ 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('targets.xtc.mdp2p'),
|
||||
label = ps.lang('xtc.targetStealMDP2P'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.mdp2p'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingMDP2P'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -80,11 +83,14 @@ 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('targets.xtc.isosafrole'),
|
||||
label = ps.lang('xtc.targetStealIsosafrole'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.isosafrole'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingIsosafrole'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -94,11 +100,14 @@ for k, v in pairs(locations.rawxtcloc) do
|
||||
ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('targets.xtc.raw'),
|
||||
label = ps.lang('xtc.targetRaw'),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.raw'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('xtc.makingRaw'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -111,7 +120,7 @@ for k, v in pairs(locations.xtcpress) do
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('targets.xtc.press'),
|
||||
label = ps.lang('xtc.getPress'),
|
||||
action = function()
|
||||
local options = {}
|
||||
local recipeList = ps.callback('md-drugs:server:getpressrecipes')
|
||||
@@ -120,14 +129,13 @@ for k, v in pairs(locations.xtcpress) do
|
||||
options[#options + 1] = {
|
||||
icon = ps.getImage(m),
|
||||
title = ps.getLabel(m),
|
||||
description = ps.lang('xtc.press.buysingle', d.cash),
|
||||
description = ps.lang('xtc.buySingle', d.cash),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buypress', m)
|
||||
end,
|
||||
}
|
||||
else
|
||||
ps.debug(d.take)
|
||||
local descript = getRecipeList(d.take)
|
||||
options[#options + 1] = {
|
||||
icon = ps.getImage(m),
|
||||
@@ -142,7 +150,8 @@ for k, v in pairs(locations.xtcpress) do
|
||||
end
|
||||
end
|
||||
ps.menu('XTC Presses', 'XTC Presses', options)
|
||||
end
|
||||
end,
|
||||
canInteract = function() return handleGang(v.gang) end
|
||||
}
|
||||
})
|
||||
end
|
||||
@@ -151,7 +160,7 @@ for k, v in pairs (locations.stamp) do
|
||||
ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('targets.xtc.' .. k),
|
||||
label = ps.lang('xtc.targetStamp'),
|
||||
action = function()
|
||||
local item = {
|
||||
{item = 'white_xtc', label = ps.getLabel('white_xtc'), color = 'white'},
|
||||
@@ -167,14 +176,15 @@ for k, v in pairs (locations.stamp) do
|
||||
description = ps.lang('xtc.stamp_desc', d.color),
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(string.format(ps.lang('xtc.stamp'), d.label), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('xtc.stamping'), d.label, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamp", k, d.color)
|
||||
end,
|
||||
distance = 2.0
|
||||
}
|
||||
end
|
||||
ps.menu('Stamp Pills', 'Stamp Pills', options)
|
||||
end
|
||||
end,
|
||||
canInteract = function() return handleGang(v.gang) end
|
||||
}
|
||||
})
|
||||
end
|
||||
Reference in new issue
Block a user