How to add more jobs to ESX_ScoreBoard?

Hey

I was wondering how i could add more jobs to esx_scoreboard.
Here is the link:

2 Likes

Probably in the html file, also dont forget to update the js script aswell. that is for it to work!

2 Likes

He this is what i edited in the JS file:

		case 'updatePlayerJobs':
			var jobs = event.data.jobs;

			$('#player_count').html(jobs.player_count);

			$('#ems').html(jobs.ems);
			$('#police').html(jobs.police);
			$('#taxi').html(jobs.taxi);
			$('#mechanic').html(jobs.mechanic);
			$('#cardealer').html(jobs.cardealer);
			$('#estate').html(jobs.estate);
			$('#banker').html(jobs.banker);
			break;

This is what i edited in HTML :

	<div class="header">
		<div class="jobs">
			<p style="color:red;"> 👨‍⚕️ <span id="ems">0</span> </p>
			<p style="color:#5ea1e0;"> 👮🏻 <span id="police">0</span> </p>
			<p style="color:yellow;"> 🚕 <span id="taxi">0</span> </p>
			<p style="color:grey;"> 🔧 <span id="mechanic">0</span> </p>
			<p style="color:lightblue;"> 🚗 <span id="cardealer">0</span> </p>
			<p style="color:#58ce93;"> 🏘️ <span id="estate">0</span> </p>
			<p style="color:#4ebf24;"> 💸 <span id="banker">0</span> </p>
		</div>
	</div>

This in Client.lua

	players = players + 1

	if v.job == 'ambulance' then
		ems = ems + 1
	elseif v.job == 'police' then
		police = police + 1
	elseif v.job == 'taxi' then
		taxi = taxi + 1
	elseif v.job == 'mecano' then
		mechanic = mechanic + 1
	elseif v.job == 'cardealer' then
		cardealer = cardealer + 1
	elseif v.job == 'realestateagent' then
		estate = estate + 1
	elseif v.job == 'banker' then
		banker= banker + 1
	end
end

But it broke the whole script

1 Like

I have this aswell!

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