Update fn_getModelName

This commit is contained in:
A Man
2022-05-20 15:34:43 +02:00
parent a0e5274172
commit 3e884a8140

View File

@@ -1,18 +1,14 @@
local _model = ""; local _model = "";
if (!isNull _this) then { if (!isNull _this) then {
local _array = toArray (str _this); local _array = toArray (str _this);
local _begin = (_array find 58) + 2; // ": " local _begin = (_array find 58) + 2; // ": "
local _end = (_array find 46) + 3; // ".p3d"
local _array2 = []; local _array2 = [];
for "_i" from _begin to ((count _array) - 1) do { for "_i" from _begin to _end do {
_array2 = _array2 + [_array select _i]; _array2 set [count _array2, _array select _i];
}; };
if (!local _this) then {
_array2 resize ((count _array2) - 7); // " REMOTE"
};
_model = toLower (toString _array2); _model = toLower (toString _array2);
}; };
_model _model