[Release][ESX] [EMS/Ambulance Job]

Ye, I am complaining about the same issue for over a month now :frowning:

Would be perfect, if anyone would tell me solution to thisā€¦

1 Like

I tried several things but nothing do I also have a concern about the payment of the hospital at the time of the death the cash is not surely deduced a problem of account which can not be in the negative ā€¦ .

2 Likes

same problem when shooting at me, I do not have a timer for death or reappearance, it works only natural death. :frowning: Thanks anyway to Elpumpo for all these scipts, I hope you find the problem. :slight_smile:

2 Likes

this one works for time with the death of a weapon, but less complete, no boxes to pharamacie ā€¦ https://github.com/snyx95/fxserver-esx_ambulancejob

  1. Add this in your server.cfg :
start baseevents
start esx_ambulancejob
1 Like

+1

Iā€™m having the same issue. When I get killed by someone the death timer doesnā€™t show upā€¦ However, if I die naturally it shows up!

Logs (server):

[     71250] Sending player (2) ELS data
[     79843] MESSAGE => =(3)= RalfTech Youtube L-05@police : Medical attention required: unconscious citizen!
[     79859] MESSAGE => =(3)= RalfTech Youtube L-05@ambulance : Medical attention required: unconscious citizen!
[     88968] InvokeNative: execution failed: Argument at index 0 was null.
[     88984] Error running call reference function for resource esx_ambulancejob: citizen:/scripting/lua/scheduler.lua:351: Execution of native 00000000406b4b20 in script host failed.
[     88984] stack traceback:
[     88984]     [C]: in upvalue '_in'
[     88984]     citizen:/scripting/lua/natives_server.lua:156: in function 'GetPlayerName'
[     88984]     server/main.lua:132: in upvalue 'ref'
[     88984]     citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[     88984]     [C]: in function 'xpcall'
[     88984]     citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
[     88984] stack traceback:
[     88984]     [C]: in function 'error'
[     88984]     citizen:/scripting/lua/scheduler.lua:351: in function citizen:/scripting/lua/scheduler.lua:322
[     89000] Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
[     89000] stack traceback:
[     89000]     [C]: in function 'error'
[     89000]     citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
[     89000]     citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
[     89000]     citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
[     89000]     citizen:/scripting/lua/scheduler.lua:563: in field 'cmd'
[     89000]     server/main.lua:130: in upvalue 'handler'
[     89000]     citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
[     89000] stack traceback:
[     89000]     [C]: in function 'error'
[     89000]     citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
[     89000]     citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
[     89000] =(3)= RalfTech Youtube L-05: /revive

Logs (FiveM Client):

[    163781] Error running system event handling function for resource es_extended: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: client/main.lua:105: attempt to index a number value (local 'victimCoords')
[    163781] stack traceback:
[    163781] 	client/main.lua:105: in upvalue 'handler'
[    163781] 	citizen:/scripting/lua/scheduler.lua:195: in function <citizen:/scripting/lua/scheduler.lua:194>
[    163781] stack traceback:
[    163781] 	[C]: in function 'error'
[    163781] 	citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
[    163781] 	citizen:/scripting/lua/scheduler.lua:194: in function <citizen:/scripting/lua/scheduler.lua:158>
[    165359] EndpointMapper::HandleRequest: POST /gta5/11/gameservices/auth.asmx/CreateTicketScAuthToken
[    173078] nui://customchat/html/chat.js:54, ok
[    173078] 
[    179609] EndpointMapper::HandleRequest: POST /gta5/11/gameservices/Telemetry.asmx/SubmitCompressed
[    180140] EndpointMapper::HandleRequest: POST /gta5/11/gameservices/GeoLocation.asmx/GetLocationInfoFromIP
[    187375] nui://customchat/html/chat.js:54, ok

@SuisseGames Thanks, itā€™s work now with this script

How can i change the clothes for ems ?

guys how to set like if there is EMS in server. people have to wait 10 minute than they can respawn. if they dont wanna wait they can call EMS . how to do that ?

I have a Big problem. Sometimes i respawn before 10 min. Anybody Can help me?

I took all deathtimer related code from the version that @SuisseGames linked and replaced the code in a later version of the script, works like a charm. Had to copy ā€œesx_ambulancejob:getBankMoneyā€ from the server lua as well. Itā€™s quick and sloppy, but it works.

Would you be willing to share this? Been trying to run the latest ambulance script for some time now with no luck on the death timer.

Sure, Iā€™ll upload it to my git when I get home tonight and share it.

some1 has a fix for the death timer?

esx_ambulancejob v1.1.0

  • Updates to sql files
  • Added Finnish translation
    • Removed partial-completed German translation
    • Added missing strings, etc
  • Proper 4 tab indent enforced
  • Moved job-related functions&code to seperate file job.lua since the code became too big
  • Death screen update
    • Upon death youā€™ll first face an timer til you can respawn, and after it runs out you will get an timer til you bleed out
    • You now have to hold E for several seconds to respawn
  • general code improvements

still not working, after update deathscreen isnt showing even if i killed myself like that was before update

Worked for me like yesterday, but now it doesenā€™t anymore, the respawn timer never shows up.

*It was error with the latest version released yesterday for me. I reinstalled it like 3 times before i installed 1.07 again, and it instantly worked again!

This combo works for me

updated es_extended to latest version (1.0.14) and this works together with older Ambulancejob v. 1.0.7

Did you plan on releasing your edit?

Oh, I thought the latest update fixed it.
Iā€™ll upload my version tonight after work.

Edit: So I just encountered a new problem with the script, the timer works, but when the timer runs out you get stuck in an infinite loading screen and have to relog. You still die and loose all your items, but you wake up where you died. Iā€™m gonna try to fix this today and release my workaround later.

esx_ambulancejob v1.1.1

  • Disable most inputs when dead, dead people shouldnā€™t even be able to talk since theyā€™re unconscious in rp
  • Made server-side events lua executor safe.
  • Changed isDead column on database to is_dead , and made it a TINYINT(1) , so check the default sql file to make sure your database is correctly setup.

people gonna cry now because i broke compability

1 Like