⚙️Config Files
Main Config
Config = {}
Config.Framework = 'ESX' -- ESX / QB / QBOX
Config.Language = 'en' -- pl / en
Config.Inventory = 'ox_inventory' -- ox_inventory / qb-inventory / ps-inventory / qs-inventory / tgiann-inventory / codem-inventory
Config.Target = 'ox_target' -- ox_target / qb-target
Config.Logs = false -- true / false
Config.Debug = false
Config.Commands = true -- set to false if you want dont want to use commands
Config.OxRadial = true -- enable ox radial menu? (you can edit this in bridge/client)
Config.PoliceMenu = false -- set to true if you want to use F6 OX LIB MENU
Config.PoliceMenuKey = 'F6' -- key to open police menu
Config.PoliceMDT = GetResourceState('piotreq_gpt') ~= 'missing' -- you using our police mdt?
lib.locale(Config.Language or 'en')
Config.SSN = 'id' -- database column for character unique id
Config.Jobs = {
['police'] = 0,
['sheriff'] = 0
}
Config.OutfitsAccess = { -- permissions for /police_outfit
['police'] = 0,
['sheriff'] = 0
}
Config.Stations = {
['MissionRow'] = {
blips = {
{
sprite = 60, color = 29, scale = 0.95, display = 2,
label = 'Mission Row LSPD', coords = vector3(437.6986, -982.1099, 30.6904)
},
{
sprite = 72, color = 29, scale = 0.8, display = 2,
label = 'Police Extras', coords = vector3(426.9231, -1023.2134, 28.8635),
restricted = {['police'] = 0, ['sheriff'] = 0}
},
},
bells = {
{
coords = vector3(445.73, -990.36, 30.75), radius = 0.75,
jobs = {['police'] = true, ['sheriff'] = true}, -- which jobs will get alert
}
},
trashes = {
{
coords = vector3(445.83, -1004.18, 30.5), radius = 0.75,
allowedJobs = {['police'] = 0, ['sheriff'] = 0}, -- which jobs can access trashes
}
},
bodycams = {
{
coords = vector3(460.18, -1005.04, 34.0), radius = 0.75,
allowedJobs = {['police'] = 0, ['sheriff'] = 0}, -- which jobs can access bodycams
}
},
toggleDuty = { -- coords for duty toggle [ONLY QB AND QBOX!!!!!!]
{
coords = vector3(446.19, -991.22, 30.5), radius = 0.75,
allowedJobs = {['police'] = 0, ['sheriff'] = 0},
}
}
}
}
Config.Shops = {
['Armory'] = {
label = 'Police Armory',
locations = {
vector3(449.45, -1006.15, 31.0)
},
requiredDuty = false,
radius = 0.75,
allowedJobs = {['police'] = 0, ['sheriff'] = 0}, -- which jobs can access shop
inventory = {
{name = 'spike_strip', price = 0},
{name = 'police_diving_suit', price = 0},
{name = 'tracking_band', price = 0},
{name = 'fingerprinter', price = 0},
{name = 'stick_bag', price = 0},
{name = 'stick', price = 0},
{name = 'body_cam', price = 0},
{name = 'gps', price = 0},
{name = 'camera', price = 0},
{name = 'radio', price = 0},
{name = 'handcuffs', price = 0},
{name = 'vest_normal', price = 10},
{name = 'vest_strong', price = 100},
{name = 'ammo-9', price = 5},
{name = 'ammo-rifle', price = 5},
{name = 'ammo-shotgun', price = 5},
{name = 'WEAPON_FLASHLIGHT', price = 100},
{name = 'WEAPON_NIGHTSTICK', price = 100, metadata = {registered = true, serial = 'POL'}},
{name = 'WEAPON_COMBATPISTOL', price = 1000, license = 'weapon', grade = 1, metadata = {registered = true, serial = 'POL'}},
{name = 'WEAPON_STUNGUN', price = 1000, metadata = {registered = true, serial = 'POL'}},
{name = 'WEAPON_PUMPSHOTGUN', price = 10000, license = 'weapon', grade = 5, metadata = {registered = true, serial = 'POL'}},
{name = 'WEAPON_CARBINERIFLE', price = 15000, license = 'weapon', grade = 10, metadata = {registered = true, serial = 'POL'}},
},
}
}
Config.Wardrobes = {
['MissionRow'] = {
coords = vector3(464.6, -1008.23, 31.0),
radius = 0.75,
drawSprite = false,
}
}
Config.Lockers = {
['MissionRow'] = {
coords = vector3(468.25, -1009.97, 31.0),
radius = 0.75,
drawSprite = false,
options = {
{
name = 'MissionRow_Locker', -- stash name and target name ;)
label = locale('private_locker'),
icon = 'fa-solid fa-box-open',
distance = 2,
groups = Config.Jobs,
isLocker = true, -- set to false if not locker target
lockerOwner = false, -- false = shared / true = private
lockerLabel = locale('private_locker'), -- set only if isLocker
lockerSlots = 50, lockerWeight = 500000,
onSelect = function()
Inventory.openInventory('stash', 'MissionRow_Locker')
end,
canInteract = function()
local dutyData = Core.CheckDuty()
return dutyData.status == 1
end
}
}
}
}
Config.Radio = {
[1] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "LSPD"
},
[2] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "LSPD"
},
[3] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "LSPD"
},
[4] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "SHERIFF"
},
[5] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "SHERIFF"
},
[6] = {
jobs = {
['police'] = true,
['sheriff'] = true,
},
label = "SHERIFF"
},
}
Config.SetUniform = function(job, grade)
local animDict = lib.requestAnimDict('clothingtie')
TaskPlayAnim(cache.ped, animDict, 'try_tie_negative_a', 2.0, 2.0, 2000, 49, 0, false, false, false)
RemoveAnimDict(animDict)
Citizen.Wait(1500)
if Config.Framework == 'ESX' then
TriggerEvent('skinchanger:getSkin', function(skin)
local uniformObject
sex = (skin.sex == 0) and "male" or "female"
uniformObject = Config.Outfits[job][grade][sex]
if uniformObject then
ClearPedBloodDamage(cache.ped)
ResetPedVisibleDamage(cache.ped)
ClearPedLastWeaponDamage(cache.ped)
TriggerEvent('skinchanger:loadClothes', skin, uniformObject)
else
Core.ShowNotification(locale('no_outfit'), 'error')
end
end)
else
local uniformObject
local playerSex = Core.GetPlayerSex()
sex = (playerSex == 0) and "male" or "female"
uniformObject = Config.Outfits[job][grade][sex]
if uniformObject then
ClearPedBloodDamage(cache.ped)
ResetPedVisibleDamage(cache.ped)
ClearPedLastWeaponDamage(cache.ped)
TriggerEvent('qb-clothing:client:loadOutfit', {outfitData = uniformObject})
else
Core.ShowNotification(locale('no_outfit'), 'error')
end
end
end
Config.CameraShowHelpNotify = function()
if GetResourceState('p_helper') == 'started' then
exports['p_helper']:showHelper({
{
keys = {'X'},
label = 'Cancel'
},
{
keys = {'ENTER'},
label = 'Make Photo'
},
})
else
lib.showTextUI(locale('camera_helper'))
end
end
Config.CameraHideHelpNotify = function()
if GetResourceState('p_helper') == 'started' then
exports['p_helper']:hideHelper()
else
lib.hideTextUI()
end
end
Config.CameraAccess = false
-- YOU CAN SET CAMERA ITEM ACCESS FOR EACH JOB
-- Config.CameraAccess = {
-- ['police'] = 0,
-- ['sheriff'] = 0
-- Bodycam Config
Config.Bodycam = {}
Config.Bodycam.Prop = {
isEnabled = true, -- is prop enabled?
['male'] = {
boneIndex = 24818,
offsetCoords = vector3(0.16683, 0.11320, 0.11986),
offsetRot = vector3(-14.5023, 82.1910, -164.2206),
},
['female'] = {
boneIndex = 24818,
offsetCoords = vector3(0.16683, 0.11320, 0.11986),
offsetRot = vector3(-14.50232, 82.19109, -164.22066),
},
}
Config.Bodycam.JobRestricted = true -- if true player can only check bodycams from he's job, if false he can check bodycams from all jobs
Config.Bodycam.OnStartWatching = function()
-- DO SOMETHING
end
Config.Bodycam.OnStopWatching = function()
-- DO SOMETHING
endInteractions Config
Config.Interactions = {
['PutMouthTape'] = {
label = locale('put_mouth_tape'),
icon = 'fa-solid fa-tape',
distance = 2,
items = 'mouthtape',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 5000,
label = locale('putting_mouth_tape'),
useWhileDead = false,
canCancel = true,
disable = {car = true, move = true, combat = true},
anim = {dict = 'random@train_tracks', clip = 'idle_e',flag = 1},
}) then
TriggerServerEvent('p_policejob/server_interactions/toggleMouthTape', {
player = targetId,
state = true
})
end
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or targetState.carriedBy then return false end
if targetState.isCuffed and not targetState.mouthTaped then return true end
return false
end
},
['RemoveMouthTape'] = {
label = locale('remove_mouth_tape'),
icon = 'fa-solid fa-tape',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 5000,
label = locale('removing_mouth_tape'),
useWhileDead = false,
canCancel = true,
disable = {car = true, move = true, combat = true},
anim = {dict = 'random@train_tracks', clip = 'idle_e',flag = 1},
}) then
TriggerServerEvent('p_policejob/server_interactions/toggleMouthTape', {
player = targetId,
state = false
})
end
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or targetState.carriedBy then return false end
if targetState.mouthTaped then return true end
return false
end
},
['HardCuffPlayer'] = {
label = locale('hard_cuff_player'),
icon = 'fa-solid fa-handcuffs',
distance = 2,
items = 'handcuffs',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local isInFront = utils.isInFront(entity)
TriggerServerEvent('p_policejob:HandCuffs', {
type = 'cuffs', state = true, player = targetId, front = isInFront,
isHard = true
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or targetState.carriedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not targetState.isCuffed and (Player(targetId).state.isDead or Config.Jobs[playerJob.name] or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3)) then
return true
end
return false
end
},
['CuffPlayer'] = {
label = locale('cuff_player'),
icon = 'fa-solid fa-handcuffs',
distance = 2,
items = 'handcuffs',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local isInFront = utils.isInFront(entity)
TriggerServerEvent('p_policejob:HandCuffs', {
type = 'cuffs', state = true, player = targetId, front = isInFront
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or targetState.carriedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not targetState.isCuffed and (Player(targetId).state.isDead or Config.Jobs[playerJob.name] or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3)) then
return true
end
return false
end
},
['UnCuffPlayer'] = {
label = locale('uncuff_player'),
icon = 'fa-solid fa-handcuffs',
distance = 2,
items = 'handcuffs',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:HandCuffs', {
type = 'cuffs', state = false, player = targetId
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
if Player(targetId).state.isCuffed and Player(targetId).state.cuffType ~= 'rope' then
return true
end
return false
end
},
['LockpickHandcuffs'] = {
label = locale('open_cuffs'),
icon = 'fa-solid fa-lock-open',
distance = 2,
items = 'lockpick',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:interactions:OpenCuffs', {
player = targetId
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
if Player(targetId).state.isCuffed and Player(targetId).state.cuffType ~= 'rope' then
return true
end
return false
end
},
['PutPlayerHeadBag'] = {
label = locale('put_player_headbag'),
icon = 'fa-solid fa-eye-slash',
distance = 2,
items = 'headbag',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob/server_interactions/ToggleHeadBag', {
state = true, player = targetId
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or targetState.hasHeadBag then
return false
end
if targetState.isCuffed or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
},
['TakeOffPlayerHeadBag'] = {
label = locale('take_off_player_headbag'),
icon = 'fa-solid fa-eye',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob/server_interactions/ToggleHeadBag', {
state = false, player = targetId
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy or not targetState.hasHeadBag then
return false
end
return true
end
},
['ZipPlayer'] = {
label = locale('zip_player'),
icon = 'fa-solid fa-handcuffs',
distance = 2,
items = 'rope',
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local isInFront = utils.isInFront(entity)
TriggerServerEvent('p_policejob:HandCuffs', {
type = 'rope', state = true, player = targetId,
timer = true, time = 60 * 1000, front = isInFront
})
-- if you dont want to auto remove rope after 5 minutes, set timer to false, time is in minutes, 5 minutes default
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not Player(targetId).state.isCuffed and (
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) or
playerJob.name == 'police'
) then
return true
end
return false
end
},
['UnZipPlayer'] = {
label = locale('unzip_player'),
icon = 'fa-solid fa-handcuffs',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:HandCuffs', {
type = 'rope', state = false, player = targetId
})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
if Player(targetId).state.isCuffed and Player(targetId).state.cuffType == 'rope' then
return true
end
return false
end
},
['SearchPlayer'] = {
label = locale('search_player'),
icon = 'fa-solid fa-wallet',
distance = 2,
onSelect = function(data)
if lib.progressBar({
duration = 5500,
label = locale('searching_player'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true,
},
anim = {
dict = 'anim@gangops@facility@servers@bodysearch@',
clip = 'player_search'
},
}) then
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if
Player(targetId).state.isCuffed or
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) or
Core.isPlayerDead(targetId) then
Inventory.openInventory('player', targetId)
end
end
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
if
Player(targetId).state.isCuffed or
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) or
Core.isPlayerDead(targetId) then
return true
end
return false
end
},
['StartDragPlayer'] = {
label = locale('start_drag'),
icon = 'fa-solid fa-people-pulling',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:DragPlayer', {state = true, player = targetId})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.isCuffed or Core.isPlayerDead(targetId) and not Player(targetId).state.draggedBy then
return true
end
return false
end
},
['StopDragPlayer'] = {
label = locale('stop_drag'),
icon = 'fa-solid fa-people-pulling',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:DragPlayer', {state = false, player = targetId})
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy and Player(targetId).state.draggedBy == cache.serverId then
return true
end
return false
end
},
['OutFromVehicle'] = { -- dont touch this
label = locale('out_player'),
icon = 'fa-solid fa-car',
distance = 2,
onSelect = function(data, seat)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(GetPedInVehicleSeat(entity, seat)))
TriggerServerEvent('p_policejob:OutVehicle', {seat = seat, player = targetId})
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
if not NetworkGetEntityIsNetworked(entity) then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(GetPedInVehicleSeat(entity, seat)))
if Player(targetId).state.isCuffed or Core.isPlayerDead(targetId) then
return true
end
return false
end
},
['PutInVehicle'] = { -- dont touch this
label = locale('put_player'),
icon = 'fa-solid fa-car',
distance = 2,
onSelect = function(data, seat)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:PutInVehicle', {seat = seat, player = targetId})
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.carryingPlayer then
return false
end
local vehicle, coords = lib.getClosestVehicle(GetEntityCoords(cache.ped), 4.0, false)
if not vehicle or vehicle == 0 or not IsVehicleSeatFree(vehicle, seat) or not NetworkGetEntityIsNetworked(vehicle) then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.isCuffed or (targetState.draggedBy and targetState.draggedBy == cache.serverId) or Core.isPlayerDead(targetId) then
return true
end
return false
end
},
['CheckGunPowder'] = {
label = locale('check_gun_powder'),
icon = 'fa-solid fa-gun',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 10000,
label = locale('checking_gun_powder'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:CheckGunPowder', targetId)
end
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not Config.Jobs[playerJob.name] then
return false
end
if Player(targetId).state.isCuffed or Core.isPlayerDead(targetId) or
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
},
['GetPlayerBlood'] = {
label = locale('fetch_blood'),
icon = 'fa-solid fa-eye-dropper',
groups = Config.Jobs,
items = {['stick'] = 1, ['stick_bag'] = 1},
anyItem = true,
distance = 2,
onSelect = function(data)
if Inventory.getItemCount('stick') < 1 or Inventory.getItemCount('stick_bag') < 1 then
return Core.ShowNotification(locale('you_need_stick_and_bag'), 'error')
end
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 10000,
label = locale('fetching_blood'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:GetPlayerBlood', targetId)
end
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not Config.Jobs[playerJob.name] then
return false
end
if Player(targetId).state.isCuffed or Core.isPlayerDead(targetId) or
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
},
['GetPlayerFinger'] = {
label = locale('fetch_finger_print'),
icon = 'fa-solid fa-fingerprint',
groups = Config.Jobs,
items = 'fingerprinter',
distance = 2,
onSelect = function(data)
if Inventory.getItemCount('fingerprinter') < 1 then
return Core.ShowNotification(locale('you_need_finger_printer'), 'error')
end
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 10000,
label = locale('fetching_finger_print'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:GetPlayerFingerPrint', targetId)
end
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if Player(targetId).state.draggedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not Config.Jobs[playerJob.name] then
return false
end
if Player(targetId).state.isCuffed or Core.isPlayerDead(targetId) or
IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
},
['SetPlayerBand'] = {
label = locale('set_gps_band'),
icon = 'fa-solid fa-hands-bound',
groups = Config.Band.Jobs,
items = 'tracking_band',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
if lib.progressBar({
duration = 10000,
label = locale('setting_gps_band'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:SetPlayerBand', {
player = targetId,
state = true
})
end
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy then
return false
end
local playerJob = Core.GetPlayerJob()
if not Config.Jobs[playerJob.name] then
return false
end
local hasBand = targetState.hasTrackingBand
if hasBand then
return false
end
if targetState.isCuffed or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
},
['RemovePlayerBand'] = {
label = locale('remove_gps_band'),
icon = 'fa-solid fa-hands-bound',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local playerJob = Core.GetPlayerJob()
local bandJob = Config.Band.Jobs[playerJob.name]
if bandJob and tonumber(playerJob.grade) >= bandJob then
if lib.progressBar({
duration = 10000,
label = locale('removing_gps_band'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:SetPlayerBand', {
player = targetId,
state = false
})
end
else
TriggerServerEvent('p_policejob:BandAlert', targetId)
local game = lib.skillCheck(
{
{areaSize = 30, speedMultiplier = 1.5},
},
{'1', '2', '3', '4'}
)
if game then
if lib.progressBar({
duration = 10000,
label = locale('removing_gps_band'),
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true
},
anim = {
dict = 'random@train_tracks',
clip = 'idle_e',
flag = 1
},
}) then
TriggerServerEvent('p_policejob:SetPlayerBand', {
player = targetId,
state = false
})
end
end
end
end,
canInteract = function(entity, seat)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local targetState = Player(targetId).state
if targetState.draggedBy then
return false
end
local hasBand = targetState.hasTrackingBand
if hasBand then
return true
end
return false
end
},
['PutPlayerInTrunk'] = {
label = locale('put_player_in_trunk'),
icon = 'fa-solid fa-car',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob/server_trunks/PutPlayerInTrunk', targetId)
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local stateBag = Player(targetId).state
if stateBag.isCuffed or Core.isPlayerDead(targetId) then
local vehicle, _ = lib.getClosestVehicle(GetEntityCoords(cache.ped), 3.5, true)
if vehicle and vehicle ~= 0 then
return true
end
end
return false
end
},
['StartCarryPlayer'] = {
label = locale('start_carry_player'),
icon = 'fa-solid fa-hands-holding',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob/server_interactions/StartCarryPlayer', targetId)
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local stateBag = Player(targetId).state
if stateBag.draggedBy then
return false
end
return true
end
},
['StopCarryPlayer'] = {
label = locale('stop_carry_player'),
icon = 'fa-solid fa-hands-holding',
distance = 2,
onSelect = function(data)
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob/server_interactions/StopCarryPlayer', targetId)
end,
canInteract = function(entity)
if exports['p_policejob']:inTrunk() then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local stateBag = Player(targetId).state
if stateBag.carriedBy and stateBag.carriedBy == cache.serverId then
return true
end
return false
end
},
['SendToJail'] = {
label = locale('send_to_jail'),
icon = 'fa-solid fa-hashtag',
distance = 2,
groups = Config.Jobs,
onSelect = function(data)
local input = lib.inputDialog(locale('send_to_jail'), {
{type = 'number', label = locale('jail_time'), icon = 'clock', default = 0, min = 0, max = 500, required = false},
{type = 'number', label = locale('jail_fine'), icon = 'dollar-sign', default = 1, min = 1, required = true},
{type = 'textarea', label = locale('jail_reason'), icon = 'receipt', required = true}
})
if not input then return end
local entity = type(data) == 'number' and data or data.entity
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
TriggerServerEvent('p_policejob:JailPlayer', {
player = targetId,
jail = input[1],
fine = input[2],
reason = input[3]
})
end,
canInteract = function(entity)
if not Config.Jail.EnableJail then return false end
if Config.PoliceMDT or exports['p_policejob']:inTrunk() then return false end
local targetId = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity))
local stateBag = Player(targetId).state
if stateBag.isCuffed or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return true
end
return false
end
}
}
Config.CuffsAsItem = true -- set to true if you want to use handcuffs as item (target will be available too)
Config.CuffItemCheck = function(entity, playerId)
local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
return false
end
local targetState = Player(playerId).state
if targetState.draggedBy or targetState.carriedBy then
return false
end
if Player(playerId).state.isCuffed then
return 'uncuff'
else
local playerJob = Core.GetPlayerJob()
if Player(playerId).state.isDead or Config.Jobs[playerJob.name] or IsEntityPlayingAnim(entity, "random@mugging3", "handsup_standing_base", 3) then
return 'cuff'
end
end
return false
end
Config.Carry = {
useRequest = true, -- if true other player need to accept carry request
stopCarryKey = 'E', -- set key to stop carry [FOR EXAMPLE 'E']
onStartCarrying = function(playerId, role)
if role == 'carrying' then
lib.showTextUI('[E] - Stop carry')
end
end,
onStopCarrying = function(playerId, role)
if role == 'carrying' then
lib.hideTextUI()
end
end,
onRequest = function(playerId)
local useAlert = false -- SET TO TRUE IF YOU WANT TO USE ALERT DIALOG
if not useAlert then
local result = false
local timer = 0
Core.ShowNotification(locale('player_request_carry', playerId))
while timer < 500 do
Citizen.Wait(1)
timer += 1
if IsControlJustReleased(0, 38) then
result = true
break
end
end
return result
else
local alert = lib.alertDialog({
header = locale('carry_person_request'),
content = locale('carry_person_request_info', playerId),
centered = true,
cancel = true
})
return alert == 'confirm'
end
end,
animation = {
carried = {
dict = 'nm',
clip = 'firemans_carry',
flag = 33,
offset = {
coords = vector3(0.25, -0.05, 0.63),
rotation = vector3(0.25, 0.0, 180.0)
}
},
carrying = {
dict = 'missfinale_c2mcs_1',
clip = 'fin_c2_mcs_1_camman',
flag = 49
}
}
}
Config.LockpickCuffs = {
miniGame = function()
local game = lib.skillCheck(
{
{areaSize = 30, speedMultiplier = 1.5},
{areaSize = 30, speedMultiplier = 1.5},
{areaSize = 30, speedMultiplier = 1.5},
{areaSize = 30, speedMultiplier = 1.5},
{areaSize = 30, speedMultiplier = 1.5},
},
{'1', '2', '3', '4'}
)
return game
end,
animation = {
enabled = true,
dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@',
clip = 'machinic_loop_mechandplayer',
flag = 49
}
}
Config.DisableKeys = {
['hardcuff'] = { -- THIS IS ENABLED KEYS WHILE HARD CUFF !!!!!!!!!!!!!!!!!!!!!!!!!
0, 1, 2, 249
},
['cuff'] = {
24, 257, 25, 263, 45, 22, 44, 37, 23, 21, 288, 289, 170, 75,
167, 73, 199, 59, 71, 72, 47, 264, 257, 140, 141, 142, 143
},
['drag'] = {
24, 257, 25, 263, 45, 22, 44, 37, 23, 21, 288, 289, 170, 75,
167, 73, 199, 59, 71, 72, 47, 264, 257, 140, 141, 142, 143
}
}
Config.OnPlayerCuff = function()
local playerPed = cache.ped
SetEnableHandcuffs(playerPed, true)
DisablePlayerFiring(playerPed, true)
SetCurrentPedWeapon(playerPed, `WEAPON_UNARMED`, true)
SetPedCanPlayGestureAnims(playerPed, false)
LocalPlayer.state.invBusy = true
LocalPlayer.state.invHotkeys = false
LocalPlayer.state.canUseWeapons = false
lib.disableRadial(true)
if GetResourceState('ox_target') == 'started' then
exports['ox_target']:disableTargeting(true)
elseif GetResourceState('qb-target') == 'started' then
exports['qb-target']:AllowTargeting(false)
end
if GetResourceState('lb-phone') == 'started' then
exports["lb-phone"]:ToggleDisabled(true)
end
end
Config.OnPlayerUnCuff = function()
local playerPed = cache.ped
SetEnableHandcuffs(playerPed, false)
DisablePlayerFiring(playerPed, false)
SetPedCanPlayGestureAnims(playerPed, true)
LocalPlayer.state.invBusy = false
LocalPlayer.state.invHotkeys = true
LocalPlayer.state.canUseWeapons = true
lib.disableRadial(false)
if GetResourceState('ox_target') == 'started' then
exports['ox_target']:disableTargeting(false)
elseif GetResourceState('qb-target') == 'started' then
exports['qb-target']:AllowTargeting(true)
end
if GetResourceState('lb-phone') == 'started' then
exports["lb-phone"]:ToggleDisabled(false)
end
end
Config.OnStartPlayerDrag = function()
LocalPlayer.state.invBusy = true
LocalPlayer.state.invHotkeys = false
LocalPlayer.state.canUseWeapons = false
lib.disableRadial(true)
if GetResourceState('ox_target') == 'started' then
exports['ox_target']:disableTargeting(true)
elseif GetResourceState('qb-target') == 'started' then
exports['qb-target']:AllowTargeting(false)
end
if GetResourceState('lb-phone') == 'started' then
exports["lb-phone"]:ToggleDisabled(true)
end
end
Config.OnStopPlayerDrag = function()
LocalPlayer.state.invBusy = false
LocalPlayer.state.invHotkeys = true
LocalPlayer.state.canUseWeapons = true
lib.disableRadial(false)
if GetResourceState('ox_target') == 'started' then
exports['ox_target']:disableTargeting(false)
elseif GetResourceState('qb-target') == 'started' then
exports['qb-target']:AllowTargeting(true)
end
if GetResourceState('lb-phone') == 'started' then
exports["lb-phone"]:ToggleDisabled(false)
end
eGPS Config
Config.GPS = {}
Config.GPS.NeedDuty = true -- true | false (need to be on duty to turn on/off gps?)
Config.GPS.ShortRange = true -- only visible closests blips on minimap
Config.GPS.RefreshRate = 2500 -- 2.5s
Config.GPS.UseCallSign = false -- true (use job call sign setted by /callsign ?) | false
Config.GPS.Jobs = {
['police'] = { -- YOU CAN USE GPS FOR DIFFERENT JOBS ALSO (MECHANIC, EMS, ETC)
color = 63,
lights = 1,
display = 'LSPD',
types = {
onFoot = {
color = 63,
lights = 1,
sprite = 1,
scale = 1.1,
heading = true
},
inVeh = {
color = 63,
lights = 1,
sprite = 56,
scale = 1.1,
heading = true
},
boat = {
color = 63,
lights = 1,
sprite = 427,
scale = 1.1,
heading = true
},
plane = {
color = 63,
lights = 1,
sprite = 43,
scale = 1.1,
heading = true
},
heli = {
color = 63,
lights = 1,
sprite = 43,
scale = 1.1,
heading = true
},
bike = {
color = 63,
lights = 1,
sprite = 1,
scale = 1.1,
heading = true
},
}
},
}Garage Config
Config.Garage = {}
Config.Garage.CreateVehicleKeys = function(plate, model, netId)
if GetResourceState('p_carkeys') == 'started' then
TriggerServerEvent('p_carkeys:CreateKeys', plate)
elseif GetResourceState('wasabi_carlock') == 'started' then
exports['wasabi_carlock']:GiveKey(plate)
elseif GetResourceState('qs-vehiclekeys') == 'started' then
exports['qs-vehiclekeys']:GiveKeys(plate, model, true)
elseif GetResourceState('tgiann-hotwire') == 'started' then
exports["tgiann-hotwire"]:GiveKeyPlate(plate, true)
elseif GetResourceState('qbx_vehiclekeys') == 'started' then
TriggerEvent('qb-vehiclekeys:client:AddKeys', plate)
elseif GetResourceState('qb-vehiclekeys') == 'started' then
TriggerEvent('qb-vehiclekeys:client:AddKeys', plate)
end
end
Config.Garage.RemoveVehicleKeys = function(plate, model, netId)
if GetResourceState('p_carkeys') == 'started' then
TriggerServerEvent('p_carkeys:RemoveKeys', plate)
elseif GetResourceState('wasabi_carlock') == 'started' then
exports['wasabi_carlock']:RemoveKey(plate)
elseif GetResourceState('qs-vehiclekeys') == 'started' then
exports['qs-vehiclekeys']:RemoveKeys(plate, model)
elseif GetResourceState('tgiann-hotwire') == 'started' then
exports["tgiann-hotwire"]:GiveKeyPlate(plate, true)
elseif GetResourceState('qb-vehiclekeys') == 'started' then
TriggerEvent('qb-vehiclekeys:client:RemoveKeys', plate)
elseif GetResourceState('qbx_vehiclekeys') == 'started' then
TriggerEvent('qb-vehiclekeys:client:RemoveKeys', plate)
end
end
Config.Garage.CustomLabels = { -- FOR OWNED VEHICLES ONLY
['police'] = 'Police Vehicle',
['police2'] = 'Police Vehicle 2'
}
Config.Garage.CustomImages = {
-- ['police'] = 'LINK TO IMAGE', -- set here link to image, it can be fivemanage :)
-- ['police2'] = 'LINK TO IMAGE',
-- ['police3'] = 'LINK TO IMAGE',
}
Config.Garage.Garages = {
['Mission_Row'] = {
-- vehicles = { -- UNCOMMENT THIS IF YOU WANT VEHICLE SPAWNER
-- ['police'] = {
-- [0] = { -- FROM GRADE 0 CAN TAKE THIS VEHICLES
-- ['police'] = 'Police Vehicle' -- spawn name and display name
-- },
-- [1] = { -- FROM GRADE 1 CAN TAKE THIS VEHICLES
-- ['police'] = 'Police Vehicle', -- spawn name and display name
-- ['police2'] = 'Police Vehicle 2' -- spawn name and display name
-- }
-- }
-- },
ped = {
model = 's_m_y_cop_01',
anim = {dict = 'amb@world_human_cop_idles@male@idle_b', clip = 'idle_e'}
},
coords = vector4(434.6770, -1029.1232, 28.9886, 0.0),
allowedJobs = {
['police'] = 0,
['sheriff'] = 0
},
blip = { -- only visible for allowed jobs
sprite = 357,
scale = 0.75,
color = 3,
label = 'Mission Row Garage'
},
spawnPoints = {
vector4(431.7113, -1027.2172, 28.9471, 179.8748),
vector4(427.6960, -1027.6909, 28.9821, 182.6840),
vector4(424.0269, -1028.0519, 29.0469, 184.6641),
vector4(420.0333, -1028.3597, 29.1166, 186.3764),
vector4(416.5734, -1028.6340, 29.1769, 185.2027)
}
}
}Extras Config
Config.Extras = {}
Config.Extras.Points = {
['Mission_Row'] = {
coords = vector3(426.8506, -1023.1243, 28.8620),
allowedJobs = {
['police'] = 0, -- job name and grade
['sheriff'] = 0
}
}
}
Config.Extras.Callsigns = { -- THIS IS READY FOR SEB5A POLICE VEHICLE PACK
['cvpi'] = {
[1] = 10, -- FIRST NUMBER = 10TH VEHICLE MOD IN cvpi VEHICLE MODEL
[2] = 9, -- SECOND NUMBER = 9TH VEHICLE MOD IN cvpi VEHICLE MODEL
[3] = 8 -- THIRD NUMBER = 8TH VEHICLE MOD IN cvpi VEHICLE MODEL
},
['emstahoe'] = {
[1] = 10,
[2] = 9,
[3] = 8
},
['polbuffalo4'] = {
[1] = 8,
[2] = 9,
[3] = 10
},
['polgranger2'] = {
[1] = 8,
[2] = 9,
[3] = 10
},
['policeexp'] = {
[1] = 10,
[2] = 9,
[3] = 8
},
['polscout'] = {
[1] = 8,
[2] = 9,
[3] = 10
},
['poltorrence'] = {
[1] = 8,
[2] = 9,
[3] = 10
},
['polvigero'] = {
[1] = 8,
[2] = 9,
[3] = 10
},
}Last updated