⤵️Installation
# STEP 1 - Check dependencies
Make sure you have installed all dependencies .
# STEP 2 - Drag And Drop
Drag and drop the l2s-policehub to your resources folder.
# STEP 3 - Setup Items and Images
Set Up Items According to your inventory
1- Add Items in qb-core/shared/items.lua
["bodycam"] = {
["name"] = "bodycam",
["label"] = "Bodycam",
["weight"] = 500,
["type"] = "item",
["image"] = "bodycam.png",
["unique"] = true,
["useable"] = false,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "Body Camera for police"
},
2- Add Image in qb-inventory/html/images/...
# STEP 4 - Set Up metadata
Go to qb-core/server/player.lua and add this metadata
If you have the old method of metadata (your metadata in player.lua instead of config.lua) put it inside this path:
qb-core/server/player.lua
PlayerData.metadata['policehub'] = PlayerData.metadata['policehub'] or {
['alerts'] = {
['enablealerts'] = true,
['autoclear'] = false,
['mute'] = false,
},
['wings'] = {
[1] = false,
[2] = false,
[3] = false,
[4] = false,
[5] = false,
[6] = false,
[7] = false,
[8] = false,
[9] = false,
},
['direction'] = nil,
['Assignment'] = nil,
['OfficerPlayTime'] = 0,
}
PlayerData.metadata["dutybusy"] = PlayerData.metadata["dutybusy"] ~= nil and PlayerData.metadata["dutybusy"] or false
PlayerData.metadata["dutybreak"] = PlayerData.metadata["dutybreak"] ~= nil and PlayerData.metadata["dutybreak"] or false

# STEP 5- Dependencies for inventory
To use bodycam system you must add some function in your inventory script
1-Add This In AddItem Function : in qb-inventory or your inventory script
if item == 'bodycam' then
TriggerClientEvent('l2s-policehub:client:togglebody', source)
end

2- Add This In RemoveItem Function : in qb-inventory or your inventory script
if item == 'bodycam' then
TriggerClientEvent('l2s-policeuhub:client:cancelbody', -1, Player.PlayerData.source)
end

# STEP 6 - Start The Script
1 - Start the script on your server.cfg
ensure l2s-policehub
Last updated