Epoch/Sources/epoch_code/compile/p2p_trading/EPOCH_startTRADEREQ.sqf

21 lines
443 B
Plaintext
Raw Normal View History

2015-09-14 20:55:36 +00:00
private["_distance"];
_otherPlyr = _this select 0;
if (!isNull _otherPlyr) then {
_distance = player distance _otherPlyr;
if (_distance < 10) then {
// restict to only players not in vehicles
if (vehicle player == player && vehicle _otherPlyr == _otherPlyr) then {
2015-12-23 17:38:11 +00:00
// send
_this remoteExec ["EPOCH_server_tradeRequest",2];
2015-09-14 20:55:36 +00:00
// target other player
EPOCH_p2ptradeTarget = _otherPlyr;
call EPOCH_startTrade;
};
};
};