ESX Slaughterer Job Without Job Center

How do I make the ESX Slaughterer Job work by itself without using the job center. I just want the blip to show up for everyone and allow them to become the job without using the job center. Could someone please tell me how I do this, it seems very simple. I am new to FiveM development so I apologize for my incompetence. If someone could please reach out to me or explain in detail below I would greatly appreciate it.

BEDCORN
#9861

You could check the code for that specific job, and try to remove it’s dependencies in relation to the job center.

So for example in the function that is responsible for the blips (that usually only works if your job == ‘slaughterer’) will work regardless of your jobs so blips are always visible.

That’s just one example, but basically try and remove it’s dependency on the job center.

Good luck!

The onDuty variable? (Here are all of the cases I found for it) [/esx_jobs/client/main.lua]

if data.current.value == 'citizen_wear' then
			onDuty = false
			ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
				TriggerEvent('skinchanger:loadSkin', skin)
			end)
		elseif data.current.value == 'job_wear' then
			onDuty = true
			ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
				if skin.sex == 0 then
					TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male)
				else
					TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female)
				end
			end)
		end
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
	PlayerData.job = job
	onDuty = false
	myPlate = {} -- loosing vehicle caution in case player changes job.
	spawner = 0
	deleteBlips()
	refreshBlips()
end)
-- Display markers (only if on duty and the player's job ones)
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1)
		local zones = {}
-
		if PlayerData.job ~= nil then
			for k,v in pairs(Config.Jobs) do
				if PlayerData.job.name == k then
					zones = v.Zones
				end
			end

			local coords = GetEntityCoords(PlayerPedId())
			for k,v in pairs(zones) do
				if onDuty or v.Type == "cloakroom" or PlayerData.job.name == "reporter" then
					if(v.Marker ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then
						DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false)
					end
				end
			end
		end
	end
end)
if IsControlJustReleased(0, Keys['E']) and not menuIsShowed and isInMarker then
					if onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter" then
						TriggerEvent('esx_jobs:action', job, zone)
					end
				end
-- hide or show top left zone hints
				if isInMarker and not menuIsShowed then
					hintIsShowed = true
					if (onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter") and zone.Type ~= "vehdelete" then
						hintToDisplay = zone.Hint
						hintIsShowed = true
					elseif zone.Type == "vehdelete" and (onDuty or PlayerData.job.name == "reporter") then
						local playerPed = PlayerPedId()
elseif onDuty and zone.Spawner ~= spawner then
						hintToDisplay = _U('wrong_point')
						hintIsShowed = true
					else

Sorry for the spam code, I just need a little more guidance because I haven’t been able to do it myself.

Okay so either you make the code not dependant on the onDuty parameter by deleting it, or you make it always true.

You sent a lot of code and I really don’t have time to look into each one separately but I hope you get what I mean in terms of the parameter.

Good luck! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.