summaryrefslogtreecommitdiffstats
path: root/Common/Functions/Common_GetAIDigit.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
commitc055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch)
tree7ac98d865915930bebc86b36b512a859c31538e5 /Common/Functions/Common_GetAIDigit.sqf
downloada2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip
init
Diffstat (limited to '')
-rw-r--r--Common/Functions/Common_GetAIDigit.sqf21
1 files changed, 21 insertions, 0 deletions
diff --git a/Common/Functions/Common_GetAIDigit.sqf b/Common/Functions/Common_GetAIDigit.sqf
new file mode 100644
index 0000000..935b372
--- /dev/null
+++ b/Common/Functions/Common_GetAIDigit.sqf
@@ -0,0 +1,21 @@
+Private ["_i","_split","_unit","_yield"];
+
+_unit = _this;
+
+if (_unit == leader (group _unit)) exitWith {"Leader"};
+
+_split = toArray(str _unit);
+
+_find = _split find 58;
+_yield = [];
+
+if (_find != -1) then {
+ for '_i' from (_find+1) to count(_split)-1 do {
+ if ((_split select _i) == 65 || (_split select _i) == 32) exitWith {};
+ _yield = _yield + [_split select _i];
+ };
+};
+
+if (count _yield == 0) exitWith {"0"};
+
+toString(_yield) \ No newline at end of file