diff --git a/SQF/dayz_code/compile/player_traderCity.sqf b/SQF/dayz_code/compile/player_traderCity.sqf new file mode 100644 index 000000000..68526e335 --- /dev/null +++ b/SQF/dayz_code/compile/player_traderCity.sqf @@ -0,0 +1,25 @@ +private ["_traderName","_showText","_enterORleave"]; +_traderName = _this select 0; +_showText = _this select 1; +_enterORleave = _this select 2; + +switch _enterORleave do { + case "enter": { + if (_showText) then { + cutText [format [localize "STR_EPOCH_TRADER_ENTER", _traderName], "PLAIN DOWN"]; + }; + canbuild = false; + inTraderCity = _traderName; + isInTraderCity = true; + }; + + case "leave": { + if (_showText) then { + cutText [format [localize "STR_EPOCH_TRADER_LEAVE", _traderName], "PLAIN DOWN"]; + }; + + canbuild = true; + inTraderCity = "Any"; + isInTraderCity = false; + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf index fd0c70488..8b285d3cc 100644 --- a/SQF/dayz_code/compile/player_updateGui.sqf +++ b/SQF/dayz_code/compile/player_updateGui.sqf @@ -188,7 +188,7 @@ if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarg _color = "color='#3333ff'"; }; }; - if(_humanityTarget getVariable ["DZE_display_name", false]) then { + if((_humanityTarget getVariable ["DZE_display_name", false]) or (DZE_ForceNameTagsInTrader && isInTraderCity)) then { _string = format["%1",(name _humanityTarget),_color,_size]; }; }; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index c013eed02..30b6f89d5 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -295,6 +295,7 @@ r_action_repair = false; r_action_targets = []; r_pitchWhine = false; r_isBandit = false; +isInTraderCity = false; DZE_PROTOBOX = objNull;