[RELEASE][ESX] KASHacters Multi Character

esx
characters

#133

yeah the error still happens I got the same one as you even though this is not jsfour-atm this addon caused the error.


#134

Here is the ONLY error I get atm.

Aside from this, I added a /switch function to switch characters, Only issue I have with it currently is that when I switch characters… EVERYTHING changes, Except the characters skin.

ALSO I setup free roam camera for esx_skin, Learned you CANNOT do that with this multi-character as it breaks the camera when creating your new character.

If anyone has any suggestions or tips on these issues, please let me know.

This is a brand new rebuild of my server with ALL UPDATED scripts within the last 2-3 weeks. (Just for anyone who plans to ask.)


#135

Hello BTNGaming, I also had this problem and I fixed it by changing “playerSpawned” to “es:playerLoaded” esx_ambulancejob/client/main.lua This is the handler /

AddEventHandler(‘playerSpawned’, function()
IsDead = false

if FirstSpawn then
exports.spawnmanager:setAutoSpawn(false) – disable respawn
FirstSpawn = false

  ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
  	if isDead and Config.AntiCombatLog then
  		while not PlayerLoaded do
  			Citizen.Wait(1000)
  		end

  		ESX.ShowNotification(_U('combatlog_message'))
  		RemoveItemsAfterRPDeath()
  	end
  end)

end
end)


#136

Oh nvm es:playerLoaded only removed the error but the function didn’t work. I tried something else and this worked.

RegisterNetEvent('esx_ambulancejob:multicharacter')
AddEventHandler('esx_ambulancejob:multicharacter', function()
	IsDead = false

	if FirstSpawn then
		exports.spawnmanager:setAutoSpawn(false) -- disable respawn
		FirstSpawn = false

		ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
			if isDead and Config.AntiCombatLog then
				while not PlayerLoaded do
					Citizen.Wait(1000)
				end

				ESX.ShowNotification(_U('combatlog_message'))
				RemoveItemsAfterRPDeath()
			end
		end)
	end
end)

And then in esx_kashacters

RegisterNetEvent('kashactersC:SpawnCharacter')
AddEventHandler('kashactersC:SpawnCharacter', function(spawn, isnew)
    TriggerServerEvent('es:firstJoinProper')
    TriggerEvent('es:allowedToSpawn')
    TriggerEvent('esx_ambulancejob:multicharacter')

    SetTimecycleModifier('default')
    local pos = spawn
    SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
    DoScreenFadeIn(500)
    Citizen.Wait(500)
    cam2 = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", -1355.93,-1487.78,520.75, 300.00,0.00,0.00, 100.00, false, 0)
    PointCamAtCoord(cam2, pos.x,pos.y,pos.z+200)
    SetCamActiveWithInterp(cam2, cam, 900, true, true)
    Citizen.Wait(900)
 if isnew then
	TriggerEvent('esx_identity:showRegisterIdentity')
end

#137

When i give myself the police job and i will connect again to the server i have an unemployed and i have to give again police job. Everytime with every job.

(in the right corner i have written job before reconnect (but works like unemployed))
How i can fix this?


#138

Someone solved the apartment glitch. When I change my account, things are still there. Thanks in advance!


#139

I cant choose Character 2. And i get loads of es_extended errors. Same as BritishBrotherhood has


#140

Hi Kash. I am intrested you ask you something. Do you have discord ? :slight_smile: . Its mothugg about the script btw.


#141

hey @OfficialRobin can you tell me how you made the character switcher ?


#142

There is a pull request on the Github for a character switch function


#143

Do i need to turn of esx_identity for this?


#144

thanks


#145

Here are some errors that i have noticed

[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "[object Object]": ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_ears' for key 'unique_datastore_owner_name'
Error: (node:24745) UnhandledPromiseRejectionWarning: Error: ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_ears' for key 'unique_datastore_owner_name'
[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "[object Object]": ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_glasses' for key 'unique_datastore_owner_name'
Error: (node:24745) UnhandledPromiseRejectionWarning: Error: ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_glasses' for key 'unique_datastore_owner_name'
[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "[object Object]": ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-property' for key 'unique_datastore_owner_name'
Error: (node:24745) UnhandledPromiseRejectionWarning: Error: ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-property' for key 'unique_datastore_owner_name'
[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "[object Object]": ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_helmet' for key 'unique_datastore_owner_name'
Error: (node:24745) UnhandledPromiseRejectionWarning: Error: ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_helmet' for key 'unique_datastore_owner_name'
[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "[object Object]": ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_mask' for key 'unique_datastore_owner_name'
Error: (node:24745) UnhandledPromiseRejectionWarning: Error: ER_DUP_ENTRY: Duplicate entry 'steam:MYSTEAM-user_mask' for key 'unique_datastore_owner_name'

And I have duplicate entries in some tables.
Example: https://i.imgur.com/W0RL8qr.png

My Settings:

local IdentifierTables = {
    {table = "users", column = "identifier"},
    {table = "owned_vehicles", column = "owner"},
    {table = "user_accounts", column = "identifier"},
	{table = "addon_account_data", column = "owner"},
	{table = "addon_inventory_items", column = "owner"},
	{table = "billing", column = "identifier"},
	{table = "characters", column = "identifier"},
	{table = "datastore_data", column = "owner"},
	{table = "owned_properties", column = "owner"},
	{table = "phone_calls", column = "owner"},
	{table = "phone_users_contacts", column = "identifier"},
	{table = "rented_vehicles", column = "owner"},
	{table = "society_moneywash", column = "identifier"},
	{table = "user_inventory", column = "identifier"},
	{table = "user_licenses", column = "owner"},
}

#146

Please tell me how you’ve fixed it


#147

Hello,
My menu doesn’t appear my cam just floats in the air


#148

did you call the resource esx_kashacters


#149

I did


#150

did you upload the SQL file ?


#151

how did you fix the duplication error?


#152

What do you mean?