disallow changing clothes if another player is near

This commit is contained in:
[VB]AWOL
2013-10-11 11:43:01 -05:00
parent 6dc6283c51
commit 831c479cc7

View File

@@ -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;