Giter Site home page Giter Site logo

fivem-ex / esx_kashacter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ebensantuy/esx_kashacter-tutorial-fixed-all-issue

11.0 3.0 9.0 445 KB

🔮 esx_kashacter - Multi Characters for es_extended framework.

Home Page: https://github.com/FiveEYZ/esx_kashacter

Lua 44.85% TSQL 5.12% CSS 5.10% JavaScript 21.56% HTML 23.37%
fivem esx fxserver kashacters kash

esx_kashacter's Introduction

⚠️ The supported fork is here. ➡️ https://github.com/FiveEYZ/esx_kashacter


Archived readme

💻 You can download es_extended here: https://github.com/ESX-Org/es_extended

If you are updating ESX, be sure to update all scripts and DATABASE SCHEMA!

How it works

What this script does it manipulates ESX for loading characters So when you are choosing your character it changes your Rockstar license which is normally license: to Char: this prevents ESX from loading another character because it is looking for you exact license. So when you choose your character it will change it from Char: to your normal Rockstar license (license:). When creating a new character it will spawn you without an exact license which creates a new database entry for your license.


Required changes:

  • es_extended: (es_extended/client/main.lua)

Remove this code (74 - 76):

Citizen.Wait(3000)
ShutdownLoadingScreen()
DoScreenFadeIn(10000)
  • es_extended: (es_extended/client/main.lua)

Replace this code:

local isPaused, isDead, pickups = false, false, {}

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if NetworkIsPlayerActive(PlayerId()) then
			TriggerServerEvent('esx:onPlayerJoined')
			break
		end
	end
end)

with:

local isPaused, isDead, isFirstSpawn, pickups = false, false, true, {}

RegisterNetEvent('esx:kashloaded')
AddEventHandler('esx:kashloaded', function()
	if isFirstSpawn then
		TriggerServerEvent('esx:onPlayerJoined')
	end
end)
  • es_extended: (es_extended/server/main.lua)

Change this code in onPlayerJoined(playerId) function in 2 PLACES:

	for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
		if string.match(v, 'license:') then
			identifier = string.sub(v, 9)
			break
		end
	end

replace both of them with:

	for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
		if string.match(v, 'license:') then
			identifier = v
			break
		end
	end

Read carefully...

You MUST increase the character limit in the users table for row identifier to 48.

Do not use essentialsmode, mapmanager and spawnmanager!

Pay ATTENTION: You have to call the resource esx_kashacter in order for the javascript to work!*

Multiple languages support

Just change locales/en.js in html/ui.html (line 10)

___

Contributors

Thanks to KASH and XxFri3ndlyxX!

Contributors

esx_kashacter's People

Contributors

dioneb avatar ebensantuy avatar fiveeyz avatar koolaiddtv avatar rex2630 avatar rikodev avatar sw1ft avatar uniixx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esx_kashacter's Issues

esx_identity having issues loading the character

Hy,

so after I created a character and then logout/login it can't load the character in and gives me this error message:
Anmerkung 2020-05-20 081901

If I try to restart the server I have to register again until the cycle continues. Any ideas what is going on?

Black Screen Position Issue.

kashacters was working for me perfectly find and then a new update came out and a new es_extended and then this is when it went downhill. So when I select a character the character goes into a black screen that infinitely loads. I've reinstalled esx_kashacters several times, I've done all the steps correctly. My console gives an error which is: https://imgur.com/CqrBQvM

This a Getspawn Position error. I've tried going back to old versions and even tried only replacing the spawning function. Nothing has worked for me so far. does anyone know why this is happening.

Oczekiwanie na skrypty | Awating Scripts

PL : Chciałem stworzyć server ESX FiveM ale "Awaiting Scripts". Błąd wyskakuje przy esx_property oraz es_extended,
esx_addoninventory, esx_vehicleshop, esx_datastore, esx_identity, esx_society

ENG : I wanted to create an ESX FiveM server but "Awaiting Scripts". Error pops up with esx_property and es_extended,
esx_addoninventory, esx_vehicleshop, esx_datastore, esx_identity, esx_society

might have fix

seems to simple but on es_extended/client/main.lua#L75 add back:
ShutdownLoadingScreen()

this is all i think i did to make it work, character is loading in fine and i have no "awaiting scripts".

i might have missed something, what errors are ppl getting?

this is on FXServer 2358

owned_vehicles not working for kashacters

Hey, for owned vehicles it doesn't separate the vehicles I buy on each different character. It puts it all in the normal license and doesn't do the char1: thing anymore.

these are my identifier tables

