Searching for an CPR script

Hi! I am searching for an cpr script! I can’t find it…

Anyone that knows one? Its for FXServer so no vRP or ESX scripts I am looking for…

I am still looking…

Do you mean a CPR script with the animations? I don’t believe one has been created yet.

There is one what I saw in a server.

So why not go ask that server developer…

I had started to mess with one, this is what I had made up.

function startCPR()
	local coordA = GetEntityCoords(myPatient, 1)
	local coordB = GetOffsetFromEntityInWorldCoords(myPatient, 0.0, 0.5, 0.0)
	local myPatient = getPatientInDirection(coordA, coordB)
	local curHp = GetEntityHealth(myPatient)
	if OnDutyEMS and IsControlJustPressed(1, 156) and GetEntityHealth(myPatient) == 20.0 then -- Should be (F6) which is Trevor Swap.
		ShowNotification("Attempting ~r~CPR~w~!")
		TaskPlayAnim(myPatient, mini@cpr@char_a@cpr_def, cpr_kol, 8.0, 0, -1, 32, 0.0, 0, 0, 0) -- CPR Breath (play first) mini@cpr@char_a@cpr_def  cpr_kol 7466 
		Wait(10000)
		TaskPlayAnim(myPatient, mini@cpr@char_a@cpr_st, cpr_pumpchest, 8.0, 0, -1, 32, 0, 0, 0, 0) -- CPR Chest Pump (play second) mini@cpr@char_a@cpr_st cpr_pumpchest 1000
		ReviveInjuredPed(myPatient)
		Wait(10000)
		ShowNotification("~r~CPR~w~ Successful!")
	end
end
1 Like

Maybe I should continue to work on this resource…

That looks actually nice!

It has been completely untested and I highly doubt it works… lol however thank you for the kind words.

About that actually, would you bring it out soon or?

I’ll work on it tomorrow and at least get a working rendition of the CPR.

1 Like

I’m still working on it, hit a few snags along the way but I’m trying to figure it all out. It will not have any other dependencies and will control the coma / knockout as well.

I will be alerted :wink:

Just an update, I got the animations working. I’ll work on getting a video of them to you, they will take some time in order to get them lined up properly but it’s crudely doing CPR. :slight_smile:

1 Like

Sorry for taking so long, I should have this to you by today.

1 Like

Is this something that will be released to everyone? I’m interested in it myself.

I’ll be releasing it to everyone, this community is built on opensource my man. However, there’s been a few bugs I’m running into so I may release it as is with said bugs unfortunately and then update it as I get them worked out.

1 Like

That’s understandable. It unfortunate that I had to ask a lot of people don’t like giving out their stuff and/or are trying to make money off it you know how it goes.

Did you fix the bugs? :smiley:

Hello.

I am at work and have the code at home. I have not fixed all the bugs due to lack of time but I will release what I have for someone to take over. :slight_smile:

2 Likes

Can you release what you have so far? I would appreciate it beyond belief! Also, I’m sure others would greatly appreciate it as well.

Also, if there are still bugs, I can continue to develop it further for ya, and repost once I exceed my work on the script!

Thanks again man