[RELEASE] Enhanced HUD

@Pained_Psyche I hope all your questions have been answered after reading the hole thing.
The OP just put half his code here.

I dropped the heritage feature because I wanted to keep using the skinchanger. Also the heritage doesn’t really change that much on the face. But this can easily added back in if needed.
I didn’t bother going to the long rabbit hole because :

  1. I don’t have much time to get everything done
  2. It will impact a lot of scripts
  3. I wanted to stay as close as I could to the original code

All these points are not good. My latest version has been a complete rework. It misses some stuff yes. It may not work like some are hoping but that is not really my goal.
I tried to give the people here something descent on which they can work on and improve.
I totally agree with you that this is an awesome resource to learn and see how everything works.
You will note in my code a lot has been changed. And lately after finishing my custom clothshop, it will be even more optimized.
(For info to anyone who reads this, The best way to get everything working is to start with the skincreator + skinchanger. Then create a clothshop that also works with skinchanger.)

Last about the female character data… The only way is indeed to go through all the cloths and accessories to get the correct numbers. If you want to use my version, adding cloths or outfits is done in only 1 place : the html file. No need to edit the html and lua.

@hoegarden31 Not sure if I want to. On one hand it’s probably more optimized than the original, but on the other it requires skinchanger which I’m not entirely sure does anything that the OP’s version doesn’t.

Actually, I cannot figure out what skinchanger even does from just looking at the code. I mean… there isn’t a single SQL query in there, so how can it save the data? If it doesn’t save the data and is just some sort of glorified type declaration to hold skin information during runtime then what’s the point of it?

I’ve yet to see a single other character creator that allows heritage face blending and takes care of saving it. The OP’s one does. I feel like a great deal of value is lost by dropping this feature.

Skinchanger is indeed just a class that handles all the changes of a skin.
It also gives you the max values of each option. Instead of having a skincreator doing it in that resource and then having 5-6 jobs managing their own changes (Like taking work cloths on and off), it is done through only one resource.

If you have 10 scripts who all do the same stuff it is far better to make just one common script that can handle all the scripts. So when you have a change you don’t need to find all the scripts all over the place.

If you really want the heritage and all, you only have 2 options :

  • edit the skinchanger to allow those new parameters.
  • make your own copy of skinchanger inside the skincreator. (but you will have to change the 100 job scripts out here with each their own version)

If you want option 1, nobody stops you from changing it. The scripts made here cannot fit all the needs someone can thing off.

If you take option 2, nobody here will do all that work just for you. Most scripts are copy past. But not everything can be that way if you want a server different from all the others.

That’s exactly why I decided to start learning developing these scripts, I feel like things important to me don’t matter to server developers and things that they focus on I mostly couldn’t care less about.

I’ve poked around many servers and not a single one does even roughly what I want and most of my suggestions were “thumbs downed” into oblivion there, so I decided to start my own.

I’m just starting off, so most of the things are serious effort to me, but for example, I’ve managed to decouple this skincreator from essentials mode and integrate the outfits table first identifier insert using only this skincreator and esx, without modifying esx and any other script by just inserting this into skincreator’s lua file:

RegisterNetEvent('esx:onPlayerJoined')
AddEventHandler('esx:onPlayerJoined', function()
	if not ESX.Players[source] then
		local identifier

		print('player joined!')
		for k,v in ipairs(GetPlayerIdentifiers(source)) do
			if string.match(v, 'license:') then
				identifier = string.sub(v, 9)
				print('found player identifier' .. identifier)
				break 
			end
		end

		if identifier then
			print('identifier exists')
			MySQL.Async.fetchScalar('SELECT 1 FROM users WHERE identifier = @identifier', {
				['@identifier'] = identifier
			}, function(result)
				if not result then
					print('no result exists, first login detected')
					MySQL.Async.execute('INSERT INTO outfits (identifier) VALUES (@identifier)', {
						['@identifier'] = identifier
					})
				end
			end)
		end
	end
end)

I feel like it’s important for things to be as self-contained as possible and pulling many depedencies or having to modify other scripts in a hacky way just to make yours work (oh the horror!) are huge red flags signaling that you’re probably going the wrong way about what you want to do.

At this point I’m actually considering making a fork (and of course pull request) for Skinchanger just to implement the heritage, but I have to research if there are plans on supporting it with esx v2 or not.

3 Likes

My basic inventory looks like this for now.

3 Likes

Hi, your inventory - very nice. Can you share this inventory or similar inventory? Please)

This is my development used on my server.
It’s a Russian language.

Noice

I can translate - no problem)

  1. the menu is always visible. You have to hide/show it yourself. (css+lua)
  2. The yes/no buttons do nothing. there are no events linked to the buttons. You have to add them yourself.

Hello, i installed the skinchanger but when i enter on my server a can’t confirm the skin, i see a button blue and other gray, i pressed all the butons but nothing hapens

I’m sorry, but I did not understand.
Would you please explain more clearly?

After clicking the register button, I will receive this message in the console, but the plugin page will not disappear. please help.
Where should this code be placed? :point_down:t2:

MySQL.Async.execute(“INSERT INTO outfits (idSteam) VALUES (’[SteamID of user or anything ID you use to identify unique player]’)”)

how do i change the language i search all the files still cant find anything about the language.

2 Likes

don’t think that this script

How do you change the language if it is in the code where.

What is the Speedometer dependent on? Does it require a certain fuel script for it to be used?

I have a problem with the skin selector part, the script doesn’t want to save the skin and before that it spawns the player as an NPC character, any fixes?

How did u change the language

2 Likes

This look amazing, is there a way I can use this for a non esx server so no thirst and hunger?

Anyones has a ESX version of the character creator? Or a tutorial of how i can do it. I have read few comments but i dont understand at all how i wold be able to do it

If someone can do it for me, i can also pay for it

1 Like