[RELEASE] CleanUI (cui) character

It might be. Make sure to call whatever natives your scripts use to set the perspective to what you think is correct when cui_character camera deactivates.

And what problem is that?

I also noticed you have esx_skin and skinchanger started. You should not have them started with cui_character, these scripts are in direct conflict and will cause unpredictable behavior when started together.

1 Like

I think he means this problem with gender change, i use esx legacy and dev build of cui. A possible fix I think is to change multicharacters start location

Okay i did some more research. I tried a skin config from the database from my friend because he hasnt got this issue with his configuration. I copied it over to my database entry and it worked. As soon as i got his skin the issue was solved. I attached the two different configs.

Working config:
https://hastebin.com/ihavugohib.json

Not working config:
https://hastebin.com/wabilivoqa.json

Maybe this helps to resolve the issue.

I also tried to change my gender. As soon as I did it the bug was there again. When I tried to change back to male model, the issue was not solved.

After some more research I found out that the problem are the shoes. Lol.

Here is the difference:

Without shoes:

With shoes:

This bug should have been fixed in this commit. Is that not the case? Or the version you are using does not include that?

Are you sure you didn’t mix up the links?

The format that cui_character uses should be compatible with skins created using esx_legacy skinchanger.

Looking at the values I expected completely opposite result. For example, the format you posted as “working” has value -39 for property eyebrows_5 which is definitely not a valid one. If you look at the skinchanger file above, you should get an idea what’s valid and what’s not.

Were those characters initially created or at any point edited with something else?

It is very likely the problem is on your end. I don’t recall anyone reporting any similar issues before.

EDIT:
I’ve looked some more at the data of valid characters and I’m not so sure anymore. Some of them did have negative values where I thought them to be invalid. Maybe you did not mix the links up afterall.

Yeah it could be that I messed up the links, sorry about that. But it seems to be an issue which is not related to your script. I tested it on other platforms and there is also the issue that if you take of your shoes your character will automatically be smaller.

Maybe that can be fixed with a little bit of code but I am not really into that.

Well i have the latest commit but this problem still exists
u can see the screenshots of my client/main.lua and this commit


can someone drop a download to there esx_identity Lua im having issues and i dont know if its me just fucking up on the instructions`

This doesn’t work with es_extended 1.3 right?

UPDATE:
This problem should be fixed now.

1 Like

Thanks, you are awesome!!

For those who need the arm section, these are the changes i made:
in client/mail.lua, line 239 change

SetPedComponentVariation(playerPed, 3,  currentChar.arms,       currentChar.arms_2,     2)

to this

SetPedComponentVariation(playerPed, 3,  currentChar.arms,       0,     2)

Line 1177 add

arms = {},

Line 1193 add

result.arms = GetComponentsData(3)

and line 1055 change function GetComponentsData(id) to this:

function GetComponentsData(id)
    local result = {}

    local playerPed = PlayerPedId()
    local componentBlacklist = nil

    if blacklist ~= nil then
        if GetEntityModel(playerPed) == GetHashKey('mp_m_freemode_01') then
            componentBlacklist = blacklist.components.male
        elseif GetEntityModel(playerPed) == GetHashKey('mp_f_freemode_01') then
            componentBlacklist = blacklist.components.female
        end
    end

	if id == 3 then
		if IsPedModel(PlayerPedId(), 'mp_m_freemode_01') then
			for i=0, 19 do
				if i ~= 3 and i ~= 9 and i ~= 10 and i ~= 13 and i ~= 16 and i ~= 17 and i ~= 18 then
					table.insert(result, {
						name = i+1,
						component = 3,
						drawable = i,
						texture = 0
					})
				end
			end
		else
			for i=0, 15 do
				if i ~= 8 and i ~= 10 and i ~= 13 then
					table.insert(result, {
						name = i+1,
						component = 3,
						drawable = i,
						texture = 0
					})
				end
			end
		end
	else
		local drawableCount = GetNumberOfPedDrawableVariations(playerPed, id) - 1
		for drawable = 0, drawableCount do
			local textureCount = GetNumberOfPedTextureVariations(playerPed, id, drawable) - 1
			for texture = 0, textureCount do
				local hash = GetHashNameForComponent(playerPed, id, drawable, texture)
				if hash ~= 0 then
					local component, drawable, texture, gxt = GetComponentDataFromHash(hash)
					-- only named components
					if gxt ~= '' then
						label = GetLabelText(gxt)
						if label ~= 'NULL' then
							local blacklisted = false
							if componentBlacklist ~= nil then
								if componentBlacklist[component] ~= nil then
									if componentBlacklist[component][drawable] ~= nil then
										if componentBlacklist[component][drawable][texture] ~= nil then
											blacklisted = true
										end
									end
								end
							end
							if not blacklisted then
								table.insert(result, {
									name = label,
									component = component,
									drawable = drawable,
									texture = texture
								})
							end
						end
					end
				end
			end
		end
	end
    return result
end

Next, add in script.js in function “loadClothesTab” (line 353):

// arms
    let armslist = tab.find('select#arms.clotheslist');
    clothesData.arms.forEach(function (item) {
        let option = $('<option data-component="' + item.component + '" data-drawable="' + item.drawable + '" data-texture="' + item.texture + '"></option>');
        option.text(item.name)
        armslist.append(option);
    });

and add this

refreshComponentList(element, '#arms', 3, data.arms_1, data.arms_2);

after this (line 1151):

last, in apparel.html add this before the itempants div:

<div class="group" id="itemarms">
    <h2 class="header">Arms</h2>
    <div class="list">
        <div class="controls">
            <button class="arrow left"></button>
            <select class="clotheslist component" id="arms" data-drwkey="arms" data-texkey="arms_2">
                <option data-component="0" data-drawable="0" data-texture="0"></option>
            </select>
            <button class="arrow right"></button>
        </div>
    </div>
</div>

4 Likes

has someone an idea how to get it work with the new esx_identity?

@Pained_Psyche I am sure you’re busy and stuff but is there a way to add “Click and hold” on the arrow buttons to switch the clothes faster?

Or is it possible to replace these switches with kind of a line where you can adjust the values manually ?

That would be awesome and I also read some people who scream after this sort of feature. (Its literally one of the reasons why using this on a production server could be problematic)

Done.

I also merged dev branch into master and fixed compatibility issues with extendedmode and esx v1 final that that esx-legacy adaptation initially broke.

Thanks, it works! If someone else needs it, be careful! do not confuse ` with ’ on ‘cm’

Thanks! Thats amazing work!

I think there is kind of a bug on the latest master commit.

This is a single person who tries to use one of the shops. Is it a bug from your preview function ?

There was indeed a bug. Should be fixed now.

I’m having a problem where upon creating a new character, he disappears.

Rejoining leaves it default, but doing any commands like /character or /identity, makes the character disappear and leaves me to relog.

Nothing in console either so I can’t really give any errors unfortunately.