[Release] [ESX] [Police Job]

Hello @Pandorax , I only have access to delete licenses, not to add them. Might you help me?

function ShowPlayerLicense(player)
	local elements = {}
	local targetName
	ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(data)
		if data.licenses then
			for i=1, #data.licenses, 1 do
				if data.licenses[i].label and data.licenses[i].type then
					table.insert(elements, {
						label = data.licenses[i].label,
						type = data.licenses[i].type
					})
				end
			end
		end
		
		if Config.EnableESXIdentity then
			targetName = data.firstname .. ' ' .. data.lastname
		else
			targetName = data.name
		end
		
		ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_license',
		{
			title    = _U('license_revoke'),
			align    = 'top-left',
			elements = elements,
		}, function(data, menu)
			ESX.ShowNotification(_U('licence_you_revoked', data.current.label, targetName))
			TriggerServerEvent('esx_policejob:message', GetPlayerServerId(player), _U('license_revoked', data.current.label))
			
			TriggerServerEvent('esx_license:removeLicense', GetPlayerServerId(player), data.current.type)
			
			ESX.SetTimeout(300, function()
				ShowPlayerLicense(player)
			end)
		end, function(data, menu)
			menu.close()
		end)

	end, GetPlayerServerId(player))
end

Is there a way we can upgrade/add extras to police vehicles within the police garages?

When i go into armory in police house and try enter “Buy weapons” menu it dosent happend anything, is this known issue? i got latest version :confused:

My weapon shop etc works fine but not the armory for the cops

I can start as a cop, can’t go no duty but when I go to the police station nothing is right, sometimes I fall through the map. I finally made it inside but it’s just hollow and glitched, can’t seem to find anything about it. Help, please.

I’ve got everything working except for buying weapons from the Armoury.
Every option works, withdraw, place, etc. but when I press Enter on the buy button, it gives me a resource loading time error/warning in the bottom right corner regarding menu_default or whatever.

I am comparing it to the original code, and I can’t see anything that I may have done wrong.

Any help would be wicked!

Try this.

Im having an issue would appreciate and suggestions. Cop blips seem to not work? Im unable to see other people who are also police on the map and in my config it is set to true. Unsure of what to do here

Config.EnableJobBlip = true

Hi, it does not let me see the boss point even if the coordinates are right.

What I do?

hey guys could any one help when i change ped in the changing room all my weapons dissapear what do i need to change any one has any idiea? would really appreaciate it

Anyone knows if es_extended gonna be updated? i got the error on line 1273 about GetWeapon when trying to access “Buy Weapons” via armory, got some issues with it :confused:

did you write the name in caps ?

ı need the help
I’ve added a new rank, but this time the police menu of any rank doesn’t work help me
ı think ıguess I couldn’t do this job.

Fixed old error by updating version

But now new problem

When using F6 menu with an player gives me an error “No players nearby” error only even when i have players standing just in front of me, cant use any commands handcuff / search etc etc, im running 64 slot server is it Onesync that bugs it?

did you find a fix for this? none of my weapons show up either

Yea like i typed, updated to latest version and it worked

image

When I tip command /setjob 1 police 0
It show this.
How do i fix it?

@973ce59a82bc8a9b3eeb look in the database in table jobs and look if there is an entry with the column name saying police. if not, make sure you run the sql file included in the files.

Thx i saw it show error

INSERT INTO addon_account (name, label, shared) VALUES
(‘society_police’, ‘Police’, 1)

#1062 - Duplicate entry ‘society_police’ for key ‘PRIMARY’
How i fix that?

thats because this entry is already in the database. try removing “INSERT INTO addon_account (name, label, shared) VALUES
(‘society_police’, ‘Police’, 1)” out of the sql file. and run it again

is it possible to remove the markers for cars/weapons ect?