Our script has a trigger that can be used to have the CopNet triggered by any other script.
Once this happens, the tablet appears and automatically opens the CopNet.
The trigger to trigger the script from us is:TriggerEvent('vpc-tab:BOSS', 'cop')
First open the main.lua
in the client folder of the esx_policejob
. Once in the main.lua please search for OpenPoliceActionsMenu()
, using the key combination CTRL+F, if you don't find this please search for police_actions
.
Once you have found this it should look something like this:
function OpenPoliceActionsMenu()
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'police_actions', {
title = 'Police',
align = 'top-left',
elements = {
{label = _U('citizen_interaction'), value = 'citizen_interaction'},
{label = _U('vehicle_interaction'), value = 'vehicle_interaction'},
{label = _U('object_spawner'), value = 'object_spawner'},
}}, function(data, menu)
if data.current.value == 'citizen_interaction' then
Please replace this code shown above with the following code:
function OpenPoliceActionsMenu()
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'police_actions', {
title = 'Police',
align = 'top-left',
elements = {
{label = _U('citizen_interaction'), value = 'citizen_interaction'},
{label = _U('vehicle_interaction'), value = 'vehicle_interaction'},
{label = _U('object_spawner'), value = 'object_spawner'},
{label = 'Tablet', value = 'copnet'}
}}, function(data, menu)
if data.current.value == 'copnet' then
TriggerEvent('vpc-tab:BOSS', 'cop')
elseif data.current.value == 'citizen_interaction' then