Jump to content
tamirlan_sky

defibrillator

Recommended Posts

Hello to all! Guys, please help with setting up a defibrillator. Where I can adjust, what after application of a defibrillator life would be restored not by 100%, but by 20%. ?

Share this post


Link to post
Share on other sites

Go into your  fn_revived.sqf and add 

player setDamage 0.8;

underneath 

//Bring me back to life.
player setDir (getDir life_corpse);
player setPosASL (visiblePositionASL life_corpse);
life_corpse setVariable ["realname",nil,true]; //Should correct the double name sinking into the ground.
life_corpse setVariable ["Revive",nil,true];
life_corpse setVariable ["name",nil,true];
[life_corpse] remoteExecCall ["life_fnc_corpse",RANY];
deleteVehicle life_corpse;

That should work.

Share this post


Link to post
Share on other sites
5 hours ago, Kaiden said:

Go into your  fn_revived.sqf and add 

player setDamage 0.8;

underneath 

//Bring me back to life.
player setDir (getDir life_corpse);
player setPosASL (visiblePositionASL life_corpse);
life_corpse setVariable ["realname",nil,true]; //Should correct the double name sinking into the ground.
life_corpse setVariable ["Revive",nil,true];
life_corpse setVariable ["name",nil,true];
[life_corpse] remoteExecCall ["life_fnc_corpse",RANY];
deleteVehicle life_corpse;

That should work.

I will do it. Thanks for the help)

Share this post


Link to post
Share on other sites

or 

player setDamage 0.0;

If you want player back to full health 

player damage variable if from 0.00 which is 100% health to 1.00 which is 0% health. Why? Arma

Share this post


Link to post
Share on other sites
12 hours ago, XaFlaForo said:

or 

player setDamage 0.0;

If you want player back to full health 

player damage variable if from 0.00 which is 100% health to 1.00 which is 0% health. Why? Arma

It's not health, it's damage. Health = Max Health - Damage. It's just a different way of thinking about it.

Share this post


Link to post
Share on other sites
On 3/11/2019 at 5:40 AM, XaFlaForo said:

or 

player setDamage 0.0;

If you want player back to full health 

player damage variable if from 0.00 which is 100% health to 1.00 which is 0% health. Why? Arma

I understand all this ... you helped me. I did not know where to write it.

Share this post


Link to post
Share on other sites

I can not write such a script. (I'm not so smart). The defibrillator should work unconscious. I found another way out, and it suits me basically.

Share this post


Link to post
Share on other sites

If anyone is interested: I added an AGM mod and added a defibrillator to all stores. Added "setDamage 0.9;" to fn_revived.sqf

#include "..\..\script_macros.hpp"
/*
    File: fn_revived.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    THANK YOU JESUS I WAS SAVED!
*/
private ["_medic","_dir","_reviveCost"];
_medic = param [0,"Unknown Medic",[""]];
_reviveCost = LIFE_SETTINGS(getNumber,"revive_fee");

[life_save_gear] spawn life_fnc_loadDeadGear;
life_corpse setVariable ["realname",nil,true]; //Should correct the double name sinking into the ground.
[life_corpse] remoteExecCall ["life_fnc_corpse",RANY];


_dir = getDir life_corpse;
hint format [localize "STR_Medic_RevivePay",_medic,[_reviveCost] call life_fnc_numberText];

closeDialog 0;
life_deathCamera cameraEffect ["TERMINATE","BACK"];
camDestroy life_deathCamera;

//Take fee for services.
if (BANK > _reviveCost) then {
    BANK = BANK - _reviveCost;
} else {
    BANK = 0;
};

//Bring me back to life.
player setDir _dir;
player setPosASL (visiblePositionASL life_corpse);
life_corpse setVariable ["Revive",nil,true];
life_corpse setVariable ["name",nil,true];
[life_corpse] remoteExecCall ["life_fnc_corpse",RANY];
deleteVehicle life_corpse;
player setDamage 0.9;

life_action_inUse = false;
life_is_alive = true;
life_nlrtimer_stop = true;

player setVariable ["Revive",nil,true];
player setVariable ["name",nil,true];
player setVariable ["Reviving",nil,true];
[] call life_fnc_playerSkins;
[] call life_fnc_hudUpdate; //Request update of hud.
[] call SOCK_fnc_updateRequest;

after using a defibrillator, the player’s life is 10%

then the player may fall into an unconscious state. This makes the AGM mod

To cure a player, you need to bandage all his body parts and inject morphine from pain. and then gradually the standard of living rises to 100%

All this is in AGM fashion

This mod allows you to wear unconscious bodies and put them in the car while he is unconscious.

If left untreated, the player will die and you will need to reuse the defibrillator.

I needed this to add realism to the RP project ...

This is my project. will soon begin to function. I am very grateful to you all for your help. I created RP island for people. A good place to play ... for the soul.

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...