Advanced Medical System [DEPRECATED]

I have made the med to work with F6 menu on ambulance

First of all you go to esx_ambulancejob Client Side job.lu (in my case) open Ambulance Actions Menu and put the label of your med

 {label = "Check Pulse", value = 'check'},

After you go to action values and put this to the end

   elseif data.current.value == 'check' then

            target = GetPlayerServerId(closestPlayer)

            TriggerServerEvent('medSystem:check', target)

 end

After that you go to Med System Server Side and paste this

 RegisterServerEvent('medSystem:check')

 AddEventHandler('medSystem:check', function(target)

     local xPlayer = ESX.GetPlayerFromId(source)

     if xPlayer["job"]["name"] == "ambulance" then

         TriggerClientEvent('medSystem:send', target, source)

     end

 end)

and you are done :slight_smile:

Remember to check the Closest Distance as default is 1.0 if you want to raise it it is at the start of action value in Ambulance Actions Menu

2 Likes

How can i do this when you die you see how much BPM you have and how much BLOOD and when you have 0 BPM you can respawn?

you have an error in your syntax i am trying hours to find as newbie lol

please help me to add it to f6 menu ?

Send me pm

1 Like

ok thanks :heart:

isend to you pm ?

hello ???

i have the same error

hello ? Can you help me ?

did you ever finish that for non esk servers

i put /med ID and it dont work?

Just like me if You were looking for the Fix to this to Make it work…

Well i have a Gift for You all as a Community…

Special Thanks to Between HollywoodiOwnu Gaming @ Clout RP Server & My self we bring you the Fix for this Edit to Fix the Script Coding… Now it Works for Anyone that wants it… with editing of one area you can add it to the JOB you need it on and works like a Charm…

so To get it to Work Correctly and The way its set… This will Allow you to Add it to the PD “f6” menu as it sits… or you can Reque it EMS menu if you need to as well…

Say goodby to asking how many Fingers (or what ever Slang) to get them to say what position in the Server they are from now on…

Blockquote
Client Side File

{label = “Check Pulse”, value = ‘check’},

elseif action == ‘check’ then
target = GetPlayerServerId(closestPlayer)
TriggerServerEvent(‘medSystem:check’, target)

Blockquote
Server Side File

RegisterServerEvent(‘medSystem:check’)

AddEventHandler(‘medSystem:check’, function(target)

 local xPlayer = ESX.GetPlayerFromId(source)

 if xPlayer["job"]["name"] == "police" then

     TriggerClientEvent('medSystem:send', target, source)

 end

end)



Client Side.txt (240 Bytes)
Server Side.txt (355 Bytes)

See fix Below I posted, it will help you… he had it calling for something that it didn’t need too to make it work

You can compare the OP and My Post to see what the error was…

See the Edit that i helped do below to compare and let me know if it works for you.

ever get it working?

does this work with ESX Legacy?

Pls give me help!!

Did you ever get it standalone?