Help with custom death!

IIIXJokerXIII

New Member
Hello all I'm trying to do something on a server I've been working on and I'm not sure if it can be done. If anyone knows how I could make this work I would really be grateful.

1. I have access to both server and client side mod; I also can repack/sign pbo so all I'm looking for is the code and files that would need to be change for dayz

This is what I'm trying to do.
When a players dies "blood is 0" instead of him seeing the "You Are Dead" screen I want him to have the unconscious screen for 5 minutes and if another player can get to him in that 5 minutes and use a Epi-Pen he will regain 100 health and not die. At the end of that 5 minutes if a player has not used a Epi-Pen on him he will die.
 
Should be
dayz_code.pbo > compile > fn_damageHandler.sqf

If you have a custom compiles you can include a copy of the file and change your compiles to point to it.

I think you would need to find all the areas where it spawns a player death, like so:
Code:
[_source,"shotheavy"] spawn player_death;

And change it to something like this:
Knock player unconcious,
Give him godmode,
setVariable revive true,
sleep 300,
if (the player still has the revive variable set) then {
setVariable revive false,
remove godmode,
spawn player death
} else {
setVariable revive false,
remove godmode,
};

Then you would add a script where it checks if the player is unconcious, has the revive variable set, and that the person targetting them has an epi pin. If so add the action to revive them, and selected it has to

Remove the targetting players epi pin,
make the targetting player do a medic action,
Remove the players unconcious state,
set their blood to the level you want,
remove their godmode,
remove the revive variable

Its a lot of coding but it's doable.
 
Thank you for that reply that will sure get me started. I will put in the work and see if I can get it working. If I do get it to work I will post a link here for others that may want this as well. Me and my friends have a server with Sarge AI and I thought this may be really fun trying to save a friend when playing against a large bandit group. :)
 
Back
Top