added lang and sorts
This commit is contained in:
1 parent
fefd53857e
commit
d3e99d6440
17 files changed
+279
-191
No files matched your search
+31
-51
@@ -1,7 +1,6 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local xtcpress = false
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpress", function(type)
|
||||
if xtcpress then
|
||||
Notify(Lang.xtc.out, 'error')
|
||||
@@ -11,38 +10,30 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
|
||||
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)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
SetEntityHeading(press, head)
|
||||
SetEntityHeading(press, head)
|
||||
local options = {
|
||||
{
|
||||
icon = "fas fa-eye",
|
||||
label = "Make XTC",
|
||||
label = Lang.targets.xtc.make,
|
||||
distance = 2.0,
|
||||
action = function()
|
||||
TriggerEvent("md-drugs:client:XTCMenu", type)
|
||||
end,
|
||||
onSelect = 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,
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
{
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
action = function()
|
||||
TriggerEvent("md-drugs:client:GetPressBack", type, press)
|
||||
end,
|
||||
onSelect = function()
|
||||
TriggerEvent("md-drugs:client:GetPressBack", type, press)
|
||||
end,
|
||||
icon = "fas fa-eye",
|
||||
label = Lang.targets.xtc.pick,
|
||||
action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end,
|
||||
onSelect = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end,
|
||||
distance = 2.0,
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
AddMultiModel(press, options, nil)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||
lib.registerContext({
|
||||
@@ -84,21 +75,21 @@ RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
|
||||
if not progressbar('Packing Up The Press', 5000, 'uncuff') then return end
|
||||
if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback", type)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
|
||||
end)
|
||||
@@ -120,61 +111,50 @@ end)
|
||||
------------------------------------------------------------------ Stamping
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampwhite", function(data)
|
||||
lib.registerContext({
|
||||
id = 'stampxtc',
|
||||
title = 'Stamp XTC Menu',
|
||||
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
|
||||
options = {
|
||||
{
|
||||
icon = GetImage('white_xtc'),
|
||||
title = 'White XTC',
|
||||
{ icon = GetImage('white_xtc'), title = 'White XTC',
|
||||
onSelect = function()
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar('Stamping White Pills', 4000, 'uncuff') then return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = GetImage('red_xtc'),
|
||||
title = 'Red XTC',
|
||||
{ icon = GetImage('red_xtc'), title = 'Red XTC',
|
||||
onSelect = function()
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar('Stamping Red Pills', 4000, 'uncuff') then return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampred", data.data)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = GetImage('orange_xtc'),
|
||||
title = 'Orange XTC',
|
||||
{ icon = GetImage('orange_xtc'), title = 'Orange XTC',
|
||||
onSelect = function()
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar('Stamping Orange Pills', 4000, 'uncuff') then return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamporange", data.data)
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = GetImage('blue_xtc'),
|
||||
title = 'Blue XTC',
|
||||
{ icon = GetImage('blue_xtc'), title = 'Blue XTC',
|
||||
onSelect = function()
|
||||
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar('Stamping Blue Pills', 4000, 'uncuff') then return end
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampblue", data.data)
|
||||
end
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
lib.showContext('stampxtc')
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress", function()
|
||||
if not progressbar('Buying Press', 4000, 'uncuff') then return end
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
|
||||
if not progressbar('Buying Press', 4000, 'uncuff') then return end
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:upgradepress", data.data)
|
||||
end)
|
||||
|
||||
|
||||
Reference in new issue
Block a user