mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add Better "DZE_ForceNameTagsInTrader" system
This commit is contained in:
25
SQF/dayz_code/compile/player_traderCity.sqf
Normal file
25
SQF/dayz_code/compile/player_traderCity.sqf
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -188,7 +188,7 @@ if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarg
|
|||||||
_color = "color='#3333ff'";
|
_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["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
|
_string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ r_action_repair = false;
|
|||||||
r_action_targets = [];
|
r_action_targets = [];
|
||||||
r_pitchWhine = false;
|
r_pitchWhine = false;
|
||||||
r_isBandit = false;
|
r_isBandit = false;
|
||||||
|
isInTraderCity = false;
|
||||||
|
|
||||||
DZE_PROTOBOX = objNull;
|
DZE_PROTOBOX = objNull;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user