tweaks
This commit is contained in:
1 parent
dbed6b3c47
commit
73af37c00a
2 files changed
+16
-43
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)
|
||||||
|
|
||||||
|
|||||||
+10
-34
@@ -17,7 +17,7 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
|||||||
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')
|
||||||
@@ -164,10 +140,10 @@ RegisterNetEvent("md-drugs:client:buypress", function()
|
|||||||
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')
|
||||||
|
|||||||
Reference in new issue
Block a user