mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-28 18:51:50 +03:00
Lock/unlock vehicle optimizations
This commit is contained in:
@@ -5,13 +5,16 @@ if(TradeInprogress) exitWith { cutText ["Lock vehicle already in progress." , "P
|
|||||||
TradeInprogress = true;
|
TradeInprogress = true;
|
||||||
|
|
||||||
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
||||||
|
s_player_lockUnlock_crtl = 1;
|
||||||
|
|
||||||
|
dayzLockVehicle = [_vehicle,true];
|
||||||
|
if(player distance _vehicle < 10) then {
|
||||||
|
if (local _vehicle) then {
|
||||||
|
dayzLockVehicle spawn local_lockUnlock
|
||||||
|
} else {
|
||||||
|
publicVariable "dayzLockVehicle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
s_player_lockUnlock_crtl = -1;
|
s_player_lockUnlock_crtl = -1;
|
||||||
|
|
||||||
_vehicle setVehicleInit "this lock true; this lockCargo true;";
|
|
||||||
processInitCommands;
|
|
||||||
|
|
||||||
//_vehicle lock true;
|
|
||||||
//dayzLockVehicle = [_vehicle,true];
|
|
||||||
//publicVariable "dayzLockVehicle";
|
|
||||||
|
|
||||||
TradeInprogress = false;
|
TradeInprogress = false;
|
||||||
@@ -1,13 +1,20 @@
|
|||||||
private["_vehicle"];
|
private["_vehicle"];
|
||||||
_vehicle = _this select 3;
|
_vehicle = _this select 3;
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Lock vehicle already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
||||||
|
s_player_lockUnlock_crtl = 1;
|
||||||
|
|
||||||
|
dayzLockVehicle = [_vehicle,false];
|
||||||
|
if(player distance _vehicle < 10) then {
|
||||||
|
if (local _vehicle) then {
|
||||||
|
dayzLockVehicle spawn local_lockUnlock
|
||||||
|
} else {
|
||||||
|
publicVariable "dayzLockVehicle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
s_player_lockUnlock_crtl = -1;
|
s_player_lockUnlock_crtl = -1;
|
||||||
|
TradeInprogress = false;
|
||||||
_vehicle setVehicleInit "this lock false; this lockCargo false;";
|
|
||||||
processInitCommands;
|
|
||||||
|
|
||||||
// Wiki states that lock is globally brodcast but the variable has to be local
|
|
||||||
//_vehicle lock false;
|
|
||||||
//dayzLockVehicle = [_vehicle,false];
|
|
||||||
//publicVariable "dayzLockVehicle";
|
|
||||||
Reference in New Issue
Block a user