[Release] [ESX] [Police Job]

I just want the recruits and officers not to be able to wear swat clothing, and that the rider swat clothing is off at officer plus recruit but swatt is stupid to steer

How to disable Weapon Buy menu, and enable this only for boss?

in config

how do make a blip for spawning helicopters

can someone help me how do i remove the option to buy cars

Use an older version of the script

hi,i dont know where im wrong, and already doing research, but still not found how to make this working, my problem is, when i go to locker room, i cannot change the outfit or anything, when i choose police outfit nothing happen/

here my config

Config.EnablePlayerManagement     = true
Config.EnableArmoryManagement     = true
Config.EnableESXIdentity          = true -- 
Config.EnableLicenses             = true --

Config.EnableHandcuffTimer        = true -- 
Config.HandcuffTimer              = 10 * 

Config.EnableJobBlip              = false -- 
Config.EnableCustomPeds           = false -- 

Config.EnableESXService           = true -- 
Config.MaxInService   

i cant acess to id card and search, someon help?

I have the same problem, but only with some people. And manage licenses doesn’t work too.

I have the same problem about ID card and search, manage license…

Same here

In older versions the ID and Search functions seemed to work just fine. I have tried to compare files from older versions of policejob with the current one but have no clue where to look for the problem. I very little experience coding in Lua.

I am currently using an older version for now but would love to have the functionality of the newest version if this could get sorted.

I am curious if it is related to esx_identity or esx_kashacters. I have had issues with the two conflicting and had to disable esx_identity. How many of us who have problems with search and checking ID’s are using esx_kashacters?

Maybe it is connected?

Just want to inform everyone that this little code here, will delay your server, It won’t delay your server if you have no players, so it will most likely happen above 46+ players.

So this where it starts.

RegisterNetEvent('esx:setJob') -- Called when changing jobs
AddEventHandler('esx:setJob', function(job)
	ESX.PlayerData.job = job

	Citizen.Wait(5000)
	TriggerServerEvent('esx_policejob:forceBlip')
end)

--- This one is located in server scripts
RegisterNetEvent('esx_policejob:forceBlip') 
AddEventHandler('esx_policejob:forceBlip', function()
	TriggerClientEvent('esx_policejob:updateBlip', -1)
end)

This where the magic happens

RegisterNetEvent('esx_policejob:updateBlip')
AddEventHandler('esx_policejob:updateBlip', function()

	-- Refresh all blips
	for k, existingBlip in pairs(blipsCops) do
		RemoveBlip(existingBlip)
	end

	-- Clean the blip table
	blipsCops = {}

	-- Enable blip?
	if Config.EnableESXService and not playerInService then
		return
	end

	if not Config.EnableJobBlip then
		return
	end

	-- Thia is the code that will delay your server, 
-- so if you just copy pasta this code for other jobs then your fucked. 
	if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' then
		ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
			for i=1, #players, 1 do
				if players[i].job.name == 'police' then
					local id = GetPlayerFromServerId(players[i].source)
					if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
						createBlip(id)
					end
				end
			end
		end)
	end

end)

I only have esx_identity and it still doesn’t work… I managed to make the id part work with esx_policejob with an external script but the solution to the issiue of searching and the managing of licences is still unknown to me.

I think the ESX team messed something up, but I sure as hell hope so they fix it quick, because It’s delaying our server launch.

I am using version 1.2 right now and it seems to work for the most part with the exception of not being able to run a plate from inside the police car. You have to be standing next to the car and use the “vehicle interaction” menu to find out if it is stolen or who it belongs to. That’s the only issue we have discovered with 1.2 so far.

Amd you’re using the latest eseentials? Because esx_policejob 1.2 didn’t work for me… The police vehocle shop didn’t open and it showed a es_extendes error.

I am actually using version 6.2.2 because I tried to update and it caused more problems with other scripts I am using. I plan to update it later after I get more things worked out on the server since I am still in the process of building my server. If I run into problems when I update then I may end up sticking with a previous version because it simply works.

does anyone have a /fine snippet that takes right from the bank

Im having a problem that it seems like many are having. When I search someone I can take Weapons and Dirty money thats it. Cant take any items from the players at all end up with – SCRIPT ERROR: @esx_policejob/server/main.lua:31: attempt to call a nil value (field ‘canCarryItem’)

anyone else have this problem ? I use Zap and have everything updated

Are you using es_extended with weight? Or with limit?

  • December 7th, esx_policejob updated to support weight instead of limit. (If you’re using limit still then you need to go to an earlier commit.)