summaryrefslogtreecommitdiffstats
path: root/Client/Module/ISIS/ISIS_Wound.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:38:09 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:38:09 +0300
commita3a91d4f45b22fd487ecbc954ad979be5d03efdd (patch)
treea554ab159a347dcd6c00ca1c7c26c1ec3ac0a6bd /Client/Module/ISIS/ISIS_Wound.sqf
downloada2wf_chernarus-main.tar.gz
a2wf_chernarus-main.tar.bz2
a2wf_chernarus-main.zip
Diffstat (limited to '')
-rw-r--r--Client/Module/ISIS/ISIS_Wound.sqf62
1 files changed, 62 insertions, 0 deletions
diff --git a/Client/Module/ISIS/ISIS_Wound.sqf b/Client/Module/ISIS/ISIS_Wound.sqf
new file mode 100644
index 0000000..3638718
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Wound.sqf
@@ -0,0 +1,62 @@
+Private ["_damage","_damages","_isStuned","_lastWound","_type","_unit"];
+
+_unit = _this select 0;
+_type = _this select 1;
+_damages = _this select 2;
+
+if (vehicle _unit == _unit) then {
+ _isStuned = _unit getVariable "stunned";
+ _lastWound = _unit getVariable "lastWound";
+ if (isNil "_isStuned") then {_isStuned = false};
+ if (isNil "_lastWound") then {_lastWound = round(time)};
+ if (_isStuned) exitWith {
+ if (time - _lastWound > 3) then {_damages} else {false}
+ };
+
+ _unit setVariable ["lastWound",round time];
+ _damage = true;
+
+ switch (_type) do {
+ case "head_hit": {
+ if (_damages > 0.4 && _damages < 1) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 5) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "body": {
+ if (_damages > 0.65 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "hands": {
+ if (_damages > 0.76 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "legs": {
+ if (_damages > 0.68 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "": {
+ _damage = false;
+ };
+ };
+
+ if (_isStuned) then {[_unit] Spawn ISIS_Wounded};
+
+ if (_damage) then {_damages} else {false};
+} else {
+ _damages
+}; \ No newline at end of file