mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
only allow selling of vehicle if local to player
This makes it so you must get into the drivers seat once first before you can sell the vehicle.
This commit is contained in:
@@ -4,8 +4,8 @@ if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLA
|
||||
TradeInprogress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -148,6 +148,7 @@ if (_qty >= _qty_in) then {
|
||||
_okToSell = false;
|
||||
};
|
||||
};
|
||||
if(local _obj) then {
|
||||
|
||||
if(_okToSell) then {
|
||||
|
||||
@@ -170,6 +171,9 @@ if (_qty >= _qty_in) then {
|
||||
} else {
|
||||
cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -4,8 +4,8 @@ if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLA
|
||||
TradeInprogress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -145,6 +145,10 @@ if (_qty >= _qty_in) then {
|
||||
_obj = _obj select 0;
|
||||
|
||||
_okToSell = true;
|
||||
if(!local _obj) then {
|
||||
_okToSell = false;
|
||||
};
|
||||
|
||||
if(_okToSell and !isNull _obj and alive _obj) then {
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
@@ -160,6 +164,8 @@ if (_qty >= _qty_in) then {
|
||||
deleteVehicle _obj;
|
||||
|
||||
cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLA
|
||||
TradeInprogress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_104") , "PLAIN DOWN"]; };
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -169,9 +169,9 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
if(_okToSell) then {
|
||||
if(local _obj and !isNull _obj and alive _obj) then {
|
||||
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
if(_okToSell) then {
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
@@ -186,10 +186,14 @@ if (_qty >= _qty_in) then {
|
||||
deleteVehicle _obj;
|
||||
|
||||
cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -4974,5 +4974,15 @@
|
||||
<French></French>
|
||||
<Czech></Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_245">
|
||||
<Original>Failed to sell vehicle, you must get into drivers seat first.</Original>
|
||||
<English>Failed to sell vehicle, you must get into drivers seat first.</English>
|
||||
<German>Failed to sell vehicle, you must get into drivers seat first.</German>
|
||||
<Russian>Failed to sell vehicle, you must get into drivers seat first.</Russian>
|
||||
<Spanish>Failed to sell vehicle, you must get into drivers seat first.</Spanish>
|
||||
<Dutch>Failed to sell vehicle, you must get into drivers seat first.</Dutch>
|
||||
<French>Failed to sell vehicle, you must get into drivers seat first.</French>
|
||||
<Czech>Failed to sell vehicle, you must get into drivers seat first.</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user