ACE3/addons/medical_treatment/functions/fnc_treatmentCPR_start.sqf
2017-03-23 13:15:17 +01:00

19 lines
544 B
Plaintext

/*
* Author: Zakant
* Handels the start of the CPR treatment.
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
params ["_caller", "_target", "_selectionName", "_className", "_items"];
_target setVariable [QGVAR(receiveCPR), true, true]; // Target receives CPR
if(EGVAR(medical,CPRcreatesPulse)) then {
_target setVariable [QEGVAR(medical,heartRate), round (30 + random [-5, 0, 5]) , true]; // And we have a (random) pulse
};
_target setVariable [QEGVAR(medical,lastTimeUpdated), CBA_missionTime, true];