mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 21:29:59 +03:00
zabn localization + halo
This commit is contained in:
355
SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf
Normal file
355
SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf
Normal file
@@ -0,0 +1,355 @@
|
||||
scriptName "modules_e\Functions\objects\fn_HALO.sqf";
|
||||
sleep 0.01;
|
||||
|
||||
//--- HALO -------------------------------------------------------------------------------------------------------------------------------------
|
||||
if (typename _this == typename objnull) then {
|
||||
|
||||
_unit = _this;
|
||||
|
||||
//--- Eject!
|
||||
waituntil {(vehicle _unit) iskindof "ParachuteBase" || !isnil {_unit getvariable "bis_fnc_halo_now"}};
|
||||
if (!local _unit) exitwith {};
|
||||
|
||||
//--- Delete parachute
|
||||
_parachute = vehicle _unit;
|
||||
if (_parachute != _unit) then {
|
||||
deletevehicle _parachute;
|
||||
};
|
||||
|
||||
//--- Init
|
||||
_dir = ([[0,0,0],velocity _unit] call bis_fnc_dirto);
|
||||
_unit setdir _dir;
|
||||
[objNull, player, rSwitchMove,"HaloFreeFall_non"] call RE;
|
||||
player switchmove "HaloFreeFall_non";
|
||||
|
||||
//--- Key controls
|
||||
if (_unit == player) then {
|
||||
//--- PLAYER ------------------------------------------------
|
||||
|
||||
_brightness = 0.99;
|
||||
_pos = position player;
|
||||
_parray = [
|
||||
/* 00 */ ["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13, 0],
|
||||
/* 01 */ "",
|
||||
/* 02 */ "Billboard",
|
||||
/* 03 */ 1,
|
||||
/* 04 */ 3,
|
||||
/* 05 */ [0,0,-200],
|
||||
/* 06 */ wind,
|
||||
/* 07 */ 0,
|
||||
/* 08 */ 1.275,
|
||||
/* 09 */ 1,
|
||||
/* 10 */ 0,
|
||||
/* 11 */ [100],
|
||||
/* 12 */ [
|
||||
[_brightness,_brightness,_brightness,0],
|
||||
[_brightness,_brightness,_brightness,0.01],
|
||||
[_brightness,_brightness,_brightness,0.10],
|
||||
[_brightness,_brightness,_brightness,0]
|
||||
],
|
||||
/* 13 */ [1000],
|
||||
/* 14 */ 0,
|
||||
/* 15 */ 0,
|
||||
/* 16 */ "",
|
||||
/* 17 */ "",
|
||||
/* 18 */ player
|
||||
];
|
||||
bis_fnc_halo_clouds = "#particlesource" createVehicleLocal _pos;
|
||||
bis_fnc_halo_clouds setParticleParams _parray;
|
||||
bis_fnc_halo_clouds setParticleRandom [0, [100, 100, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 1];
|
||||
bis_fnc_halo_clouds setParticleCircle [00, [00, 00, 00]];
|
||||
bis_fnc_halo_clouds setDropInterval (0.4 - (0.3 * overcast));
|
||||
|
||||
|
||||
//--- Effects
|
||||
bis_fnc_halo_ppRadialBlur = ppeffectcreate ["RadialBlur",464];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.01,0.01,0.3,0.3];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
|
||||
bis_fnc_halo_ppRadialBlur ppEffectEnable true ;
|
||||
bis_fnc_halo_soundLoop = time;
|
||||
playsound "BIS_HALO_Flapping";
|
||||
|
||||
bis_fnc_halo_action = _unit addaction [localize "STR_HALO_OPEN_CHUTE","ZabnMods\compile\fn_halo.sqf",[],1,true,true,"Eject"];
|
||||
|
||||
bis_fnc_halo_keydown = {
|
||||
_key = _this select 1;
|
||||
|
||||
//--- Forward
|
||||
//if (_key in (actionkeys 'HeliForward')) then {
|
||||
if (_key in (actionkeys 'MoveForward')) then {
|
||||
if (bis_fnc_halo_vel < +bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel + bis_fnc_halo_velAdd};
|
||||
};
|
||||
|
||||
//--- Backward
|
||||
//if (_key in (actionkeys 'HeliBack')) then {
|
||||
if (_key in (actionkeys 'MoveBack')) then {
|
||||
if (bis_fnc_halo_vel > -bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel - bis_fnc_halo_velAdd};
|
||||
};
|
||||
|
||||
//--- Left
|
||||
//if (_key in (actionkeys 'HeliCyclicLeft')) then {
|
||||
if (_key in (actionkeys 'TurnLeft')) then {
|
||||
if (bis_fnc_halo_dir > -bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir - bis_fnc_halo_dirAdd};
|
||||
};
|
||||
|
||||
//--- Right
|
||||
//if (_key in (actionkeys 'HeliCyclicRight')) then {
|
||||
if (_key in (actionkeys 'TurnRight')) then {
|
||||
if (bis_fnc_halo_dir < +bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir + bis_fnc_halo_dirAdd};
|
||||
};
|
||||
};
|
||||
bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];
|
||||
|
||||
//--- Loop
|
||||
bis_fnc_halo_vel = 0;
|
||||
bis_fnc_halo_velLimit = 0.2;
|
||||
bis_fnc_halo_velAdd = 0.03;
|
||||
bis_fnc_halo_dir = 0;
|
||||
bis_fnc_halo_dirLimit = 1;
|
||||
bis_fnc_halo_dirAdd = 0.06;
|
||||
|
||||
[] spawn {
|
||||
_time = time - 0.1;
|
||||
while {alive player && vehicle player == player && isnil {player getvariable "bis_fnc_halo_terminate"}} do {
|
||||
|
||||
//--- FPS counter
|
||||
_fpsCoef = ((time - _time) * 60) / acctime; //Script is optimized for 60 FPS
|
||||
_time = time;
|
||||
|
||||
bis_fnc_halo_velLimit = 0.2 * _fpsCoef;
|
||||
bis_fnc_halo_velAdd = 0.03 * _fpsCoef;
|
||||
bis_fnc_halo_dirLimit = 1 * _fpsCoef;
|
||||
bis_fnc_halo_dirAdd = 0.06 * _fpsCoef;
|
||||
|
||||
//--- Dir
|
||||
bis_fnc_halo_dir = bis_fnc_halo_dir * 0.98;
|
||||
_dir = direction player + bis_fnc_halo_dir;
|
||||
player setdir _dir;
|
||||
|
||||
//--- Velocity
|
||||
_vel = velocity player;
|
||||
bis_fnc_halo_vel = bis_fnc_halo_vel * 0.96;
|
||||
player setvelocity [
|
||||
(_vel select 0) + (sin _dir * bis_fnc_halo_vel),
|
||||
(_vel select 1) + (cos _dir * bis_fnc_halo_vel),
|
||||
(_vel select 2)
|
||||
];
|
||||
|
||||
//--- Animation system
|
||||
_anim = "HaloFreeFall_non";
|
||||
_v = bis_fnc_halo_vel;
|
||||
_h = bis_fnc_halo_dir;
|
||||
|
||||
_vLimit = 0.1;
|
||||
_hLimit = 0.3;
|
||||
if ((abs _v) > _vLimit || (abs _h) > _hLimit) then {
|
||||
_vAnim = "";
|
||||
if (_v > +_vLimit) then {_vAnim = "F"};
|
||||
if (_v < -_vLimit) then {_vAnim = "B"};
|
||||
_hAnim = "";
|
||||
if (_h > +_hLimit) then {_hAnim = "R"};
|
||||
if (_h < -_hLimit) then {_hAnim = "L"};
|
||||
_anim = "HaloFreeFall_" + _vAnim + _hAnim;
|
||||
};
|
||||
|
||||
player playmovenow _anim;
|
||||
|
||||
//--- Sound
|
||||
if ((time - bis_fnc_halo_soundLoop) > 4.5) then {
|
||||
playsound "BIS_HALO_Flapping";
|
||||
bis_fnc_halo_soundLoop = time;
|
||||
};
|
||||
|
||||
//--- Effects
|
||||
bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.02,0.02,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
|
||||
sleep 0.01;
|
||||
};
|
||||
//--- End
|
||||
player removeaction bis_fnc_halo_action;
|
||||
(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_keydown_eh];
|
||||
ppeffectdestroy bis_fnc_halo_ppRadialBlur;
|
||||
deletevehicle bis_fnc_halo_clouds;
|
||||
|
||||
bis_fnc_halo_clouds = nil;
|
||||
bis_fnc_halo_vel = nil;
|
||||
bis_fnc_halo_velLimit = nil;
|
||||
bis_fnc_halo_velAdd = nil;
|
||||
bis_fnc_halo_dir = nil;
|
||||
bis_fnc_halo_dirLimit = nil;
|
||||
bis_fnc_halo_dirAdd = nil;
|
||||
bis_fnc_halo_action = nil;
|
||||
bis_fnc_halo_keydown = nil;
|
||||
bis_fnc_halo_keydown_eh = nil;
|
||||
|
||||
if (!alive player) then {
|
||||
[objNull, player, rSwitchMove,"adthppnemstpsraswrfldnon_1"] call RE;
|
||||
player switchmove "adthppnemstpsraswrfldnon_1";
|
||||
player setvelocity [0,0,0];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
//--- AI ------------------------------------------------
|
||||
while {(position _unit select 2) > 100} do {
|
||||
_destination = expecteddestination _unit select 0;
|
||||
if (_destination distance [position _unit select 0,position _unit select 1,0] > 10) then {
|
||||
_vel = velocity _unit;
|
||||
_dirTo = [_unit,_destination] call bis_fnc_dirto;
|
||||
if (player distance _unit > 500) then {
|
||||
_unit setdir _dirTo;
|
||||
};
|
||||
_unit setvelocity [
|
||||
(_vel select 0) + (sin _dirTo * 0.2),
|
||||
(_vel select 1) + (cos _dirTo * 0.2),
|
||||
(_vel select 2)
|
||||
];
|
||||
};
|
||||
sleep 0.01;
|
||||
};
|
||||
|
||||
//--- Open
|
||||
[_unit] spawn bis_fnc_halo;
|
||||
};
|
||||
};
|
||||
|
||||
//--- PARA -------------------------------------------------------------------------------------------------------------------------------------
|
||||
if (typename _this == typename []) then {
|
||||
|
||||
_unit = _this select 0;
|
||||
if (!local _unit) exitwith {};
|
||||
|
||||
//--- Free fall
|
||||
if (count _this == 2) exitwith {
|
||||
_alt = _this select 1;
|
||||
_unit setpos [position _unit select 0,position _unit select 1,_alt];
|
||||
_unit setvariable ["bis_fnc_halo_now",true];
|
||||
_unit spawn bis_fnc_halo;
|
||||
};
|
||||
//-------------
|
||||
|
||||
_para = objnull;
|
||||
_vel = [];
|
||||
_para = "ParachuteWest" createVehicle position _unit;
|
||||
//_para = "BIS_Steerable_Parachute" createVehicle position _unit;
|
||||
_para setpos position _unit;
|
||||
_para setdir direction _unit;
|
||||
_vel = velocity _unit;
|
||||
_unit moveindriver _para;
|
||||
//_unit moveingunner _para;
|
||||
_para lock false;
|
||||
|
||||
bis_fnc_halo_para_dirAbs = direction _para;
|
||||
|
||||
//--- Key controls
|
||||
if (_unit == player) then {
|
||||
_para setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)*1];
|
||||
|
||||
bis_fnc_halo_DynamicBlur = ppeffectcreate ["DynamicBlur",464];
|
||||
bis_fnc_halo_DynamicBlur ppEffectEnable true;
|
||||
bis_fnc_halo_DynamicBlur ppEffectAdjust [8.0];
|
||||
bis_fnc_halo_DynamicBlur ppEffectCommit 0;
|
||||
bis_fnc_halo_DynamicBlur ppEffectAdjust [0.0];
|
||||
bis_fnc_halo_DynamicBlur ppEffectCommit 1;
|
||||
|
||||
bis_fnc_halo_para_vel = 0;
|
||||
bis_fnc_halo_para_velLimit = 0.5;
|
||||
bis_fnc_halo_para_velAdd = 0.01;
|
||||
bis_fnc_halo_para_dir = 0;
|
||||
bis_fnc_halo_para_dirLimit = 1.5;
|
||||
bis_fnc_halo_para_dirAdd = 0.03;
|
||||
|
||||
bis_fnc_halo_para_keydown = {
|
||||
_key = _this select 1;
|
||||
|
||||
//--- Forward
|
||||
if (_key in (actionkeys 'MoveForward')) then {
|
||||
if (bis_fnc_halo_para_vel < +bis_fnc_halo_para_velLimit) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel + bis_fnc_halo_para_velAdd};
|
||||
};
|
||||
|
||||
//--- Backward
|
||||
if (_key in (actionkeys 'MoveBack')) then {
|
||||
if (bis_fnc_halo_para_vel > -bis_fnc_halo_para_velLimit*0) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel - bis_fnc_halo_para_velAdd};
|
||||
};
|
||||
|
||||
//--- Left
|
||||
if (_key in (actionkeys 'TurnLeft')) then {
|
||||
if (bis_fnc_halo_para_dir > -bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir - bis_fnc_halo_para_dirAdd};
|
||||
};
|
||||
|
||||
//--- Right
|
||||
if (_key in (actionkeys 'TurnRight')) then {
|
||||
if (bis_fnc_halo_para_dir < +bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir + bis_fnc_halo_para_dirAdd};
|
||||
};
|
||||
};
|
||||
bis_fnc_halo_para_loop_time = time - 0.1;
|
||||
bis_fnc_halo_para_velZ = velocity _para select 2;
|
||||
bis_fnc_halo_para_loop = {
|
||||
if (!isnil {player getvariable "bis_fnc_halo_terminate"}) exitwith {};
|
||||
if (time == bis_fnc_halo_para_loop_time) exitwith {}; //--- FPS too high
|
||||
|
||||
_para = vehicle player;
|
||||
|
||||
//--- FPS counter
|
||||
_fpsCoef = ((time - bis_fnc_halo_para_loop_time) * 20) / acctime; //Script is optimized for 20 FPS
|
||||
bis_fnc_halo_para_loop_time = time;
|
||||
|
||||
//_fpsCoef = _fpsCoef / 3;
|
||||
bis_fnc_halo_para_velLimit = 0.3 * _fpsCoef;
|
||||
bis_fnc_halo_para_velAdd = 0.002 * _fpsCoef;
|
||||
bis_fnc_halo_para_dirLimit = 1.5 * _fpsCoef;
|
||||
bis_fnc_halo_para_dirAdd = 0.03 * _fpsCoef;
|
||||
|
||||
//--- Dir
|
||||
bis_fnc_halo_para_dir = bis_fnc_halo_para_dir * 0.98;
|
||||
bis_fnc_halo_para_dirAbs = bis_fnc_halo_para_dirAbs + bis_fnc_halo_para_dir;
|
||||
_para setdir bis_fnc_halo_para_dirAbs;
|
||||
_dir = direction _para;
|
||||
|
||||
//--- Crash
|
||||
_velZ = velocity _para select 2;
|
||||
if ((_velZ - bis_fnc_halo_para_velZ) > 7 && (getposatl _para select 2) < 100) then {player setdamage 1;debuglog ["Log::::::::::::::",(_velZ - bis_fnc_halo_para_velZ)];};
|
||||
bis_fnc_halo_para_velZ = _velZ;
|
||||
|
||||
//--- Pos
|
||||
_para setposasl [
|
||||
(getposasl _para select 0) + (sin _dir * (0.1 + bis_fnc_halo_para_vel)),
|
||||
(getposasl _para select 1) + (cos _dir * (0.1 + bis_fnc_halo_para_vel)),
|
||||
(getposasl _para select 2) - 0.01 - 0.1 * abs bis_fnc_halo_para_vel
|
||||
];
|
||||
|
||||
[
|
||||
_para,
|
||||
(-bis_fnc_halo_para_vel * 75) + 0.5*(sin (time * 180)),
|
||||
(+bis_fnc_halo_para_dir * 25) + 0.5*(cos (time * 180))
|
||||
] call bis_fnc_setpitchbank;
|
||||
};
|
||||
|
||||
bis_fnc_halo_para_mousemoving_eh = (finddisplay 46) displayaddeventhandler ["mousemoving","_this call bis_fnc_halo_para_loop;"];
|
||||
bis_fnc_halo_para_mouseholding_eh = (finddisplay 46) displayaddeventhandler ["mouseholding","_this call bis_fnc_halo_para_loop;"];
|
||||
|
||||
sleep 4;
|
||||
|
||||
ppeffectdestroy bis_fnc_halo_DynamicBlur;
|
||||
bis_fnc_halo_para_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_para_keydown;"];
|
||||
|
||||
//--- End
|
||||
//waituntil {vehicle player == player};
|
||||
player setvariable ["bis_fnc_halo_terminate",nil];
|
||||
waituntil {(position vehicle player select 2) < 2 || !isnil {player getvariable "bis_fnc_halo_terminate"}};
|
||||
(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_para_keydown_eh];
|
||||
(finddisplay 46) displayremoveeventhandler ["mousemoving",bis_fnc_halo_para_mousemoving_eh];
|
||||
(finddisplay 46) displayremoveeventhandler ["mouseholding",bis_fnc_halo_para_mouseholding_eh];
|
||||
|
||||
bis_fnc_halo_para_vel = nil;
|
||||
bis_fnc_halo_para_velLimit = nil;
|
||||
bis_fnc_halo_para_velAdd = nil;
|
||||
bis_fnc_halo_para_dir = nil;
|
||||
bis_fnc_halo_para_dirLimit = nil;
|
||||
bis_fnc_halo_para_dirAdd = nil;
|
||||
bis_fnc_halo_para_keydown = nil;
|
||||
bis_fnc_halo_para_loop = nil;
|
||||
bis_fnc_halo_para_keydown_eh = nil;
|
||||
bis_fnc_halo_para_mousemoving_eh = nil;
|
||||
bis_fnc_halo_para_mouseholding_eh = nil;
|
||||
};
|
||||
};
|
||||
@@ -15,6 +15,6 @@ _isOk = false;
|
||||
} forEach ["LandVehicle","Air", "Ship"];
|
||||
|
||||
if((locked _cTarget) and _isOk and (((vehicle player) distance _cTarget) < 12)) then {
|
||||
cutText ["Cannot access gear in a locked vehicle." , "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_7") , "PLAIN DOWN"];
|
||||
_display closeDisplay 1;
|
||||
};
|
||||
|
||||
@@ -37,6 +37,18 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
|
||||
s_player_removeflare = -1;
|
||||
};
|
||||
|
||||
if(DZE_HaloJump) then {
|
||||
if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) > 400)) then {
|
||||
if (s_halo_action < 0) then {
|
||||
DZE_myHaloVehicle = _vehicle;
|
||||
s_halo_action = DZE_myHaloVehicle addAction ["HALO Jump","\z\addons\dayz_code\actions\halo_jump.sqf",[],2,false,true,"",""];
|
||||
};
|
||||
} else {
|
||||
DZE_myHaloVehicle removeAction s_halo_action;
|
||||
s_halo_action = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (!DZE_ForceNameTagsOff) then {
|
||||
if (s_player_showname < 0 and !_isPZombie) then {
|
||||
if (DZE_ForceNameTags) then {
|
||||
|
||||
@@ -9,5 +9,5 @@ _nearNet = _nearNets select 0;
|
||||
if (!isNull _nearNet and _canDo) then {
|
||||
[0,1,2,_nearNet] spawn player_removeObject;
|
||||
} else {
|
||||
cutText ["No camo nets found nearby.", "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_8"), "PLAIN DOWN"];
|
||||
};
|
||||
@@ -25,7 +25,7 @@ if ((count _intersectsWith) > 0) then {
|
||||
} forEach _intersectsWith;
|
||||
if(_activated) then {
|
||||
diag_log format["Player Wall glitched %1 - player: %2 vehicle:%4", player,_playerPos,_vehiclePos];
|
||||
cutText ["You have been crushed between two objects.", "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_9"), "PLAIN DOWN"];
|
||||
_id = [player,"bled"] spawn player_death;
|
||||
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_alreadyPacking","_lockedClass","_text","_playerNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Lock already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_obj = _this;
|
||||
@@ -18,7 +18,7 @@ if(isNull _obj) exitWith { TradeInprogress = false; };
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot lock while another player is nearby." , "PLAIN DOWN"]; };
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"]; };
|
||||
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -28,11 +28,11 @@ player playActionNow "Medic";
|
||||
player removeAction s_player_lockvault;
|
||||
s_player_lockvault = 1;
|
||||
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format["You cannot lock this %1, you do not know the combination.",_text], "PLAIN DOWN"]; };
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_115"),_text], "PLAIN DOWN"]; };
|
||||
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format["That %1 is already being locked.",_text], "PLAIN DOWN"]};
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_116"),_text], "PLAIN DOWN"]};
|
||||
|
||||
_obj setVariable["packing",1];
|
||||
|
||||
@@ -77,7 +77,7 @@ if(!isNull _obj) then {
|
||||
_holder setVariable ["BackpackCargo", _backpacks, true];
|
||||
};
|
||||
|
||||
cutText [format["Your %1 has been locked",_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
|
||||
|
||||
s_player_lockvault = -1;
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_btnAbortTe
|
||||
};
|
||||
case (!r_player_dead and !canbuild) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
cutText ["Cannot Abort while in a trader city!", "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_12"), "PLAIN DOWN"];
|
||||
};
|
||||
case (!r_player_dead and player getVariable["combattimeout", 0] >= time) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
private ["_activatingPlayer","_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking","_dis","_sfx","_classname","_location"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_13") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
@@ -18,7 +18,7 @@ _objectUID = _obj getVariable["ObjectUID","0"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packtent = -1; cutText ["Tent not setup yet.", "PLAIN DOWN"];};
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [(localize "str_epoch_player_14"), "PLAIN DOWN"];};
|
||||
|
||||
if(_ownerID != dayz_characterID) exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [localize "str_fail_tent_pack", "PLAIN DOWN"];};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
private ["_activatingPlayer","_obj","_ownerID","_objectID","_objectUID","_alreadyPacking","_location1","_location2","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_packedClass","_text","_playerNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["That is already being packed." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_15") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
@@ -18,7 +18,7 @@ if(isNull _obj or !(alive _obj)) exitWith { TradeInprogress = false; };
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot pack while another player is nearby." , "PLAIN DOWN"]; };
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_16") , "PLAIN DOWN"]; };
|
||||
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -27,23 +27,23 @@ _objectUID = _obj getVariable["ObjectUID","0"];
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = 1;
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format["%1 not setup yet.",_text], "PLAIN DOWN"];};
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format[(localize "str_epoch_player_118"),_text], "PLAIN DOWN"];};
|
||||
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith { TradeInprogress = false; s_player_packvault = -1; cutText [format["You cannot pack this %1, you do not know the combination.",_text], "PLAIN DOWN"];};
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith { TradeInprogress = false; s_player_packvault = -1; cutText [format[(localize "str_epoch_player_119"),_text], "PLAIN DOWN"];};
|
||||
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format["That %1 is already being packed.",_text] , "PLAIN DOWN"]};
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format[(localize "str_epoch_player_120"),_text] , "PLAIN DOWN"]};
|
||||
_obj setVariable["packing",1];
|
||||
|
||||
cutText [format["Packing %1 move from this position to cancel within 5 seconds.",_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_121"),_text], "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 > 0.1) exitWith {
|
||||
cutText [format["Packing %1 canceled.",_text] , "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_122"),_text] , "PLAIN DOWN"];
|
||||
_obj setVariable["packing",0];
|
||||
};
|
||||
|
||||
@@ -105,7 +105,7 @@ if(!isNull _obj and alive _obj) then {
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_123"),_text], "PLAIN DOWN"];
|
||||
|
||||
player action ["Gear", _holder];
|
||||
};
|
||||
|
||||
@@ -25,10 +25,10 @@ private ["_weapons","_magazines","_primweapon","_secweapon"];
|
||||
_weapons = weapons player;
|
||||
_magazines = call player_countmagazines; //magazines player;
|
||||
|
||||
if ( (_playerUID == dayz_playerUID) && (count _magazines == 0) && (count (magazines player) > 0 )) exitWith {cutText ["can't count magazines!", "PLAIN DOWN"]};
|
||||
if ( (_playerUID == dayz_playerUID) && (count _magazines == 0) && (count (magazines player) > 0 )) exitWith {cutText [(localize "str_epoch_player_17"), "PLAIN DOWN"]};
|
||||
|
||||
|
||||
// if ( count _magazines == 0 ) exitWith {cutText ["can't count magazines!", "PLAIN DOWN"]};
|
||||
// if ( count _magazines == 0 ) exitWith {cutText [(localize "str_epoch_player_17"), "PLAIN DOWN"]};
|
||||
|
||||
_primweapon = primaryWeapon player;
|
||||
_secweapon = secondaryWeapon player;
|
||||
|
||||
@@ -18,7 +18,7 @@ if ((_hasRawMeat) && (_hasdog == "false")) then {
|
||||
_target removeAction _id;
|
||||
player setvariable ["dogid", _fsmid];
|
||||
} else {
|
||||
cutText ["You must have RawMeat", "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_18"), "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
//handle publicVariables here later.
|
||||
|
||||
@@ -54,7 +54,7 @@ if(!isNull dayz_selectedDoor) then {
|
||||
|
||||
if (isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+10;};
|
||||
|
||||
cutText ["Wrong code entered to many times wait 10 seconds", "PLAIN DOWN"];
|
||||
cutText [(localize "str_epoch_player_19"), "PLAIN DOWN"];
|
||||
_display = findDisplay 41144;
|
||||
_display closeDisplay 3000;
|
||||
};
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking","_playerNear","_playerID","_claimedBy","_unlockedClass","_text"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Unlock already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_21") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot unlock while another player is nearby." , "PLAIN DOWN"]; };
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_20") , "PLAIN DOWN"]; };
|
||||
|
||||
_obj = _this;
|
||||
|
||||
@@ -28,7 +28,7 @@ if(isNull _obj or !(alive _obj)) exitWith { TradeInprogress = false; };
|
||||
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; cutText [format["That %1 is already being unlocked.",_text], "PLAIN DOWN"]};
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; cutText [format[(localize "str_epoch_player_124"),_text], "PLAIN DOWN"]};
|
||||
|
||||
// Promt user for password if _ownerID != dayz_playerUID
|
||||
if ((_ownerID == dayz_combination) or (_ownerID == dayz_playerUID)) then {
|
||||
@@ -111,7 +111,7 @@ if ((_ownerID == dayz_combination) or (_ownerID == dayz_playerUID)) then {
|
||||
} forEach _objWpnTypes;
|
||||
};
|
||||
|
||||
cutText [format["%1 has been unlocked.",_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_125"),_text], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
TradeInprogress = false;
|
||||
@@ -123,7 +123,7 @@ if ((_ownerID == dayz_combination) or (_ownerID == dayz_playerUID)) then {
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
null = [player,25,true,(getPosATL player)] spawn player_alertZombies;
|
||||
sleep 5;
|
||||
cutText [format["Combination incorrect, %1 is still locked.",_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_epoch_player_126"),_text], "PLAIN DOWN"];
|
||||
};
|
||||
s_player_unlockvault = -1;
|
||||
TradeInprogress = false;
|
||||
Reference in New Issue
Block a user