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


#1

Posted on behalf of @GiZz, the developer of ESX (ES Extended).

[Requirements]:

MySQL
EssentialMode Base by @Kanersps: [Release] EssentialMode base
ES Extended (ESX) by @GiZz: https://github.com/FXServer-ESX/fxserver-es_extended

Auto Mode:
esx_skin: https://github.com/FXServer-ESX/fxserver-esx_skin

Player Management (boss actions):
esx_society: https://github.com/FXServer-ESX/fxserver-esx_society

[Features]:

-Allows users to play as the EMS or Medics on your server
-Revive function available
-Vehicle spawn for Ambulance and Helicopter
-Vehicle storing for Ambulance and Helicopter
-Changing room to change from civilian clothes to EMS outfit.
-French (fr), English (en), and Portugese (br) translations available (configurable in the config.lua file)

[Installation]:

  1. Change directory to resources/[esx]/

  2. Clone the Git repository located here: https://github.com/FXServer-ESX/fxserver-esx_ambulancejob

  3. Automated (no player management)
    a. Import esx_ambulancejob_minimal.sql into your MySQL database.

    Player Management
    b. Import esx_ambulancejob_full.sql into your MYSQL database.

  4. Add this to your server.cfg “start esx_ambulancejob”

Optional Steps:
5. Set Config.EnablePlayerManagement to true in config.lua for player management.

[Additional Information]
For additional support please visit the ESX Discord: https://discord.gg/3b3N8Ut

There are more plugins available which you can view at: https://github.com/FXServer-ESX


#2

Great script, I like it better then most ems systems out there. I do have 1 issue, maybe you can help me resolve this. When ever anyone re spawns either through waiting it out, or being revived, or using the quick revive option they get kicked out of their session to the point of a black screen with the gta buffering logo on the bottom right corner of the screen.

This only happens with this specific event of any esx scripts i have on the server.

Thanks


#3

You’re discord does not work!, the link is expired ! please help i’m having lots of issues with multiple scripts by [ESX]


#4

Thanks for letting me know the link is dead. I’ve updated the link! If you’re having lots of issues head on in there and users will likely be able to help assist.

@Voorhees_Jason I haven’t heard of this, best bet is to utilize the Discord link as well and maybe see if anyone else is having this issue and walk you through it.


#5

yea I am still getting expired link. With the ambulance thing soon as someone dies and tries to revive I go to a blank black screen with a little buffering animation in the bottom right. This normally means that I am kicked into a single session. It has to do with your blackout/loading code you have in the script.

I tested the server without this script and everything is fine. It is only with the ambulance script. Not sure where else even to look in order to fix this.


#6

The link works, just checked it. You were in the Discord even but I believe you got banned by a mod for posting where you shouldn’t have been or by spamming channels. Just double checked that even, you were 100% banned from Discord for spamming.


#7

I was asking for help for like over 6 hours i would ask one time every hour or so no one would help I was not spamming i was having a discussion with someone and got banned in middle of it


#8

I am telling you tho that there is something you may have done with your server differently but, with mines your script is the only one that does the kick out of death sort of speak. I cannot find anything on where the issue is. Everything else on esx works perfectly just the ambulance is the one script doing this.

I even left baseevents on and turned your script off and base works fine but soon as your script is turned on and someone dies they get the black screen with the little loading thing on the bottom right.

I can take screen shots if you like. I verified that it was not just my fivem acting up as everyone that comes on my server, I had them die just to see and they get the same results. If you like you can come on my server real quick to show you.


#9

Nobody using ambulancejob with it setup properly is experiencing this. You may want to double check all your stuff and maybe try a fresh install of ambulancejob and check your sql files to make sure you’re 100% setup correctly. I’ve been running this plugin since ESX went public and have not had this issue unless I or someone on my team broke something with the plugin.


#10

I double checked everything and I know about the sql stuff with esx plugins and everything else is on the script works perfectly even removing items and money. So the database stuff is working fine. If you come on the fivem discord we can chat for a min since I cannot come on the esx discord.


#11

this is also my cfg tree:

start mapmanager
start chat
start spawnmanager
start fivem
start hardcap
start rconlog
start mysql-async
start essentialmode
start esplugin_mysql
start es_admin
start es_extended
start esx_menu_default
start esx_menu_dialog
start esx_menu_list
start esx_phone
start esx_billing
start esx_datastore
start esx_addonaccount
start esx_society
start cron
start esx_garage
start esx_vehicleshop
start instance
start esx_addoninventor
start esx_lscustom
start esx_atm
start esx_weashops
start esx_skin
start skinchanger
start esx_barbershop
start esx_clotheshop
start esx_jobs
start esx_joblisting
start esx_policejob
start esx_service
start esx_drugs
start esx_property
start esx_realestateage
start baseevents
start esx_ambulancejob


#12

I guess you are not the only one. Same happens to me. All other scripts working just fine. I was reading about system/spawnmanager older version, but that didn’'t help either.

Reinstalled fivem server and all sql - same result. After death black screen loop and also after revive.


#13

don’t forget start baseevents


#14

If you look at my copy and paste, it shows i start baseevents. Also there is some limited revive you can do without baseevents and it still gives the black screen issues. The problem is within the ambulance script itself.


#15

This script is the only thing that is hindering a server from going on is because of this one bug because it is not happening to you does not mean there is not a bug in your script and the fact that someone else came up and said there was the same issue with his as well. Maybe we can look at your code together and figure out where the issue is?


#16

I narrowed it down. I am still not sure what the cause but I did confirmed it is not a database issue. It is not the job itself. It is not the death timer or anything like that. It is just the respawn part. When you die and right before you respawn to the medical center it gets stuck in a loading loop.


#17

I think the code problem has to lie in this area:

RegisterNetEvent('esx_ambulancejob:revive')
AddEventHandler('esx_ambulancejob:revive', function()

	local playerPed = GetPlayerPed(-1)
	local coords    = GetEntityCoords(playerPed)

	Citizen.CreateThread(function()

		DoScreenFadeOut(800)

		while not IsScreenFadedOut() do
			Citizen.Wait(0)
		end

		ESX.SetPlayerData('lastPosition', {
			x = coords.x,
			y = coords.y,
			z = coords.z
		})

		TriggerServerEvent('esx:updateLastPosition', {
			x = coords.x,
			y = coords.y,
			z = coords.z
		})

		RespawnPed(playerPed, {
			x = coords.x,
			y = coords.y,
			z = coords.z
		})

		StopScreenEffect('DeathFailOut')

		DoScreenFadeIn(800)

	end)

end)

#18
  1. After death money amount, inventory etc. doesn’t refresh, you have to relog for them to refresh (disappear).
  2. After reviving by a medic, players teleport to hospital instead of appear at same place.
  3. You can’t rotate camera when downed.

#19
  1. You screwed something up in install.

  2. See 1.

  3. That’s intended.


#20

when i die what do i need click on for respawn ? if there no ems online