mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #1966 from oiad/patch-4
Dont show incomplete lockbox code
This commit is contained in:
@@ -120,16 +120,17 @@ _fnc_lockCode = {
|
||||
private ["_color","_code"];
|
||||
|
||||
if (_this == "") exitWith {0};
|
||||
_color = "";
|
||||
_code = if (typeName _this == "STRING") then {parseNumber _this} else {_this};
|
||||
if (_code < 10000 || {_code > 10299}) exitWith {0};
|
||||
_color = "";
|
||||
_code = _code - 10000;
|
||||
|
||||
|
||||
if (_code <= 99) then {_color = localize "STR_TEAM_RED";};
|
||||
if (_code >= 100 && _code <= 199) then {_color = localize "STR_TEAM_GREEN"; _code = _code - 100;};
|
||||
if (_code >= 200) then {_color = localize "STR_TEAM_BLUE"; _code = _code - 200;};
|
||||
if (_code <= 9) then {_code = format["0%1", _code];};
|
||||
_code = format ["%1%2",_color,_code];
|
||||
|
||||
|
||||
_code
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user