tweaks
This commit is contained in:
1 parent
dbed6b3c47
commit
73af37c00a
3 files changed
+31
-58
No files matched your search
+6
-9
@@ -2,6 +2,11 @@ local QBCore = exports['qb-core']:GetCoreObject()
|
|||||||
local PoppyPlants = {}
|
local PoppyPlants = {}
|
||||||
local herointable = false
|
local herointable = false
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
||||||
|
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||||
|
}
|
||||||
|
|
||||||
local function pickher(loc)
|
local function pickher(loc)
|
||||||
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
|
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
|
||||||
TriggerServerEvent("heroin:pickupCane", loc)
|
TriggerServerEvent("heroin:pickupCane", loc)
|
||||||
@@ -101,13 +106,9 @@ else
|
|||||||
local location, head = StartRay()
|
local location, head = StartRay()
|
||||||
if not location then herointable = false TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
if not location then herointable = false TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
||||||
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
||||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", location.x, location.y, location.z, true, false)
|
heroinlabkit = CreateObject("v_ret_ml_tablea", location.x, location.y, location.z, true, false)
|
||||||
SetEntityHeading(heroinlabkit, head)
|
SetEntityHeading(heroinlabkit, head)
|
||||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||||
local options = {
|
|
||||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
|
||||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
|
||||||
}
|
|
||||||
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -147,10 +148,6 @@ local head = GetEntityHeading(data)
|
|||||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", location.x, location.y, location.z-1, true, false)
|
local heroinlabkit = CreateObject("v_ret_ml_tablea", location.x, location.y, location.z-1, true, false)
|
||||||
SetEntityHeading(heroinlabkit, head)
|
SetEntityHeading(heroinlabkit, head)
|
||||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||||
local options = {
|
|
||||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
|
||||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
|
||||||
}
|
|
||||||
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -140,14 +140,14 @@ AddBoxZoneSingle('makeoil',Config.MakeOil, {
|
|||||||
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
|
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
|
||||||
if not minigame() then
|
if not minigame() then
|
||||||
local explosion = math.random(1,100)
|
local explosion = math.random(1,100)
|
||||||
local loc = GetEntityCoords(PlayerPedId())
|
local loc = GetEntityCoords(PlayerPedId())
|
||||||
if explosion <= 99 then
|
if explosion <= 99 then
|
||||||
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
|
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
|
||||||
exploded = true
|
exploded = true
|
||||||
Notify(Lang.Weed.stovehot, "error")
|
Notify(Lang.Weed.stovehot, "error")
|
||||||
Wait(1000 * 30)
|
Wait(1000 * 30)
|
||||||
exploded = nil
|
exploded = nil
|
||||||
end
|
end
|
||||||
return end
|
return end
|
||||||
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
|
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
|
||||||
TriggerServerEvent("md-drugs:server:makeoil")
|
TriggerServerEvent("md-drugs:server:makeoil")
|
||||||
|
|||||||
+17
-41
@@ -5,8 +5,8 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
|||||||
if xtcpress then
|
if xtcpress then
|
||||||
Notify(Lang.xtc.out, 'error')
|
Notify(Lang.xtc.out, 'error')
|
||||||
else
|
else
|
||||||
local coords, head = StartRay2()
|
local coords, head = StartRay2()
|
||||||
xtcpress = true
|
xtcpress = true
|
||||||
progressbar('Setting Press On The Ground', 4000, 'uncuff')
|
progressbar('Setting Press On The Ground', 4000, 'uncuff')
|
||||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||||
PlaceObjectOnGroundProperly(press)
|
PlaceObjectOnGroundProperly(press)
|
||||||
@@ -16,8 +16,8 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
|||||||
icon = "fas fa-eye",
|
icon = "fas fa-eye",
|
||||||
label = Lang.targets.xtc.make,
|
label = Lang.targets.xtc.make,
|
||||||
distance = 2.0,
|
distance = 2.0,
|
||||||
action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
|
action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
|
||||||
onSelect = function() TriggerEvent("md-drugs:client:XTCMenu", type)end,
|
onSelect = function()TriggerEvent("md-drugs:client:XTCMenu", type)end,
|
||||||
canInteract = function()
|
canInteract = function()
|
||||||
if xtcpress then return true end end
|
if xtcpress then return true end end
|
||||||
},
|
},
|
||||||
@@ -36,39 +36,15 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||||
|
local event = "md-drugs:client:MakeXTC"
|
||||||
lib.registerContext({
|
lib.registerContext({
|
||||||
id = 'XTCmenu',
|
id = 'XTCmenu',
|
||||||
title = 'XTC Menu',
|
title = 'XTC Menu',
|
||||||
options = {
|
options = {
|
||||||
{
|
{icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
|
||||||
icon = GetImage('white_xtc'),
|
{icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
|
||||||
title = 'White XTC',
|
{icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
|
||||||
description = '1 X Raw XTC',
|
{icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
|
||||||
event = "md-drugs:client:MakeXTC",
|
|
||||||
args = { data = type, color = 'white'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = GetImage('red_xtc'),
|
|
||||||
title = 'Red XTC',
|
|
||||||
description = '1 X Raw XTC and 1 X Loose Coke',
|
|
||||||
event = "md-drugs:client:MakeXTC",
|
|
||||||
args = { data = type, color = 'red'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = GetImage('orange_xtc'),
|
|
||||||
title = 'Orange XTC',
|
|
||||||
description = '1 X Raw XTC and 1 X Heroin Vial',
|
|
||||||
event = "md-drugs:client:MakeXTC",
|
|
||||||
args = { data = type, color = 'orange'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = GetImage('blue_xtc'),
|
|
||||||
title = 'Blue XTC',
|
|
||||||
description = '1 X Raw XTC and 1 X Crack Rock',
|
|
||||||
event = "md-drugs:client:MakeXTC",
|
|
||||||
args = { data = type, color = 'blue'}
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
lib.showContext('XTCmenu')
|
lib.showContext('XTCmenu')
|
||||||
@@ -161,14 +137,14 @@ end)
|
|||||||
RegisterNetEvent("md-drugs:client:buypress", function()
|
RegisterNetEvent("md-drugs:client:buypress", function()
|
||||||
local img = GetImage('singlepress')
|
local img = GetImage('singlepress')
|
||||||
lib.registerContext({
|
lib.registerContext({
|
||||||
id = 'buypresses',
|
id = 'buypresses',
|
||||||
title = 'Purchase Presses',
|
title = 'Purchase Presses',
|
||||||
options = {
|
options = {
|
||||||
{ title = Lang.xtc.press.title.single, description = Lang.xtc.des.title.single, icon = img, event = 'md-drugs:client:getsinglepress'},
|
{title = Lang.xtc.press.title.single, description = Lang.xtc.des.title.single, icon = img, event = 'md-drugs:client:getsinglepress'},
|
||||||
{ title = Lang.xtc.press.title.dual, description = Lang.xtc.des.title.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
|
{title = Lang.xtc.press.title.dual, description = Lang.xtc.des.title.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
|
||||||
{ title = Lang.xtc.press.title.triple, description = Lang.xtc.des.title.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
|
{title = Lang.xtc.press.title.triple, description = Lang.xtc.des.title.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
|
||||||
{ title = Lang.xtc.press.title.quad, description = Lang.xtc.des.title.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
|
{title = Lang.xtc.press.title.quad, description = Lang.xtc.des.title.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
lib.showContext('buypresses')
|
lib.showContext('buypresses')
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in new issue
Block a user