[Release] [ESX] [Police Job]

Why are you using 2 police jobs?

because i add second script for Gendarmerie and they work fine together just the garage does’t work. it work when i stop one of scripts

HELPPP HUHUHU :frowning:

hi guys i would like to buy items from armory not weapons somebody can help me to do this? kind regards

Change giveweapon to giveitem

image

any help a get this error when i want withdraw item in police stock

i tried but it doesnt work, where i have to change it exactly?

need to change in the new esx format xPlayer canCarryItem …

Who knows how to change the uniforms? if i change outfit it also change the character. who knows? heeelp

i fix it just remplace in server/main.lua

AddEventHandler('esx_policejob:getStockItem', function(itemName, count)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local sourceItem = xPlayer.getInventoryItem(itemName)

	TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory)
		local inventoryItem = inventory.getItem(itemName)

		-- is there enough in the society?
		if count > 0 and inventoryItem.count >= count then

			-- can the player carry the said amount of x item?
			if sourceItem.limit ~= -1 and (sourceItem.count + count) > sourceItem.limit then
				TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
			else
				inventory.removeItem(itemName, count)
				xPlayer.addInventoryItem(itemName, count)
				TriggerClientEvent('esx:showNotification', _source, _U('have_withdrawn', count, inventoryItem.label))
			end
		else
			TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
		end
	end)
end)

into this

AddEventHandler('esx_policejob:getStockItem', function(itemName, count)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local sourceItem = xPlayer.getInventoryItem(itemName)

	TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory)
		local inventoryItem = inventory.getItem(itemName)
		if count > 0 and inventoryItem.count >= count then
			if xPlayer.canCarryItem(itemName, count) then
				inventory.removeItem(itemName, count)
				xPlayer.addInventoryItem(itemName, count)
				TriggerClientEvent('esx:showNotification', _source, _U('have_withdrawn', count, inventoryItem.label))
			else
				TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
			end
		else
			TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
		end
	end)
end)  
2 Likes

i want to get police vehicles and weapons without buy it

use older version of esx_policejob

when i’m in vehicleshop i’m stucked there and can’t see the menu to buy . any solution ? i’m using the last version

2 Likes

How do you cuff people using this?

Hello i search all forum about solution but nothing.
My problem is doesnt work sometimes cuff/uncuff and doesnt work escort, put in vehicle , drag out from vehicle.
Have anyone solution on this?

I want to change the money used when buying weapons.
I want use the society money instead the own money of buyer.

still searching a way for buy items from armory. I dont need to buy weapons just need to buy items thank you

i have a question if im a policeman and i buy policecar during job why when i change job i can find the police car in the garage?

Is there a Police Menu better then this system? Esx seems buggy. Menu freeze’s up and more. Or if someone can help me set up and learn this. That be great. but so far. seems buggy.

So when adding more category’s to the fines list, It says ā€˜Translation [en] (Name of category) does not exist’

If anyone knows the fix for this, please let me know asap.