Installation
Dependencies
ES EXTENDED
You will need the latest version of esx_core.
Extract the contents of the archive to your resources folder.
Start the resource near the top of your resources in your server.cfg.
Remove Commands
/setgang command
go to qb-core/server/commands and comment this :
QBCore.Commands.Add('setgang', Lang:t('command.setgang.help'), { { name = Lang:t('command.setgang.params.id.name'), help = Lang:t('command.setgang.params.id.help') }, { name = Lang:t('command.setgang.params.gang.name'), help = Lang:t('command.setgang.params.gang.help') }, { name = Lang:t('command.setgang.params.grade.name'), help = Lang:t('command.setgang.params.grade.help') } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.SetGang(tostring(args[2]), tonumber(args[3]))
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
end, 'admin')
/gang command
go to qb-core/server/commands and comment this :
QBCore.Commands.Add('gang', Lang:t('command.gang.help'), {}, false, function(source)
local PlayerGang = QBCore.Functions.GetPlayer(source).PlayerData.gang
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.gang_info', { value = PlayerGang.label, value2 = PlayerGang.grade.name }))
end, 'user')
Cornerselling
Add this into your radialmenu
for example : qb-radialmenu/config.lua
{
id = "sell-drugs",
displayName = "Sell Drugs",
icon = "#weed-cultivation",
functionName = "zat-gangs:client:cornerselling",
enableMenu = function()
return true
end,
},
Make sure you have the dependencies listed above installed.
Extract the contents of the archive to your resources folder.
QB INVENTORY or PS INVENTORY
Add item to shared items.lua
gangtable = { name = 'gangtable', label = 'Interactive Table', weight = 100, type = 'item', image = 'gangtable.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Interactive Table' },
gangcamera = { name = 'gangcamera', label = 'Security Camera', weight = 100, type = 'item', image = 'gangcamera.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Security Camera' },
gangstashs = { name = 'gangstashs', label = 'Small Stash', weight = 100, type = 'item', image = 'gangstashs.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Small Stash' },
gangstashm = { name = 'gangstashm', label = 'Medium Stash', weight = 100, type = 'item', image = 'gangstashm.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Medium Stash' },
rfid_cloner = { name = 'rfid_cloner', label = 'RFID Cloner', weight = 100, type = 'item', image = 'rfid_cloner.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'RFID Cloner' },
spray = { name = 'spray', label = 'Spray Bottle', weight = 100, type = 'item', image = 'spray.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Spray Bottle' },
sprayc = { name = 'sprayc', label = 'Spray Remover', weight = 100, type = 'item', image = 'sprayc.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Spray Remover' },
OX INVENTORY
Add items to ox_inventory/data/items.lua
["gangtable"] = {
label = "Interactive Table",
weight = 100,
stack = false,
close = true,
description = "Interactive Table",
client = {
image = "gangtable.png",
}
},
["spray"] = {
label = "Spray Bottle",
weight = 100,
stack = false,
close = true,
description = "Spray Bottle",
client = {
image = "spray.png",
}
},
["sprayc"] = {
label = "Spray Cleaner",
weight = 100,
stack = false,
close = true,
description = "Spray Cleaner",
client = {
image = "sprayc.png",
}
},
["gangstashs"] = {
label = "Small Stash",
weight = 100,
stack = false,
close = true,
description = "Small Stash",
client = {
image = "gangstashs.png",
}
},
["gangstashm"] = {
label = "Medium Stash",
weight = 100,
stack = false,
close = true,
description = "Medium Stash",
client = {
image = "gangstashm.png",
}
},
["rfid_cloner"] = {
label = "RFID Cloner",
weight = 100,
stack = false,
close = true,
description = "RFID Cloner",
client = {
image = "rfid_cloner.png",
}
},
["gangcamera"] = {
label = "Security Camera",
weight = 100,
stack = false,
close = true,
description = "Security Camera",
client = {
image = "gangcamera.png",
}
},
Add this into ox_inventory/modules/itmes/client.lua
-- gang script
-- if you need to change the props for ox, change them from here and from the config.lua
local GangProps = {
['table'] = {
item = 'gangtable',
prop = 'prop_gang_table',
},
['camera'] = {
item = 'gangcamera',
prop = 'prop_cctv_cam_01a',
},
['stashs'] = {
item = 'gangstashs',
prop = 'prop_gang_basket_s',
remove = true, -- removes the hack item after useage or not
},
['stashm'] = {
item = 'gangstashm',
prop = 'prop_gang_basket_m',
remove = true, -- removes the hack item after useage or not
},
}
Item('gangtable', function(data, slot)
TriggerEvent('zat-gangs:client:PreviewProp', "gangtable", GangProps['table'].prop)
end)
Item('gangcamera', function(data, slot)
TriggerEvent('zat-gangs:client:PreviewProp', "gangcamera", GangProps['camera'].prop)
end)
Item('gangstashs', function(data, slot)
TriggerEvent('zat-gangs:client:PreviewProp', "gangstashs", GangProps['stashs'].prop)
end)
Item('gangstashm', function(data, slot)
TriggerEvent('zat-gangs:client:PreviewProp', "gangstashm", GangProps['stashm'].prop)
end)
Item('spray', function(data, slot)
TriggerEvent('zat-gangs:client:CheckSprayData', true)
end)
Item('sprayc', function(data, slot)
TriggerEvent('zat-gangs:client:CheckSprayData', false)
end)
Add the images inside your ox_inventory/web/images.
QS INVENTORY
Add the items below into qs-inventory/shared/items.lua
['gangtable'] = {
['name'] = 'gangtable',
['label'] = 'Interactive Table',
['weight'] = 50,
['type'] = 'item',
['image'] = 'gangtable.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Interactive Table...'
},
['spray'] = {
['name'] = 'spray',
['label'] = 'Spray Bott',
['weight'] = 50,
['type'] = 'item',
['image'] = 'spray.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Spray Bott...'
},
['sprayc'] = {
['name'] = 'sprayc',
['label'] = 'Spray Cleaner',
['weight'] = 50,
['type'] = 'item',
['image'] = 'sprayc.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Spray Cleaner...'
},
['gangstashs'] = {
['name'] = 'gangstashs',
['label'] = 'Small Stash',
['weight'] = 50,
['type'] = 'item',
['image'] = 'gangstashs.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Small Stash...'
},
['gangstashm'] = {
['name'] = 'gangstashm',
['label'] = 'Medium Stash',
['weight'] = 50,
['type'] = 'item',
['image'] = 'gangstashm.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Medium Stash...'
},
['rfid_cloner'] = {
['name'] = 'rfid_cloner',
['label'] = 'RFID Clone',
['weight'] = 50,
['type'] = 'item',
['image'] = 'rfid_cloner.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'RFID Clone...'
},
['gangcamera'] = {
['name'] = 'gangcamera',
['label'] = 'Security Camer',
['weight'] = 50,
['type'] = 'item',
['image'] = 'gangcamera.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Security Camer...'
},
Add the code below into qs-inventory/server/custom/misc/createuseableitems.lua:
-- gang script
-- if you need to change the props for qs, change them from here and from the config.lua
local GangProps = {
['table'] = {
item = 'gangtable',
prop = 'prop_gang_table',
},
['camera'] = {
item = 'gangcamera',
prop = 'prop_cctv_cam_01a',
},
['stashs'] = {
item = 'gangstashs',
prop = 'prop_gang_basket_s',
remove = true, -- removes the hack item after useage or not
},
['stashm'] = {
item = 'gangstashm',
prop = 'prop_gang_basket_m',
remove = true, -- removes the hack item after useage or not
},
}
CreateUsableItem('gangtable', function(source, item)
local src = source
local item = GetItemByName(src, 'gangtable')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:PreviewProp', src, "gangtable", GangProps['table'].prop)
end
end)
CreateUsableItem('gangcamera', function(source, item)
local src = source
local item = GetItemByName(src, 'gangcamera')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:PreviewProp', src, "gangcamera", GangProps['camera'].prop)
end
end)
CreateUsableItem('gangstashs', function(source, item)
local src = source
local item = GetItemByName(src, 'gangstashs')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:PreviewProp', src, "gangstashs", GangProps['stashs'].prop)
end
end)
CreateUsableItem('gangstashm', function(source, item)
local src = source
local item = GetItemByName(src, 'gangstashm')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:PreviewProp', src, "gangstashm", GangProps['stashm'].prop)
end
end)
CreateUsableItem('spray', function(source, item)
local src = source
local item = GetItemByName(src, 'spray')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:CheckSprayData', src, true)
end
end)
CreateUsableItem('sprayc', function(source, item)
local src = source
local item = GetItemByName(src, 'sprayc')
if item ~= nil then
TriggerClientEvent('zat-gangs:client:CheckSprayData', src, false)
end
end)
Add the images inside your qs_inventory/html/images.
Ensure Resources
Last updated