From 80d31bce5f413be657a17695bf570d5df54ac678 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Sun, 27 Oct 2013 09:56:48 -0500 Subject: [PATCH] Added ability to force on or off the name tags DZE_ForceNameTagsOff disables feature and DZE_ForceNameTags does not give the player an option and just enables tags. --- SQF/dayz_code/compile/fn_selfActions.sqf | 13 ++++++++++--- SQF/dayz_code/init/variables.sqf | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index df38c9e78..8c5bc30cc 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -37,9 +37,16 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then { s_player_removeflare = -1; }; -if (s_player_showname < 0 and !_isPZombie) then { - s_player_showname = player addAction ["Display Name (Yes)", "\z\addons\dayz_code\actions\display_name.sqf",true, 0, true, false, "",""]; - s_player_showname1 = player addAction ["Display Name (No)", "\z\addons\dayz_code\actions\display_name.sqf",false, 0, true, false, "",""]; +if (!DZE_ForceNameTagsOff) + if (s_player_showname < 0 and !_isPZombie) then { + if (DZE_ForceNameTags) then { + s_player_showname = 1; + player setVariable["DZE_display_name",true,true]; + } else { + s_player_showname = player addAction ["Display Name (Yes)", "\z\addons\dayz_code\actions\display_name.sqf",true, 0, true, false, "",""]; + s_player_showname1 = player addAction ["Display Name (No)", "\z\addons\dayz_code\actions\display_name.sqf",false, 0, true, false, "",""]; + }; + }; }; if(_isPZombie) then { diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 39e619534..e21cd35d1 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -618,6 +618,12 @@ if(!isDedicated) then { if(isNil "DZE_AllowCargoCheck") then { DZE_AllowCargoCheck = true; }; + if(isNil "DZE_ForceNameTags") then { + DZE_ForceNameTags = false; + }; + if(isNil "DZE_ForceNameTagsOff") then { + DZE_ForceNameTagsOff = false; + }; DZE_CanPickup = true; DZE_Q = false;