im usin esx final and i get same problen there isnt a way to fix it cause every log in the user get the ui openned again
If you do that then players will have to somehow open that window manually on first login.
it’s this part:
RegisterNetEvent('esx_identity:showRegisterIdentity')
AddEventHandler('esx_identity:showRegisterIdentity', function()
TriggerEvent('esx_skin:resetFirstSpawn')
if not isDead then
TriggerEvent('cui_character:open', { 'identity', 'features', 'style', 'apparel' }, false)
end
end)
Ok, I found an other way how to “fix” this
- set
Config.EnableESXIdentityIntegration
to false in cui_character/shared/config.lua - Next make sure that you comment out
'@esx_identity/server/main.lua'
in the fxmanifest.lua
Restore esx_identity before the cui_character changes and put
TriggerEvent('cui_character:open', { 'identity', 'features', 'style', 'apparel' }, false)
instead of TriggerEvent('esx_skin:openSaveableMenu', myIdentifiers.id)
in your esx_identity/client/client.lua
Unfortunately using this method we’ll not be able to enjoy this release to its fullest, but it’s always an alternative.
EDIT: On cui_character/client/main.lua:451 delete isPlayerNew
Can you explain pls
UPDATE:
- Fixed a problem with date of birth field sometimes failing to display data fetched from the db.
This problem was completely unrelated to the window opening on logins other than the first.
Hi,
Is it possible to make the CUI use steamid like Es_identity is?
As i can’t seem to find any option to get my players Rockstar License before they join the server.
I need to be able to whitelist people and create their charakter before they join the server, so when they actually join they only need to change the look and clothes of their char. Is there a solution for this?
extendedmode allows using steam identifier. You can use extendedmode with cui_character.
You could work around that by creating a resource that grabs the rockstar license hash when a player joins, saves it somewhere or dumps it in server log and (if not whitelisted) immediately kicks the player from the server. Then you’d only check that log and add the players you want to your whitelist.
I will try with extendedmode instead og Es_extended.
Regarding the resource that graps their hash when joining, since the server will be done in co-op with some streamers we will most likely have a lot of trafic from players trying to join the server without being whitelisted - So that might be a bit hard that way.
And what exactly was changed?
Or do I have to translate everything again and put everything in again?
Hi , my esx_identity code its not same that the example
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
How I can change the height from inch to cm?
Just replace it with
RegisterNUICallback('register', function(data, cb)
ESX.TriggerServerCallback('cui_character:updateIdentity', function(callback)
if callback then
ESX.ShowNotification(_U('thank_you_for_registering'))
TriggerEvent('cui_character:setCurrentIdentity', data)
TriggerEvent('cui_character:close', true)
else
ESX.ShowNotification(_U('registration_error'))
end
end, data)
end)
Of course if you’re using the builtin esx_identity
Error loading script @esx_identity/server/main.lua in resource cui_character: @esx_identity/server/main.lua:167: attempt to call a nil value (global ‘_U’)
stack traceback:
@esx_identity/server/main.lua:167: in main chunk
Failed to load script @esx_identity/server/main.lua.
Started resource cui_character
SCRIPT ERROR: @esx_identity/server/main.lua:169: attempt to call a nil value (global ‘_U’)
why do I get this error in console?
From what I invenstigated earlier it looks like latest esx_identity expects identifiers in format different than extendedmode provides, so a valid identifier can never be found and every start is mistakenly detected as first.
Check out this post and see if any of those solutions help.
Still the same ;(
UPDATE:
I found out there was actually a problem with identifiers being incorrect, but it only occurred when using extendedmode with steam id.
To fix it just add Config.UseSteamID = true
at the end of cui_character/shared/config.lua
I’ve updated the repo too if you prefer to just git pull
a new version.