I inserted emoj on database but in game cant read and display “?”
how to resolve?

you could try to add this code in database instead of the emoji.

😀

I dont know if it works by the way :slight_smile:

wait i try

if i search on google ok but in database no

1 Like

1 Like

mmm the second thing that you could try is modified es_extended/client/main.lua and change this code:

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

with something like:

local playerJobLabel = '😀'

if  xPlayer.job.label ~= 'unemployed' then
        playerJobLabel = xPlayer.job.label
end

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

and in database, in the label column you have to write “unemployed”.

Again, i really dont know if it works :smiley:

i modified code now i restart server and i see if work

third thing to try is download the emoji image and add it as an image. something like:

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

if xPlayer.job.label == 'unemployed' then
    jobTpl = '<div><img src="your_image_name.png"> - {{grade_label}}</div>'
end

and then add the image in __resources.lua

not work, now i try this code

precedent dont work, now i try this

not working

i think that third option should works, because the bank money icon and black money icon are showed in the same way…

i can try with another es_extended new version?

not working (with emoj in database)

no in database you have to write unemployed… then download an emoji image and call it “emoji.png”, add the image in ….\es_extended\html\img\accounts then go in es_extended/client/main.lua and change this line of code:

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

with all of this below

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

if xPlayer.job.label == 'unemployed' then
    jobTpl = '<div><img src="img/accounts/emoji.png"> - {{grade_label}}</div>'
end

then in es_extended open the file __resources.lua and inside the “files {” section add this:

files {
	'locale.js',
	'html/ui.html',

	'html/css/app.css',

	'html/js/mustache.min.js',
	'html/js/wrapper.js',
	'html/js/app.js',

	'html/fonts/pdown.ttf',
	'html/fonts/bankgothic.ttf',

	'html/img/accounts/bank.png',
	'html/img/accounts/black_money.png',
	'html/img/accounts/emoji.png',
}

this should work

now i try in game i modified lines

dont working

i want try to modify

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

into

local jobTpl = '<div>&#128512;{{job_label}} - {{grade_label}}</div>'

And see if work because its html

if not work i can try with

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

if PlayerData.job.label == 'unemployed' then
    jobTpl = '<div><img src="img/accounts/emoji.png"> - {{grade_label}}</div>'
end

this working but i want to a specific job wait