added global options to remove exploit for tables
This commit is contained in:
1 parent
aaa60b9a2c
commit
27b9f75a6e
3 files changed
+62
-12
No files matched your search
+11
-2
@@ -1,7 +1,7 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local PoppyPlants = {}
|
||||
|
||||
local herointable = false
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
@@ -187,11 +187,16 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
|
||||
else
|
||||
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
herointable = true
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(heroinlabkit)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
exports['qb-target']:AddTargetEntity(heroinlabkit, {
|
||||
options = {
|
||||
{
|
||||
@@ -205,9 +210,12 @@ TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
event = "md-drugs:client:getheroinkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if herointable then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin")
|
||||
@@ -270,6 +278,7 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback")
|
||||
AddEventHandler("md-drugs:client:getheroinkitback", function()
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
+13
-4
@@ -1,5 +1,5 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local tableout = false
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
@@ -70,7 +70,11 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setlsdlabkit")
|
||||
AddEventHandler("md-drugs:client:setlsdlabkit", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
if tableout then
|
||||
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
|
||||
else
|
||||
tableout = true
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
@@ -107,11 +111,15 @@ local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if tableout then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback")
|
||||
AddEventHandler("md-drugs:client:getlabkitback", function()
|
||||
@@ -127,6 +135,7 @@ AddEventHandler("md-drugs:client:getlabkitback", function()
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
ClearPedTasks(PlayerPedId())
|
||||
tableout = false
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
+38
-6
@@ -1,8 +1,12 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local xtcpress = false
|
||||
RegisterNetEvent("md-drugs:client:setpressquad")
|
||||
AddEventHandler("md-drugs:client:setpressquad", function()
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -36,14 +40,21 @@ local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
event = "md-drugs:client:getquadpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresstriple")
|
||||
AddEventHandler("md-drugs:client:setpresstriple", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -75,14 +86,21 @@ local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
event = "md-drugs:client:gettriplepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressdual")
|
||||
AddEventHandler("md-drugs:client:setpressdual", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -117,14 +135,21 @@ local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
event = "md-drugs:client:getdualpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresssingle")
|
||||
AddEventHandler("md-drugs:client:setpresssingle", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -160,13 +185,17 @@ local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
event = "md-drugs:client:getsinglepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepressback")
|
||||
AddEventHandler("md-drugs:client:getsinglepressback", function()
|
||||
AddEventHandler("md-drugs:client:getsinglepressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(singlepress)
|
||||
TriggerServerEvent("md-drugs:server:getsinglepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -174,13 +203,15 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdualpressback")
|
||||
AddEventHandler("md-drugs:client:getdualpressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(dualpress)
|
||||
TriggerServerEvent("md-drugs:server:getdualpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:gettriplepressback")
|
||||
AddEventHandler("md-drugs:client:gettriplepressback", function()
|
||||
AddEventHandler("md-drugs:client:gettriplepressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(triplepress)
|
||||
TriggerServerEvent("md-drugs:server:gettriplepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
@@ -188,6 +219,7 @@ end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getquadpressback")
|
||||
AddEventHandler("md-drugs:client:getquadpressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(quadpress)
|
||||
TriggerServerEvent("md-drugs:server:getquadpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
Reference in new issue
Block a user