# STEP 1 - Check dependencies
# STEP 3 - Setup Items and Images
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
If you have the last version of qb-core and (your metadata in config.lua) copy paste the code in this path:
qb-core/config.lua
policehub = {
['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,
},
If you use QBox Framework copy paste the code in this path:
qbx-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
if item == 'bodycam' then
TriggerClientEvent('l2s-policehub:client:togglebody', source)
end
if item == 'bodycam' then
TriggerClientEvent('l2s-policeuhub:client:cancelbody', -1, Player.PlayerData.source)
end
# STEP 6 - Start The Script