[RELEASE][ESX] KASHacters Multi Character

Does this work for ambulance too? And us there no way for it to just work lol as before it kept the job each time they login!

How to do that when I am dead and I make reconnect I want to be still dead?

you need esx_ambulancejob

I have, but it’s bugged. When i die, and click alt+f4 and again connect to server i don’t be dead.

Ahhh your right. I tested it and you get a message stating you have been forced repawn because you left the server when you died. Then you would have to make some edit. They do loose their cash and item so that is working at least.

You would need to add a check

isdead

So that when you load in esx_kashacters loading screen that it would check if you are dead. then if isdead true then it would make you dead again.

U mean, i must add this?
"
{table = “users”, column = “is_dead”},
"
to server/main.lua

1 Like

no in esx_kashacters client/main.lua there is a code where its basicly says that if player has a character then spawn player and if player has no character then send him to create a identity. So in that code you would have to add check isdead before spawning the player.
I will try to do that later on but right now im focusing on other thing on my server. So look at how dead stuff work on ambulancejob then add nessecary check to kashacters

1 Like

Please keep me updated on this.
Cuz i have the exact same error and i cannot seem to fix it either way.

Help is really wanted. huhu.

We seem to have successfully got the script working on our server. Just wondering is there any way to have say a character change point? Rather than having to disconnect from the server and rejoin to select your character again.

@Noah_Kernan & @Rhodiniium (and anyone with the “gmatch”-error):

We had the same error, but we were able to fix it by updating essentialmode!
Now we’ve got a coupple of small errors in other scripts, but those seem much easier to fix.

Hope this helps anyone :wink:

1 Like

Im having an issue where GCPhone is not relaying the messages to like char1:steam and char2:steam, i have added all the fields into the server.lua but it still errors out with a:
Error running call reference function for resource esx_addons_gcphone: citizen:/scripting/lua/scheduler.lua:403: server.lua:243: attempt to index a nil value (local ‘xPlayer’)
stack traceback:
server.lua:243: in function ‘getPhoneNumber’
server.lua:46: in function ‘notifyAlertSMS’
server.lua:115: in upvalue ‘callback’
server.lua:245: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:389: in function citizen:/scripting/lua/scheduler.lua:388
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:388: in function citizen:/scripting/lua/scheduler.lua:387
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:403: in function citizen:/scripting/lua/scheduler.lua:372
Error: Unhandled error in timer: Error: BUFFER_SHORTAGE
Error: BUFFER_SHORTAGE
at n.e [as reserve] (citizen:/scripting/v8/msgpack.js:29:12766)
at h (citizen:/scripting/v8/msgpack.js:29:15761)
at n.r [as decode] (citizen:/scripting/v8/msgpack.js:29:13908)
at n.fetch (citizen:/scripting/v8/msgpack.js:29:6972)
at n.u [as read] (citizen:/scripting/v8/msgpack.js:29:12076)
at Object.n [as decode] (citizen:/scripting/v8/msgpack.js:29:7097)
at unpack (citizen:/scripting/v8/main.js:20:33)
at citizen:/scripting/v8/main.js:51:11
at setImmediate (mysql-async.js:4962:9)
at Object.callback (citizen:/scripting/v8/timer.js:96:21)

I’m having this problem
screenshot

Everyone is. It is a deprecation warning regarding the database. As of right now there is no fix. It doesn’t cause any major bugs and or damage.

Negative. Iv been working on this for a while now and now I dont get a singel error anymore so no everyone isnt getting this.

Care to post the fix for everyone? It’s a fairly common issue ongoing right now. If you scrolled up you would see that.

Dont remember exactly what i did to solve that error but start by removing the playerspawned check in the ambulance job first and add it as a event instead that you trigger in this script when you choose the character

Then do the same for esx_identity/jsfour-register etc. REMOVE the playerspawned eventhandler function and trigger a event in kashacters instead.

1 Like

Do you mind sharing the esx_ambulancejob and esx_kashacters?

just scroll up and check the event someone sent

Hey just a fast thing when I select the same character it’s a ped. (On the menu when you join)