(CLOSE) How do i get this in F2 menu

help
developer
needhelp

#1

Hi, I’m playing some servers that have their jobs on their f2 menu, As said esx_menu_default, or whatever it is!

I wonder now if anyone can write how to add it!


#2

Can you be more specific?


#3

#4

So you basicly want to display your current job into your personal inventory?


#5

Yes man! I i will, I think its very cool


#6

Alright, I supose you’re familiar to coding, So just simply add the code in

es_extended > client > functions.lua

You should add you code between line 1081- 1147


#7

I will do it soon, Im right in a police scenario on fivem just now :wink:


#8

There is one problem left, I dont know what the code i will write :confused:


#9

I believe these 2 display the xPlayers current job.

xPlayer.job.label

xPlayer.job.grade_label


#10

This is in main.lua

local jobTpl = '<div>{{job_label}} - {{grade_label}}</div>'

if xPlayer.job.grade_label == '' then
	jobTpl = '<div>{{job_label}}</div>'
end

ESX.UI.HUD.RegisterElement('job', #xPlayer.accounts, 0, jobTpl, {
	job_label   = '',
	grade_label = ''
})

ESX.UI.HUD.UpdateElement('job', {
	job_label   = xPlayer.job.label,
	grade_label = xPlayer.job.grade_label
})

end)


#11

Do you think you can find a nice code for just that thing i want?


#12

Why do you want me to do your work? i’ve told you what do do and where.


#13

But where will i edit?


#14

between line 1081- 1147 as they said before