[RELEASE][ESX] KASHacters Multi Character

how can I decide how many slots to have???

Shiba, on my server we restart esx_addoninventory and they usually come back.

There is something going on with Kashacters and esx_addonaccount, esx_addoninventory and esx_datastore. Sometimes, when a user connects it does not find them in the table that those scripts create when they query the DB for their respective data. What happens next is the addonaccount and other scripts will create duplicate entries for these players because it thinks they don’t have a property_black_money account etc. The users then see the new table item which is created at zero’s so if they put anything in their property it will overwrite everything. I have no found a way to fix this even with the fix from Loffe above. I even tried adding the datastore duplication fix to addon account.

[MySQL] [Slow Query Warning] [esx_kashacters] [50955ms] UPDATE users SET identifier = ‘Char1:110000108da5815’ WHERE identifier = ‘steam:110000108da5815’
[ERROR] [MySQL] [esx_kashacters] An error happens on MySQL for query “[object Object]”: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
Error: (node:12320) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
at process. (internal/process/promises.js:27:25)
at
at Query.db.query [as _callback] (mysql-async.js:4973:13)
at Query.Sequence.end (mysql-async.js:280:24)
at Query.ErrorPacket (mysql-async.js:2122:8)
at Protocol._parsePacket (mysql-async.js:5941:23)
at Parser.write (mysql-async.js:6198:12)
at Protocol.write (mysql-async.js:5701:16)
at Socket. (mysql-async.js:693:28)
at emitOne (events.js:116:13)
Error: (node:12320) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Error: (node:12320) UnhandledPromiseRejectionWarning: Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transaction
at Query.Sequence._packetToError (mysql-async.js:244:14)
at Query.ErrorPacket (mysql-async.js:2109:18)
at Protocol._parsePacket (mysql-async.js:5941:23)
at Parser.write (mysql-async.js:6198:12)
at Protocol.write (mysql-async.js:5701:16)
at Socket. (mysql-async.js:693:28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
--------------------
at Pool.query (mysql-async.js:4728:23)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:96:41
Error: (node:12320) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

Default in the server config for restart after it’s started near bottom, or periodically in the cmd?

Shortly after a server restart manually restart the service yourself through console or rcon or however you want to do it. I haven’t triwd adding “restart addoninventory” to the bottom of the config but it couldn’t hurt to try that too.

is it possible to add a command which triggers the character select? this way people can change characters without relogging?

Has anybody figured out a way to switch skins when you switch characters? Also, after installing this resource, I get errors when I try to order shipments for the esx_kr_advanced_shops mod.

[ERROR] [MySQL] An error happens on MySQL for query “INSERT INTO shipments (id, label, identifier, item, price, count, time) VALUES (@id, @label, @identifier, @item, @price, @count, @time) {@time=1557867648;@item=medikit;@id=9;@price=50;@identifier=steam:1100001011cfe87;@count=1000;@label=MedKit}”:

i no longer use the advanced shops script but when i used it i never get any errors so you must be doing something wrong

did you make sure to add all identifier related columns to the table for kashacters?

Can someone help me, I have this on my server and before i installed it on my 1st character i had a property i was renting, now that i have this installed the money is been charged to my second account and its in the minus of $30k is there a way to fix this? and also cars aren’t going back to the garage since installing this.

If someone could help me would be greatly appreciated.

You sure you added all the tables you have in your database that have an owner or identifier column to the server.lua file?

Here are some quick tips to help people do this easier:

In PHPMyAdmin, run the following query:

SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN (‘owner’, ‘identifier’) AND TABLE_SCHEMA = ‘name_of_database’

Highlight all the results and copy/paste them into a text editor that features regex(Regular Expressions) search and replace. I use Sublime Text. In the Find What input, enter the following regex pattern:

(.?)\n(.?)\n

In the Replace With input, enter this:

{table = “$1”, column = “$2”},\n

You should get something like this:

{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 = “jail”, column = “identifier”},
{table = “jsfour_atm”, column = “identifier”},
{table = “owned_properties”, column = “owner”},
{table = “owned_shops”, column = “identifier”},
{table = “owned_vehicles”, column = “owner”},
{table = “phone_calls”, column = “owner”},
{table = “phone_messages”, column = “owner”},
{table = “phone_users_contacts”, column = “identifier”},
{table = “rented_vehicles”, column = “owner”},
{table = “shipments”, column = “identifier”},
{table = “society_moneywash”, column = “identifier”},
{table = “user_accounts”, column = “identifier”},
{table = “user_contacts”, column = “identifier”},
{table = “user_inventory”, column = “identifier”},
{table = “user_licenses”, column = “owner”},
{table = “users”, column = “identifier”},

Now just put that in your server/main.lua file and you should be good to go.

2 Likes

Can you still use this for now given the announce from steam yesterday?


After a restart yesterday, I could not get passed loading screen but maybe that was just the host?

@KASH is there any chance you can start on a version identifying trough something else then steam?
Cause steam might break the codei n the future.

still working in my server.

The script is working, but after installing, i was presented with this error

Error: (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:19) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Script is working perfectly, but for some reason some players don’t have their mouse cursor visible. I see more people have the same problem. Any solutions? I am too bad at javascript to solve this myself…

Hey guys, anyone know have any idea why my server gets stuck here and cant go any further? Its like esx_kashacters wont pop up.

Im using esx_identity if that has anything to do with it. Any ideas??

How’d you fix ur problem(s)?

I also stayed there on this screen when I tried to use this script lately, I tried several ways nothing changed and I gave up hahahha

I was wondering if this script needs esx_identity to work, because I do not have it, but the creator of the post did not say anything about it so whatever

im having this same error and i cant figure out how to fix it

Any way to get back to the character Selection Screen without relogging?

2 Likes