tweaks
This commit is contained in:
1 parent
dbed6b3c47
commit
73af37c00a
2 files changed
+11
-38
No files matched your search
+6
-9
@@ -2,6 +2,11 @@ local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local PoppyPlants = {}
|
||||
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)
|
||||
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
@@ -101,13 +106,9 @@ else
|
||||
local location, head = StartRay()
|
||||
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
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
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)
|
||||
end)
|
||||
|
||||
|
||||
+5
-29
@@ -36,39 +36,15 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||
local event = "md-drugs:client:MakeXTC"
|
||||
lib.registerContext({
|
||||
id = 'XTCmenu',
|
||||
title = 'XTC Menu',
|
||||
options = {
|
||||
{
|
||||
icon = GetImage('white_xtc'),
|
||||
title = 'White XTC',
|
||||
description = '1 X Raw XTC',
|
||||
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'}
|
||||
},
|
||||
|
||||
{icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
|
||||
{icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
|
||||
{icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
|
||||
{icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
|
||||
}
|
||||
})
|
||||
lib.showContext('XTCmenu')
|
||||
|
||||
Reference in new issue
Block a user