local IdentifierTables = {
{table = "addon_account_data", column = "owner"},
{table = "addon_inventory_items", column = "owner"},
{table = "billing", column = "identifier"},
{table = "datastore_data", column = "owner"},
{table = "owned_vehicles", column = "owner"},
{table = "rented_vehicles", column = "owner"},
{table = "users", column = "identifier"},
{table = "user_licenses", column = "owner"},
{table = "lsrp_motels", column = "ident"},
{table = "car_parking", column = "owner"},
{table = "owned_bags", column = "identifier"}
}
`

Database issues when connecting

error happens on MySQL for query "INSERT INTO datastore_data (name, owner, data) VALUES ('user_ears', 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90', '{}')": ER_DUP_ENTRY: Duplicate entry 'user_ears-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_datastore_data_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_addonaccount] An error happens on MySQL for query "INSERT INTO addon_account_data (account_name, money, owner) VALUES ('property_black_money', 0, 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90')": ER_DUP_ENTRY: Duplicate entry 'property_black_money-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_addon_account_data_account_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "INSERT INTO datastore_data (name, owner, data) VALUES ('user_glasses', 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90', '{}')": ER_DUP_ENTRY: Duplicate entry 'user_glasses-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_datastore_data_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "INSERT INTO datastore_data (name, owner, data) VALUES ('user_mask', 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90', '{}')": ER_DUP_ENTRY: Duplicate entry 'user_mask-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_datastore_data_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "INSERT INTO datastore_data (name, owner, data) VALUES ('property', 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90', '{}')": ER_DUP_ENTRY: Duplicate entry 'property-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_datastore_data_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_addonaccount] An error happens on MySQL for query "INSERT INTO addon_account_data (account_name, money, owner) VALUES ('bank_savings', 0, 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90')": ER_DUP_ENTRY: Duplicate entry 'bank_savings-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_addon_account_data_account_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query "INSERT INTO datastore_data (name, owner, data) VALUES ('user_helmet', 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90', '{}')": ER_DUP_ENTRY: Duplicate entry 'user_helmet-license:220b20942a0be0e6a8ea5a1560617d35' for key 'index_datastore_data_name_owner'�[0m
�[31m[ERROR] [MySQL] [esx_kashacter] An error happens on MySQL for query "UPDATE `users` SET `identifier` = 'Char1220b20942a0be0e6a8ea5a1560617d350cd0cc90' WHERE `identifier` = 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90'": ER_DUP_ENTRY: Duplicate entry 'Char1220b20942a0be0e6a8ea5a1560617d350cd0cc90' for key 'PRIMARY'�[0m
�[31m[ERROR] [MySQL] [esx_kashacter] An error happens on MySQL for query "UPDATE `users` SET `identifier` = 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90' WHERE `identifier` = 'Char1220b20942a0be0e6a8ea5a1560617d350cd0cc90'": ER_DUP_ENTRY: Duplicate entry 'license:220b20942a0be0e6a8ea5a1560617d350cd0cc90' for key 'PRIMARY'�[0m

Not respawning on death

When I die, my character will not respawn (don't have esx_ambulancejob).

I have disabled esx_kashacters to test this and respawn correctly on death.

With esx_kachacters enabled again, I cannot respawn after death.

Using latest versions of all scripts including es_extended at the time of this post.

No characters to select

Everything works besides when going to select a character it always just says Create new character. Doesn't seem to be giving any errors either

question

If we move back to an older es_extended, would it fix?

@esx_kashacter/server/main.lua:38

I'm getting a SCRIPT ERROR: @esx_kashacter/server/main.lua:102: attempt to index a nil value (field '?')

Did i do anything wrong? This is the only error i get.

Always showing register dialog

I have the problem after installing, that the register and skin dialog ist always shown in charselection and then nothing is happening. / cant click anything

Crashing when creating a new character.

Everytime I want to create a new character my fiveM crashes. I have to relog 3-4 more times to finally create the character and not crash, do you know why?

The screen remains in the sky

After selection the screen remains in the sky, all scripts are loaded...

I have no erros, log is clear, can sb help?
Updated all to the latest esx and esx_kashacter version and followed the steps.

stuck on floating above the city

When i click on the character create button I just keep floating above the city.
No regsiter screen nothing??

Anyone have a fix or can help me out?
Screenshot_30

Black screen

I get stuck on a black screen with awaiting scripts

Database issue

in the users table your characters don't load in due to : missing in Char19bcbe48032443b6561a06c355bef87ee50d0da03 Shouldn't it be like Char1:9bcbe48032443b6561a06c355bef87ee50d0da03.

Also, I have newest kashacters installed with all the new patches

My license inserts correctly in the user's table license:9bcbe48032443b6561a06c355bef87ee50d0da03 just not my character licenses.

Didnt detect groups!

You cant use ESX Commands because it doesnt detect your groups. is there any fix for this?

Blackscreen

If i choose a char then i get a black screen

Characters Not Saving

I am starting with a fresh server and files, so all of my ESX Org files are the most recently updated, every single one they offer for download. I edited all the es ext .lua's per the instructions. i can create a character, but then i fly back into the city, there is no 1st character to choose, even tho it is saved in the database. also having problems spawning at 'last position' - but i may have that sorted after altering the user 'position' format. can't for the life og me to get characters to show in reflight tho.

thanks...
Nate

money saving problem

hey, so i installed the new esx updates and your edit of esx_kashacter. I did everything correctly and I can create a character do everything. the only problem is the money in our characters don't save. when i join in and see my character selections the money says undefined?. do you know how we can fix this? thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.