From 831c479cc7b81a7ba876ded6b5da742210ae381d Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Fri, 11 Oct 2013 11:43:01 -0500 Subject: [PATCH] disallow changing clothes if another player is near --- SQF/dayz_code/actions/player_wearClothes.sqf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/player_wearClothes.sqf b/SQF/dayz_code/actions/player_wearClothes.sqf index b475d7192..571172ce2 100644 --- a/SQF/dayz_code/actions/player_wearClothes.sqf +++ b/SQF/dayz_code/actions/player_wearClothes.sqf @@ -2,11 +2,15 @@ _item spawn player_wearClothes; Added Female skin changes - DayZ Epoch - vbawol */ -private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model"]; +private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model","_playerNear"]; if(TradeInprogress) exitWith { cutText ["\n\nChanging clothes already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; +// cannot change clothes when another player is nearby +_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; +if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot change clothes when another player is nearby." , "PLAIN DOWN"]; }; + _item = _this; call gear_ui_init;