[Release] [ESX] Character Selection

You going to be sharing that its awesome :slight_smile:

Thank you, maybe sometime :slight_smile:

give me files pls

just tell me, why?

image
Is this your problem? Read below

This is because it takes the default spawnpoint located in fivem-map-hipster\map.lua

Why this would be taken?
because es_extended dont know where to spawn, this can have several reasons one of the common reason is that you have added multiple times the playerSpawned call in you es_extended/client/main.lua

Why did you have multiple times the playerspawned function called?

because you did what the tutorial said and placed exactly on the lines that he said in the tutorial. only your es_extended is different because you downloaded it earlier or later or made some changes.

How to Fix
delete the call that you dont need and this would be fixed.

Great release , thank you for this…
It’s working perfect for me.
Only thing I had to adjust was the spawn cords and I used Codewalker for that.
For some reason a few cords are off and not inside of v_mugshot.
Easy adjustment for me and this is a great release.

Thank you NeQ and keep up the great work

1 Like

Is it possible to make a non ESX version of this ? Awesome work btw

I added stream folder to the script, there is a file in it responsible for removing the window.

Kashacters version is coming :wink:

5 Likes

How add more character creation?

I setted up character selector but i didn’t appeared in the room just the fade works after i get my skin. I edited all the lines what is mentioned on git. What can i do?

Hello, guys, I need some help!
I have installed everything set up the database for all the rest etc but it doesn’t seem to work, nothing happens when I join the server :frowning:

Server on startup:
https://pastebin.com/9kqJGYFU

I highly suggest you to read my pm.
I highly suggest you to read my pm.
I highly suggest you to read my pm.…

1 Like

please I have been working all night yesterday for a charr creation system :frowning:

I just don’t understand I did everything you said un tutorial and I still spawn has that goddam hippy It doesn’t do anything :frowning:
maybe I did something wrong with editing the es extended
here is the file: https://pastebin.com/amRAT1RY

I followed the instruction very carefully but i got the “attempt to index a nil value ‘coords’”, i installed this on a new clean server with only dependencies (cron, datastore, skin ecc), the character is turned in a wrong direction. Whats wrong? Thanks

Kh3699

i have a same problem…

Me too

I have the same problem… Have you found a fix yet?

the new es_extended save your first spawn coords on SQL --> Table --> position
they need to change coords here :slight_smile:

@NeQ
follow your instructions and it still doesn’t seem right.

ESX_SKIN

function OpenSaveableMenu(submitCb, cancelCb, restrict)
	TriggerEvent('skinchanger:getSkin', function(skin)
		lastSkin = skin
	end)

	OpenMenu(function(data, menu)
		menu.close()
		DeleteSkinCam()

		TriggerEvent('skinchanger:getSkin', function(skin)
			TriggerServerEvent('esx_skin:save', skin)
			
			DoScreenFadeOut(1000)
			Citizen.Wait(1500)
			SetEntityCoords(PlayerPedId(), -205.90, -1012.74, 30.20, 0.0, 0.0, 0.0, true)
			TriggerEvent("charselect:enable")
			Citizen.Wait(1000)
			DoScreenFadeIn(1000)
			DisplayRadar(true)

			if submitCb ~= nil then
				submitCb(data, menu)
			end
		end)

	end, cancelCb, restrict)
end

ES_EXTENDED

local isLoadoutLoaded, isPaused, isPlayerSpawned, isDead = false, false, false, false
local lastLoadout, pickups = {}, {}

local spawned = 0

ES_EXTENDED

AddEventHandler('playerSpawned', function()
	while not ESX.PlayerLoaded do
		Citizen.Wait(1)
	end

	local playerPed = PlayerPedId()

	-- Restore position
	if ESX.PlayerData.lastPosition and spawned > 0 then
		SetEntityCoords(playerPed, ESX.PlayerData.lastPosition.x, ESX.PlayerData.lastPosition.y, ESX.PlayerData.lastPosition.z)
	end

	Citizen.Wait(1000)

	if spawned == 0 then
		spawned = 1
		SetEntityCoords(PlayerPedId(), 409.42, -1001.14, -99.90, 0.0, 0.0, 0.0, true)
	end

	TriggerEvent('esx:restoreLoadout') -- restore loadout

	isLoadoutLoaded, isPlayerSpawned, isDead = true, true, false

	if Config.EnablePvP then
		SetCanAttackFriendly(playerPed, true, false)
		NetworkSetFriendlyFireOption(true)
	end
end)

ESX_IDENTITY

RegisterNUICallback('register', function(data, cb)
	local reason = ""
	myIdentity = data
	for theData, value in pairs(myIdentity) do
		if theData == "firstname" or theData == "lastname" then
			reason = verifyName(value)
			
			if reason ~= "" then
				break
			end
		elseif theData == "dateofbirth" then
			if value == "invalid" then
				reason = "Invalid date of birth!"
				break
			end
		elseif theData == "height" then
			local height = tonumber(value)
			if height then
				if height > 200 or height < 140 then
					reason = "Unacceptable player height!"
					break
				end
			else
				reason = "Unacceptable player height!"
				break
			end
		end
	end
	
	if reason == "" then
		TriggerServerEvent('esx_identity:setIdentity', data, myIdentifiers)
		EnableGui(false)
		Citizen.Wait(500)
		TriggerEvent('charselect:register')
		SetTimecycleModifier('default')
	else
		ESX.ShowNotification(reason)
	end
end)

SINCE A GREAT JOB!

VIDEO :

1 Like