[Release] [ESX] [Police Job]

Anyone know why when a cop confiscates items/money/guns it says the suspect is the one confiscating from himself.

Abit of the code where I think the problem lies, just don’t have enough LUA experience to figure it out.

RegisterServerEvent('esx_policejob:confiscatePlayerItem')
AddEventHandler('esx_policejob:confiscatePlayerItem', function(target, itemType, itemName, amount)

  local sourceXPlayer = ESX.GetPlayerFromId(source)
  local targetXPlayer = ESX.GetPlayerFromId(target)

  if itemType == 'item_standard' then

    local label = sourceXPlayer.getInventoryItem(itemName).label
    local playerItemCount = targetXPlayer.getInventoryItem(itemName).count

    if playerItemCount <= amount then
      targetXPlayer.removeInventoryItem(itemName, amount)
      sourceXPlayer.addInventoryItem(itemName, amount)
    else
      TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity'))
    end

    TriggerClientEvent('esx:showNotification', sourceXPlayer.source, _U('you_have_confinv') .. amount .. ' ' .. label .. _U('from') .. targetXPlayer.name)
    TriggerClientEvent('esx:showNotification', targetXPlayer.source, '~b~' .. targetXPlayer.name .. _U('confinv') .. amount .. ' ' .. label )

  end

  if itemType == 'item_account' then

    targetXPlayer.removeAccountMoney(itemName, amount)
    sourceXPlayer.addAccountMoney(itemName, amount)

    TriggerClientEvent('esx:showNotification', sourceXPlayer.source, _U('you_have_confdm') .. amount .. _U('from') .. targetXPlayer.name)
    TriggerClientEvent('esx:showNotification', targetXPlayer.source, '~b~' .. targetXPlayer.name .. _U('confdm') .. amount)

  end

I do not have or can not see these blips: -Dressing Room/Armory/Helicopter/Vehicle blips at the police station.
Can somebody help me please?

1 Like

i want remove wanted for police and army

enable for users only

Hey. Do you guys know is there option to make cops blips for this script ?

How to change the cars in the police garage?

Police F6 menu is sometimes not working correct. Example: Id en searching are bugging sometimes.

Same here. It’s not working for us and we have not altered the files.

How do they bug out?

1 Like

CHECK LICENSE AND SEARCH NOT WORKING FOR PLAYERS

Credit to @UpTime for resolving this issue. Here’s what fixed the issue.

Remove the Following from SQL:
- Licenses
- user_licenses

Remove the Following from server.cfg
- esx_licenses

Make sure the following booleans are configured:

  • esx_weashops\config.lua
    change line 7: Config.EnableLicense = false

  • esx_policejob\config.lua
    change line 11: Config.EnableLicneses = false

Delete Cache
Start esx.cmd
restart sessionmanager
… profit

1 Like

Has anyone found a solution to people who get arrested, their cuffs just disappear and arent cuffed anymore?

Also; Ive noticed an issue where once a civ is placed in a vehicle, it just kicks them out.

Everything running without errors, guys its up to you…

1000 Thanks for you!!! This is working for me

im having an issue where i cuff someone and put them in vehicle and they can press F and get out while cuff if someone could help i would appreciate this because i have been stuck on this for long time it is important to me

For the client main.lua, this is what I changed it all to for English. I use it on my server and I get no issues. Also used this modification with the Captain14 car script pack and I have not tested it without that car pack so gl.

local elements = {}

    table.insert(elements, { label = 'Bike', value = 'fixter' })
    table.insert(elements, { label = 'Cruiser', value = 'police' })
    table.insert(elements, { label = 'Sheriff Cruiser', value = 'sheriff' })

    if PlayerData.job.grade_name == 'officer' then
      table.insert(elements, { label = 'Sheriff Tahoe SUV', value = 'sheriff2'})
      table.insert(elements, { label = 'Ford Explorer Interceptor', value = 'police3'})
      table.insert(elements, { label = 'Dodge Charger', value = 'police2'})
      table.insert(elements, { label = 'Motorcycle', value = 'policeb'})
      table.insert(elements, { label = 'Prison Bus', value = 'pbus'})
      table.insert(elements, { label = 'Transporting bus', value = 'policet'})
      table.insert(elements, { label = 'Riot Truck', value = 'riot'})
      table.insert(elements, { label = 'Unmarked Charger', value = 'fbi'})
      table.insert(elements, { label = 'Unmarked Tahoe', value = 'fbi2'})
      table.insert(elements, { label = 'Crown Victoria', value = 'police7'})
      table.insert(elements, { label = 'Sheriff Dodge Charger', value = 'sheriff'})
    end

    if PlayerData.job.grade_name == 'sergeant' then
      table.insert(elements, { label = 'Sheriff Tahoe SUV', value = 'sheriff2'})
      table.insert(elements, { label = 'Ford Explorer Interceptor', value = 'police3'})
      table.insert(elements, { label = 'Dodge Charger', value = 'police2'})
      table.insert(elements, { label = 'Motorcycle', value = 'policeb'})
      table.insert(elements, { label = 'Prison Bus', value = 'pbus'})
      table.insert(elements, { label = 'Transporting bus', value = 'policet'})
      table.insert(elements, { label = 'Riot Truck', value = 'riot'})
      table.insert(elements, { label = 'Unmarked Charger', value = 'fbi'})
      table.insert(elements, { label = 'Unmarked Tahoe', value = 'fbi2'})
      table.insert(elements, { label = 'Crown Victoria', value = 'police7'})
      table.insert(elements, { label = 'Sheriff Dodge Charger', value = 'sheriff'})
    end

    if PlayerData.job.grade_name == 'lieutenant' then
      table.insert(elements, { label = 'Sheriff Tahoe SUV', value = 'sheriff2'})
      table.insert(elements, { label = 'Ford Explorer Interceptor', value = 'police3'})
      table.insert(elements, { label = 'Dodge Charger', value = 'police2'})
      table.insert(elements, { label = 'Motorcycle', value = 'policeb'})
      table.insert(elements, { label = 'Prison Bus', value = 'pbus'})
      table.insert(elements, { label = 'Transporting bus', value = 'policet'})
      table.insert(elements, { label = 'Riot Truck', value = 'riot'})
      table.insert(elements, { label = 'Unmarked Charger', value = 'fbi'})
      table.insert(elements, { label = 'Unmarked Tahoe', value = 'fbi2'})
      table.insert(elements, { label = 'Crown Victoria', value = 'police7'})
      table.insert(elements, { label = 'Sheriff Dodge Charger', value = 'sheriff'})
    end

    if PlayerData.job.grade_name == 'boss' then
      table.insert(elements, { label = 'Sheriff Tahoe SUV', value = 'sheriff2'})
      table.insert(elements, { label = 'Ford Explorer Interceptor', value = 'police3'})
      table.insert(elements, { label = 'Dodge Charger', value = 'police2'})
      table.insert(elements, { label = 'Motorcycle', value = 'policeb'})
      table.insert(elements, { label = 'Prison Bus', value = 'pbus'})
      table.insert(elements, { label = 'Transporting bus', value = 'policet'})
      table.insert(elements, { label = 'Riot Truck', value = 'riot'})
      table.insert(elements, { label = 'Unmarked Charger', value = 'fbi'})
      table.insert(elements, { label = 'Unmarked Tahoe', value = 'fbi2'})
      table.insert(elements, { label = 'Crown Victoria', value = 'police7'})
      table.insert(elements, { label = 'Sheriff Dodge Charger', value = 'sheriff'})
    end

Hi, can please some1 tell me how can i change the police outfits /clothes / uniforms ??
I tryed out the replace way but the “Police Peds/NPC’s” have the new Portuguese Police Uniforms, but when i enter the police station and change my clothes on the blip point it just give me the GTA V original Police uniform !! HELP PLEASE

3 Likes

https://gyazo.com/1a1d1cbc15eb16ac030e4e23a766965a

Hey im having a hard time adding a custom clothing to the cloakroom with the modelname s_m_y_cop_01 i have streamed it and i can see npc police having that uniform can someone help me with this?

Little Problem when im in game i press f6 and the menu show like 1 sec and not open help

in client folder line 661

When i enable esx_identity in esx_policejob/config.lua and then when i restart the server and want to see ID. Then the buttons for Search inventory and see ID will not work. What have i done wrong?