From 441e9fb231a1a2653218eceec17cc9d5ae417fd3 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Tue, 16 Feb 2016 21:59:01 -0500 Subject: [PATCH] Update keyboard eventhandler and add rules.sqf See: https://github.com/EpochModTeam/DayZ-Epoch/pull/1673 --- CHANGE LOG 1.0.6.txt | 5 +- SQF/dayz_code/actions/dayz_spaceInterrupt.sqf | 205 ----------- SQF/dayz_code/actions/player_switchWeapon.sqf | 214 +++++++++++ SQF/dayz_code/compile/fn_buildCamera.sqf | 28 ++ SQF/dayz_code/compile/fn_unconscious.sqf | 7 +- SQF/dayz_code/compile/keyboard.sqf | 332 ++++++++++++++++++ SQF/dayz_code/init/compiles.sqf | 10 +- SQF/dayz_code/init/variables.sqf | 10 +- SQF/dayz_code/system/player_monitor.fsm | 4 +- .../MPMissions/DayZ_Epoch_1.Takistan/init.sqf | 5 +- .../DayZ_Epoch_1.Takistan/keyboard.sqf | 1 + .../DayZ_Epoch_1.Takistan/rules.sqf | 32 ++ .../DayZ_Epoch_10.Mountains_ACR/init.sqf | 5 +- .../DayZ_Epoch_10.Mountains_ACR/keyboard.sqf | 1 + .../DayZ_Epoch_10.Mountains_ACR/rules.sqf | 32 ++ .../DayZ_Epoch_11.Chernarus/init.sqf | 6 +- .../DayZ_Epoch_11.Chernarus/keyboard.sqf | 1 + .../DayZ_Epoch_11.Chernarus/rules.sqf | 32 ++ .../DayZ_Epoch_12.isladuala/init.sqf | 5 +- .../DayZ_Epoch_12.isladuala/keyboard.sqf | 1 + .../DayZ_Epoch_12.isladuala/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_13.Tavi/init.sqf | 6 +- .../DayZ_Epoch_13.Tavi/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_13.Tavi/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_15.namalsk/init.sqf | 6 +- .../DayZ_Epoch_15.namalsk/keyboard.sqf | 1 + .../DayZ_Epoch_15.namalsk/rules.sqf | 32 ++ .../DayZ_Epoch_16.Panthera2/init.sqf | 8 +- .../DayZ_Epoch_16.Panthera2/keyboard.sqf | 1 + .../DayZ_Epoch_16.Panthera2/rules.sqf | 32 ++ .../DayZ_Epoch_17.Chernarus/init.sqf | 5 +- .../DayZ_Epoch_17.Chernarus/keyboard.sqf | 1 + .../DayZ_Epoch_17.Chernarus/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_18.Sara/init.sqf | 5 +- .../DayZ_Epoch_18.Sara/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_18.Sara/rules.sqf | 32 ++ .../DayZ_Epoch_19.FDF_Isle1_a/init.sqf | 5 +- .../DayZ_Epoch_19.FDF_Isle1_a/keyboard.sqf | 1 + .../DayZ_Epoch_19.FDF_Isle1_a/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_2.Utes/init.sqf | 5 +- .../MPMissions/DayZ_Epoch_2.Utes/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_2.Utes/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_20.fapovo/init.sqf | 6 +- .../DayZ_Epoch_20.fapovo/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_20.fapovo/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_21.Caribou/init.sqf | 6 +- .../DayZ_Epoch_21.Caribou/keyboard.sqf | 1 + .../DayZ_Epoch_21.Caribou/rules.sqf | 32 ++ .../DayZ_Epoch_22.smd_sahrani_A2/init.sqf | 5 +- .../DayZ_Epoch_22.smd_sahrani_A2/keyboard.sqf | 1 + .../DayZ_Epoch_22.smd_sahrani_A2/rules.sqf | 32 ++ .../DayZ_Epoch_23.cmr_ovaron/init.sqf | 5 +- .../DayZ_Epoch_23.cmr_ovaron/keyboard.sqf | 1 + .../DayZ_Epoch_23.cmr_ovaron/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_24.Napf/init.sqf | 5 +- .../DayZ_Epoch_24.Napf/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_24.Napf/rules.sqf | 32 ++ .../DayZ_Epoch_25.sauerland/init.sqf | 5 +- .../DayZ_Epoch_25.sauerland/keyboard.sqf | 1 + .../DayZ_Epoch_25.sauerland/rules.sqf | 32 ++ .../DayZ_Epoch_3.Shapur_BAF/init.sqf | 5 +- .../DayZ_Epoch_3.Shapur_BAF/keyboard.sqf | 1 + .../DayZ_Epoch_3.Shapur_BAF/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_4.Zargabad/init.sqf | 5 +- .../DayZ_Epoch_4.Zargabad/keyboard.sqf | 1 + .../DayZ_Epoch_4.Zargabad/rules.sqf | 32 ++ .../DayZ_Epoch_5.Bootcamp_ACR/init.sqf | 5 +- .../DayZ_Epoch_5.Bootcamp_ACR/keyboard.sqf | 1 + .../DayZ_Epoch_5.Bootcamp_ACR/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_6.Dingor/init.sqf | 6 +- .../DayZ_Epoch_6.Dingor/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_6.Dingor/rules.sqf | 32 ++ .../MPMissions/DayZ_Epoch_7.Lingor/init.sqf | 6 +- .../DayZ_Epoch_7.Lingor/keyboard.sqf | 1 + .../MPMissions/DayZ_Epoch_7.Lingor/rules.sqf | 32 ++ .../DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf | 5 +- .../keyboard.sqf | 1 + .../DayZ_Epoch_8.ProvingGrounds_PMC/rules.sqf | 32 ++ .../DayZ_Epoch_9.Woodland_ACR/init.sqf | 5 +- .../DayZ_Epoch_9.Woodland_ACR/keyboard.sqf | 1 + .../DayZ_Epoch_9.Woodland_ACR/rules.sqf | 32 ++ Server Files/MPMissions/TEMPLATE/init.sqf | 5 +- Server Files/MPMissions/TEMPLATE/keyboard.sqf | 1 + Server Files/MPMissions/TEMPLATE/rules.sqf | 32 ++ 84 files changed, 1530 insertions(+), 245 deletions(-) delete mode 100644 SQF/dayz_code/actions/dayz_spaceInterrupt.sqf create mode 100644 SQF/dayz_code/actions/player_switchWeapon.sqf create mode 100644 SQF/dayz_code/compile/fn_buildCamera.sqf create mode 100644 SQF/dayz_code/compile/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_1.Takistan/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_1.Takistan/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_11.Chernarus/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_11.Chernarus/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_12.isladuala/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_12.isladuala/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_13.Tavi/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_13.Tavi/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_15.namalsk/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_15.namalsk/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_16.Panthera2/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_16.Panthera2/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_17.Chernarus/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_17.Chernarus/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_18.Sara/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_18.Sara/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_2.Utes/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_2.Utes/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_20.fapovo/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_20.fapovo/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_21.Caribou/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_21.Caribou/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_24.Napf/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_24.Napf/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_25.sauerland/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_25.sauerland/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_4.Zargabad/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_4.Zargabad/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_6.Dingor/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_6.Dingor/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_7.Lingor/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_7.Lingor/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/rules.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/keyboard.sqf create mode 100644 Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/rules.sqf create mode 100644 Server Files/MPMissions/TEMPLATE/keyboard.sqf create mode 100644 Server Files/MPMissions/TEMPLATE/rules.sqf diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index 07549c3f2..bc83c84eb 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -8,6 +8,8 @@ [NEW] Added "RedRyder" and "350Rnd_BB_Magazine" to loot pile. #1456 #1457 @Namindu [NEW] Auto login when a player joins the server, default 10 seconds, requires description.ext update in the mission (disable in description.ext by setting defValueParam1 = 31;) @icomrade [NEW] Upgraded (_DZE1,2,3,4) ArmoredSUV and Kamaz classes are now available. #1518 #1538 @McKeighan +[NEW] Optional news/rules feed on player login from DayZ Mod, set dayz_enableRules in init.sqf #1673 @ebaydayz +[NEW] Weapon switch hotkeys (1 = primary, 2 = pistol, 3 = melee) from DayZ Mod #1673 @ebaydayz [CHANGED] An infection chance of -1 disables self-transfusion infection. 0 is always infected. (DZE_selfTransfuse_Values) @icomrade [CHANGED] Removed weapons from Traders hands and made them stand with arms by their side. @SilvDev @@ -37,7 +39,8 @@ [UPDATED] .bat files updated in Config-Examples @Raziel23x [UPDATED] Updated all config.cfg in Config-Examples, Added Default Steam Ports and Updated Layout. @Namindu [UPDATED] Epoch.sql, 1.0.5_Updates.sql & CfgServerTraders with correct classnames for upgradable hilux1 & datsun1 versions. @Uro1 -[UPDATED] mission.sqm to compact format from DayZ Mod 1.8.3 @ebaydayz +[UPDATED] Mission.sqm and description.ext to compact format from DayZ Mod #1614 #1672 @ebaydayz +[UPDATED] Keyboard eventhandler to @facoptere's faster code from DayZ Mod #1673 @ebaydayz [INFO] Auto login does not force a player who aborted from the game, back to the lobby, to login diff --git a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf b/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf deleted file mode 100644 index 53666c72e..000000000 --- a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf +++ /dev/null @@ -1,205 +0,0 @@ -private ["_dikCode","_handled","_primaryWeapon","_secondaryWeapon","_nearbyObjects","_nill","_shift","_ctrl","_alt","_dropPrimary","_dropSecondary","_iItem","_removed","_iPos","_radius","_item"]; -_dikCode = _this select 1; - -_handled = false; - -if (_dikCode in[0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05]) then { - _handled = true; -}; - -if ((_dikCode == 0x3E || _dikCode == 0x0F || _dikCode == 0xD3)) then { - if(diag_tickTime - dayz_lastCheckBit > 10) then { - dayz_lastCheckBit = diag_tickTime; - call dayz_forceSave; - }; - call dayz_EjectPlayer; -}; - -// esc -if (_dikCode == 0x01) then { - DZE_cancelBuilding = true; - call dayz_EjectPlayer; -}; -// Disable ESC after death -if (_dikCode == 0x01 && r_player_dead) then { - _handled = true; -}; - -// surrender -if (_dikCode in actionKeys "Surrender") then { - - _vehicle = vehicle player; - _inVehicle = (_vehicle != player); - _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; - _canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder && !_inVehicle); - - if (_canDo && !DZE_Surrender && !(player isKindOf "PZombie_VB")) then { - DZE_Surrender = true; - _dropPrimary = false; - _dropSecondary = false; - - _primaryWeapon = primaryWeapon player; - if (_primaryWeapon != "") then {_dropPrimary = true;}; - _secondaryWeapon = ""; - { - if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Type")) == 2) exitWith { - _secondaryWeapon = _x; - }; - } count (weapons player); - if (_secondaryWeapon != "") then {_dropSecondary = true;}; - - if (_dropPrimary || _dropSecondary) then { - player playActionNow "PutDown"; - _iPos = getPosATL player; - _radius = 1; - _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; - _item setposATL _iPos; - if (_dropPrimary) then { - _iItem = _primaryWeapon; - _removed = ([player,_iItem,1] call BIS_fnc_invRemove); - if (_removed == 1) then { - _item addWeaponCargoGlobal [_iItem,1]; - }; - }; - if (_dropSecondary) then { - _iItem = _secondaryWeapon; - _removed = ([player,_iItem,1] call BIS_fnc_invRemove); - if (_removed == 1) then { - _item addWeaponCargoGlobal [_iItem,1]; - }; - }; - player reveal _item; - }; - - // set publicvariable that allows other player to access gear - player setVariable ["DZE_Surrendered", true, true]; - // surrender animation - player playMove "AmovPercMstpSsurWnonDnon"; - }; - _handled = true; -}; - -if (_dikCode in actionKeys "MoveForward") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};}; -if (_dikCode in actionKeys "MoveLeft") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};}; -if (_dikCode in actionKeys "MoveRight") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};}; -if (_dikCode in actionKeys "MoveBack") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};}; - -//Prevent exploit of glitching through doors -if (_dikCode in actionKeys "Prone") then { - _doors = nearestObjects [player, DZE_DoorsLocked, 3]; - if (count _doors > 0) then { - _handled = true; - }; -}; - -//Prevent exploit of drag body -if ((_dikCode in actionKeys "Prone") && r_drag_sqf) exitWith { force_dropBody = true; }; -if ((_dikCode in actionKeys "Crouch") && r_drag_sqf) exitWith { force_dropBody = true; }; - -_shift = _this select 2; -_ctrl = _this select 3; -_alt = _this select 4; - -//diag_log format["Keypress: %1", _this]; -if ((_dikCode in actionKeys "Gear") && (vehicle player != player) && !_shift && !_ctrl && !_alt && !dialog) then { - createGearDialog [player, "RscDisplayGear"]; - _handled = true; -}; - -if (_dikCode in (actionKeys "GetOver")) then { - - if (player isKindOf "PZombie_VB") then { - _handled = true; - DZE_PZATTACK = true; - } else { - _nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8]; - if (count _nearbyObjects > 0) then { - if((diag_tickTime - dayz_lastCheckBit > 4)) then { - [objNull, player, rSwitchMove,"GetOver"] call RE; - player playActionNow "GetOver"; - dayz_lastCheckBit = diag_tickTime; - } else { - _handled = true; - }; - }; - }; -}; -//if (_dikCode == 57) then {_handled = true}; // space -//if (_dikCode in actionKeys 'MoveForward' || _dikCode in actionKeys 'MoveBack') then {r_interrupt = true}; -if (_dikCode == 210) then { - _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; -}; - -if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true}; -if (_dikCode in actionKeys "PushToTalk" && (diag_tickTime - dayz_lastCheckBit > 10)) then { - dayz_lastCheckBit = diag_tickTime; - [player,50,true,(getPosATL player)] spawn player_alertZombies; -}; -if (_dikCode in actionKeys "VoiceOverNet" && (diag_tickTime - dayz_lastCheckBit > 10)) then { - dayz_lastCheckBit = diag_tickTime; - [player,50,true,(getPosATL player)] spawn player_alertZombies; -}; -if (_dikCode in actionKeys "PushToTalkDirect" && (diag_tickTime - dayz_lastCheckBit > 10)) then { - dayz_lastCheckBit = diag_tickTime; - [player,15,false,(getPosATL player)] spawn player_alertZombies; -}; -if (_dikCode in actionKeys "Chat" && (diag_tickTime - dayz_lastCheckBit > 10)) then { - dayz_lastCheckBit = diag_tickTime; - [player,15,false,(getPosATL player)] spawn player_alertZombies; -}; -if (_dikCode in actionKeys "User20" && (diag_tickTime - dayz_lastCheckBit > 5)) then { - dayz_lastCheckBit = diag_tickTime; - _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; -}; - -// numpad 8 0x48 now pgup 0xC9 1 -if ((_dikCode == 0xC9 && (!_alt || !_ctrl)) || (_dikCode in actionKeys "User15")) then { - DZE_Q = true; -}; -// numpad 2 0x50 now pgdn 0xD1 -if ((_dikCode == 0xD1 && (!_alt || !_ctrl)) || (_dikCode in actionKeys "User16")) then { - DZE_Z = true; -}; - - -// numpad 8 0x48 now pgup 0xC9 0.1 -if ((_dikCode == 0xC9 && (_alt && !_ctrl)) || (_dikCode in actionKeys "User13")) then { - DZE_Q_alt = true; -}; -// numpad 2 0x50 now pgdn 0xD1 -if ((_dikCode == 0xD1 && (_alt && !_ctrl)) || (_dikCode in actionKeys "User14")) then { - DZE_Z_alt = true; -}; - - -// numpad 8 0x48 now pgup 0xC9 0.01 -if ((_dikCode == 0xC9 && (!_alt && _ctrl)) || (_dikCode in actionKeys "User7")) then { - DZE_Q_ctrl = true; -}; -// numpad 2 0x50 now pgdn 0xD1 -if ((_dikCode == 0xD1 && (!_alt && _ctrl)) || (_dikCode in actionKeys "User8")) then { - DZE_Z_ctrl = true; -}; - - - - -// numpad 4 0x4B now Q 0x10 -if (_dikCode == 0x10 || (_dikCode in actionKeys "User17")) then { - DZE_4 = true; -}; -// numpad 6 0x4D now E 0x12 -if (_dikCode == 0x12 || (_dikCode in actionKeys "User18")) then { - DZE_6 = true; -}; -// numpad 5 0x4C now space 0x39 -if (_dikCode == 0x39 || (_dikCode in actionKeys "User19")) then { - DZE_5 = true; -}; - -// F key -if ((_dikCode == 0x21 && (!_alt && !_ctrl)) || (_dikCode in actionKeys "User6")) then { - DZE_F = true; -}; - -_handled diff --git a/SQF/dayz_code/actions/player_switchWeapon.sqf b/SQF/dayz_code/actions/player_switchWeapon.sqf new file mode 100644 index 000000000..16f1cdd48 --- /dev/null +++ b/SQF/dayz_code/actions/player_switchWeapon.sqf @@ -0,0 +1,214 @@ +private ["_event", "_onLadder", "_inVehicle", "_isOk", "_primary", "_current", "_rifle", "_pistol", "_melee"]; +_event = if (count _this > 1) then { _this select 3 } else { _this select 0 }; + +_findRifle = { + private ["_return", "_primary"]; + _return = ""; + _primary = primaryWeapon player; + + if (_primary != "") then { + if !(_primary in MeleeWeapons) then { + _return = _primary; + }; + }; + + if (dayz_onBack != "" && _return == "") then { + if !(dayz_onBack in MeleeWeapons) then { + _return = dayz_onBack; + }; + }; + + _return; +}; + +_findMelee = { + private ["_return", "_primary"]; + _return = ""; + + _primary = primaryWeapon player; + + if (_primary != "") then { + if (_primary in MeleeWeapons) then { + _return = _primary; + }; + }; + + if (dayz_onBack != "" && _return == "") then { + if (dayz_onBack in MeleeWeapons) then { + _return = dayz_onBack; + }; + }; + + _return; +}; + +_findPistol = { + private ["_return"]; + _return = ""; + + { + if (getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 2) then { + _return = _x; + }; + } foreach (weapons player); + + _return; +}; + +_selectMuzzle = { + private ["_return", "_wpn", "_muzzles"]; + _wpn = _this select 0; + _muzzles = getArray(configFile >> "cfgWeapons" >> _wpn >> "muzzles"); + + if (_muzzles select 0 != "this") then { + _return = (_muzzles select 0); + } else { + _return = _wpn; + }; + + _return; +}; + +_clearActions = { + if (s_player_equip_carry > -1) then { + player removeAction s_player_equip_carry; + s_player_equip_carry = -1; + }; +}; + +_switchPrimary = { + private ["_primary", "_current"]; + _primary = primaryWeapon player; + _current = currentWeapon player; + _timer = 0; + + [] call _clearActions; + if (_primary != "") then { + // check if player is still in the 'open gear' animation state and force him out of it (caused major issues) + _animState = animationState player; + + switch (true) do { + // current weapon is a rifle + case (_animState == "amovpknlmstpsraswrfldnon_gear" || _animState == "amovpercmstpsraswrfldnon_gear"): { + player playMove "amovpknlmstpslowwrfldnon_amovpknlmstpsraswrfldnon"; + waitUntil { animationState player == "amovpknlmstpslowwrfldnon_amovpknlmstpsraswrfldnon" }; + }; + // current weapon is a pistol + case (_animState == "amovpknlmstpsraswpstdnon_gear" || _animState == "amovpercmstpsraswpstdnon_gear"): { + player playMove "amovpknlmstpslowwpstdnon_gear_amovpknlmstpsraswpstdnon"; + waitUntil { animationState player == "amovpknlmstpslowwpstdnon_gear_amovpknlmstpsraswpstdnon" }; + }; + // is standing with weapon lowered + case (["aidlpercmstpslowwrfldnon", _animState] call fnc_inString): { + player playMove "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon"; + waitUntil { animationState player == "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon" }; + }; + }; + + player removeWeapon _primary; + + // make sure animation is playing to prevent instant switch (if current weapon is not pisol) + if (!dayz_quickSwitch) then { + if (_current != [] call _findPistol) then { + _timeout = diag_tickTime + 2; + _animArray = [ + "amovpercmstpsraswrfldnon_amovpercmstpsnonwnondnon", // is standing, has no pistol / is crouched, has no pistol + "amovpercmstpsraswrfldnon_amovpercmstpsraswpstdnon", // is standing, has pistol + "amovpknlmstpsraswrfldnon_amovpknlmstpsraswpstdnon", // is crouched, has pistol + "amovppnemstpsraswrfldnon_amovppnemstpsnonwnondnon", // is prone, has no pistol + "amovppnemstpsraswrfldnon_amovppnemstpsraswpstdnon" // is prone, has pistol + ]; + + waitUntil { (animationState player) in _animArray || diag_tickTime >= _timeout }; + waitUntil { !((animationState player) in _animArray) || diag_tickTime >= _timeout }; + }; + }; + }; + + if (dayz_onBack != "") then { + player addWeapon dayz_onBack; + player selectWeapon ([dayz_onBack] call _selectMuzzle); + }; + + dayz_onBack = _primary; + + call dayz_meleeMagazineCheck; +}; + +_switchPrimaryUI = { + private ["_primary", "_current"]; + _primary = primaryWeapon player; + _current = currentWeapon player; + + [] call _clearActions; + + if (_primary != "") then { + player removeWeapon _primary; + }; + + if (dayz_onBack != "") then { + player addWeapon dayz_onBack; + + if (_primary == _current) then { + player selectWeapon ([dayz_onBack] call _selectMuzzle); + }; + }; + + dayz_onBack = _primary; + + [[(findDisplay 106)],"onLBSelChanged"] execVM "\z\addons\dayz_code\system\handleGear.sqf"; // update gear dialog +}; + +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +_inVehicle = (vehicle player != player); +_isOK = (!_onLadder && !_inVehicle && !r_player_unconscious && !dayz_onBackActive); + +if (_isOK) then { dayz_onBackActive = true }; + +switch (_event) do { + case "action": { + if (_isOK) then { + [] call _switchPrimary; + }; + }; + case "gear": { + [] call _switchPrimaryUI; + }; + case "rifle": { + if (_isOK) then { + _rifle = [] call _findRifle; + + if (_rifle != "") then { + if (_rifle == dayz_onBack) then { + [] call _switchPrimary; + } else { + player selectWeapon ([_rifle] call _selectMuzzle); + }; + }; + }; + }; + case "pistol": { + if (_isOK) then { + _pistol = [] call _findPistol; + + if (_pistol != "") then { + player selectWeapon ([_pistol] call _selectMuzzle); + }; + }; + }; + case "melee": { + if (_isOK) then { + _melee = [] call _findMelee; + + if (_melee != "") then { + if (_melee == dayz_onBack) then { + [] call _switchPrimary; + } else { + player selectWeapon ([_melee] call _selectMuzzle); + }; + }; + }; + }; +}; + +if (_isOK) then { dayz_onBackActive = false }; diff --git a/SQF/dayz_code/compile/fn_buildCamera.sqf b/SQF/dayz_code/compile/fn_buildCamera.sqf new file mode 100644 index 000000000..6a7205d42 --- /dev/null +++ b/SQF/dayz_code/compile/fn_buildCamera.sqf @@ -0,0 +1,28 @@ + +if (0 != count Dayz_constructionContext) then { + if (!(Dayz_constructionContext select 3)) then { + _ghost = Dayz_constructionContext select 0; + if (abs(([_ghost, player] call BIS_fnc_distance2D) - (1 + (sizeOf (typeOf _ghost)) * 0.5)) < 1) then { + showCinemaBorder false; + Dayz_BuildCamera = "camera" camCreate (player modeltoWorld [0,0,2]); + 0.2 fadeSound 0.1; + Dayz_BuildCamera cameraeffect ["External", "TOP"]; + Dayz_BuildCamera camcommit 0; + Dayz_BuildCamera camsettarget _ghost; + Dayz_BuildCamera camsetFov 0.1; + Dayz_BuildCamera camsetrelpos [-1,0,60]; + Dayz_BuildCamera camcommit 0; + Dayz_constructionContext set [3, true]; + cutText [localize "str_buildCameraOn", "PLAIN DOWN"]; + }; + } + else { + Dayz_BuildCamera cameraeffect ["terminate", "TOP"]; + 0.2 fadeSound 1; + player switchCamera (Dayz_constructionContext select 2); + camdestroy Dayz_BuildCamera; + Dayz_constructionContext set [3, false]; + cutText [localize "str_buildCameraOff", "PLAIN DOWN"]; + }; + _handled = true; // used by keyboard.sqf +}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf index 6f01bf26b..4a75c92f7 100644 --- a/SQF/dayz_code/compile/fn_unconscious.sqf +++ b/SQF/dayz_code/compile/fn_unconscious.sqf @@ -1,4 +1,4 @@ -private ["_totalTimeout","_timeout","_bloodLow","_display","_ctrl1","_ctrl1Pos"]; +private ["_totalTimeout","_timeout","_bloodLow","_display","_ctrl1","_ctrl1Pos","_disableHdlr"]; disableSerialization; if ((!r_player_handler1) && (r_handlerCount == 0)) then { if (r_player_cardiac) then {r_player_timeout = r_player_timeout max 300;}; @@ -18,6 +18,7 @@ if ((!r_player_handler1) && (r_handlerCount == 0)) then { "colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0; 0 fadeSound 0.05; disableUserInput true; + _disableHdlr = [] spawn { sleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; }; while {r_player_unconscious} do { _ctrl1 ctrlSetPosition [(_ctrl1Pos select 0),(_ctrl1Pos select 1),(_ctrl1Pos select 2),((0.136829 * safezoneH) * (1 -(r_player_timeout / _totalTimeout)))]; _ctrl1 ctrlCommit 1; @@ -48,7 +49,9 @@ if ((!r_player_handler1) && (r_handlerCount == 0)) then { }; }; 4 cutRsc ["default", "PLAIN",1]; - disableUserInput false; + terminate _disableHdlr; + waituntil {scriptDone _disableHdlr}; + disableUserInput false; r_player_unconsciousInputDisabled = false; if (!r_player_injured && ((r_player_blood/r_player_bloodTotal) >= 0.5)) then { 10 fadeSound 1; "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5; diff --git a/SQF/dayz_code/compile/keyboard.sqf b/SQF/dayz_code/compile/keyboard.sqf new file mode 100644 index 000000000..79697d1a7 --- /dev/null +++ b/SQF/dayz_code/compile/keyboard.sqf @@ -0,0 +1,332 @@ +// (c) facoptere@gmail.com, licensed to DayZMod for the community + +#include "\ca\editor\Data\Scripts\dikCodes.h" + +_dikCode = _this select 1; +_shiftState = _this select 2; +_ctrlState = _this select 3; +_altState = _this select 4; +_handled = false; + +if (isNil "keyboard_keys") then { + _cancelBuild = { + DZE_cancelBuilding = true; + call dayz_EjectPlayer; + _handled = false; + if (r_player_dead) then {_handled = true;}; // Disable ESC after death + }; + _playerStats = { + DZE_Q_alt = true; + execVM "\z\addons\dayz_code\actions\playerstats.sqf"; + }; + _dze_f = { + if (!_ctrlState && !_altState) then {DZE_F = true;}; + }; + _dze_q = { + if (!_ctrlState && !_altState) then {DZE_Q = true;}; + if (!_ctrlState && _altState) then {DZE_Q_alt = true;}; + if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;}; + }; + _dze_z = { + if (!_ctrlState && !_altState) then {DZE_Z = true;}; + if (!_ctrlState && _altState) then {DZE_Z_alt = true;}; + if (_ctrlState && !_altState) then {DZE_Z_ctrl = true;}; + }; + _rifle = { + ["rifle"] spawn player_switchWeapon; + _handled = true; + }; + _pistol = { + ["pistol"] spawn player_switchWeapon; + _handled = true; + }; + _melee = { + ["melee"] spawn player_switchWeapon; + _handled = true; + }; + _throwable = { // select next non empty throwable weapon + if (vehicle player == player) then { + _ammo_throwable = []; + _muzzles_throwable = []; + _weapon_throwable = []; + { + _weapon = _x; + _muzzles = getArray(configFile >> "cfgWeapons" >> _weapon >> "muzzles"); + if (count _muzzles == 0) then { _muzzles = [_weapon ]; }; + { + _muzz = _x; + { + if (_x in magazines player) then { + _ammo_throwable set [ count _ammo_throwable, getText(configFile >> "cfgMagazines" >> _x >> "ammo") ]; + _muzzles_throwable set [ count _muzzles_throwable, _muzz ]; + _weapon_throwable set [ count _weapon_throwable, _weapon ]; + }; + } forEach getArray(configFile >> "cfgWeapons" >> _weapon >> _muzz >> "magazines"); + } forEach _muzzles; + } forEach [ "Flare", "Throw" ]; + + _magCount = count _ammo_throwable; + if (_magCount > 0) then { + if (isNil "KB_CurrentThrowable") then { KB_CurrentThrowable = -1; }; + _currentAmmo = (weaponState player) select 3; + _idx = _ammo_throwable find _currentAmmo; + if (_idx >= 0) then { KB_CurrentThrowable = _idx; }; + KB_CurrentThrowable = (KB_CurrentThrowable + 1) mod _magCount; + player selectWeapon (_muzzles_throwable select KB_CurrentThrowable); + _handled = true; + }; + }; + }; + _surrender = { + _vehicle = vehicle player; + _inVehicle = (_vehicle != player); + _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; + _canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder && !_inVehicle); + + if (_canDo && !DZE_Surrender && !(player isKindOf "PZombie_VB")) then { + DZE_Surrender = true; + _dropPrimary = false; + _dropSecondary = false; + + _primaryWeapon = primaryWeapon player; + if (_primaryWeapon != "") then {_dropPrimary = true;}; + _secondaryWeapon = ""; + { + if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Type")) == 2) exitWith { + _secondaryWeapon = _x; + }; + } count (weapons player); + if (_secondaryWeapon != "") then {_dropSecondary = true;}; + + if (_dropPrimary || _dropSecondary) then { + player playActionNow "PutDown"; + _iPos = getPosATL player; + _radius = 1; + _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; + _item setposATL _iPos; + if (_dropPrimary) then { + _iItem = _primaryWeapon; + _removed = ([player,_iItem,1] call BIS_fnc_invRemove); + if (_removed == 1) then { + _item addWeaponCargoGlobal [_iItem,1]; + }; + }; + if (_dropSecondary) then { + _iItem = _secondaryWeapon; + _removed = ([player,_iItem,1] call BIS_fnc_invRemove); + if (_removed == 1) then { + _item addWeaponCargoGlobal [_iItem,1]; + }; + }; + player reveal _item; + }; + + // set publicvariable that allows other player to access gear + player setVariable ["DZE_Surrendered", true, true]; + // surrender animation + player playMove "AmovPercMstpSsurWnonDnon"; + }; + _handled = true; + }; + _gear = { + if ((vehicle player != player) and !_shiftState and !_ctrlState and !_altState && !dialog) then { + createGearDialog [player, "RscDisplayGear"]; + _handled = true; + } + else { if ((vehicle player == player) and (speed vehicle player > 0)) then { + //[objNull, player, rSwitchMove,""] call RE; + _handled = true; + };}; + }; + _turbo = { + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + _handled = true; + }; + }; + _forcesave = { + dayz_lastCheckBit = diag_ticktime; + call player_forceSave; + call dayz_EjectPlayer; + }; + _forcesave2 = { + if ((!isNull (findDisplay 106)) OR dialog) then { + call player_forceSave; + }; + }; + _drop = { + force_dropBody = true; //Prevent exploit of drag body + _doors = nearestObjects [player, DZE_DoorsLocked, 3]; //Prevent exploit of glitching through doors + if (count _doors > 0) then {_handled = true;}; + }; + _interrupt = { + r_interrupt = true; + if (DZE_Surrender) then {call dze_surrender_off}; + }; + // TODO: left/right, when gear open: onKeyDown = "[_this,'onKeyDown',0,107,0,107] execVM '\z\addons\dayz_code\system\handleGear.sqf'"; + _noise = { + if (diag_ticktime - dayz_lastCheckBit > 10) then { + dayz_lastCheckBit = diag_ticktime; + [player,20,true,(getPosATL player)] call player_alertZombies; + }; + }; + _journal = { + /* + if (!dayz_isSwimming and !dialog) then { + [player,4,true,(getPosATL player)] call player_alertZombies; + createDialog "horde_journal_front_cover"; + }; + */ + _handled = true; + }; + + _build_left = { + DZE_4 = true; + // fence construction + if (0 != count Dayz_constructionContext) then { + _angleRef = Dayz_constructionContext select 1; + _dir = _angleRef - (getDir player) -5; + if (_dir > 180) then {_dir = _dir - 360}; + if (_dir < -180) then {_dir = _dir + 360}; + if ( _dir > -75) then { + _new = floor((_angleRef - 5)/5)*5; + Dayz_constructionContext set [ 1, _new]; // favorite angle + r_interrupt = true; + }; + _handled = true; + }; + // tents and stash construction + _object = player getVariable ["constructionObject", objNull]; + if (!isNull _object) then { + _dir = getDir _object - 3; + _object setDir _dir; + _handled = true; + }; + dayz_dodge = true; + }; + _build_right = { + DZE_6 = true; + if (0 != count Dayz_constructionContext) then { + _angleRef = Dayz_constructionContext select 1; + _dir = _angleRef - (getDir player) +5; + if (_dir > 180) then { _dir = _dir - 360; }; + if (_dir < -180) then { _dir = _dir + 360; }; + if (_dir < 75) then { + _new = ceil((_angleRef + 5)/5)*5; + Dayz_constructionContext set [ 1, _new]; // favorite angle + r_interrupt = true; + }; + _handled = true; + }; + // tents and stash construction + _object = player getVariable ["constructionObject", objNull]; + if (!isNull _object) then { + _dir = getDir _object + 3; + _object setDir _dir; + _handled = true; + }; + dayz_dodge = true; + }; + + _build_camOnOff = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildCamera.sqf"; + + _build_str8OnOff = { + if (0 != count Dayz_constructionContext) then { + Dayz_constructionContext set [ 5, !(Dayz_constructionContext select 5) ]; + _handled = true; // used by keyboard.sqf + r_interrupt = true; + }; + + if (player isKindOf "PZombie_VB") then { + _handled = true; + DZE_PZATTACK = true; + } else { + _nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8]; + if (count _nearbyObjects > 0) then { + if((diag_tickTime - dayz_lastCheckBit > 4)) then { + [objNull, player, rSwitchMove,"GetOver"] call RE; + player playActionNow "GetOver"; + dayz_lastCheckBit = diag_tickTime; + } else { + _handled = true; + }; + }; + }; + }; + + _block = { + _handled = true; + }; + _addArray = { + { + keyboard_keys set [_x, _this select 1]; + } forEach (_this select 0); + }; + + keyboard_keys = []; + keyboard_keys resize 256; + [[DIK_ESCAPE], _cancelBuild] call _addArray; + [[DIK_INSERT], _playerStats] call _addArray; + [[DIK_F], _dze_f] call _addArray; + [[DIK_PRIOR], _dze_q] call _addArray; + [[DIK_NEXT], _dze_z] call _addArray; + [[DIK_Q], {DZE_4 = true;}] call _addArray; + [[DIK_E], {DZE_6 = true;}] call _addArray; + [[DIK_SPACE], {DZE_5 = true;}] call _addArray; + [actionKeys "User6", {DZE_F = true;}] call _addArray; + [actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray; + [actionKeys "User8", {DZE_Z_ctrl = true;}] call _addArray; + [actionKeys "User13", _playerStats] call _addArray; + [actionKeys "User14", {DZE_Z_alt = true;}] call _addArray; + [actionKeys "User15", {DZE_Q = true;}] call _addArray; + [actionKeys "User16", {DZE_Z = true;}] call _addArray; + [actionKeys "User17", {DZE_4 = true;}] call _addArray; + [actionKeys "User18", {DZE_6 = true;}] call _addArray; + [actionKeys "User19", {DZE_5 = true;}] call _addArray; + [[DIK_1], _rifle] call _addArray; + [[DIK_2], _pistol] call _addArray; + [[DIK_3], _melee] call _addArray; + //[[DIK_4], _throwable] call _addArray; + [actionKeys "Surrender", _surrender] call _addArray; + [actionKeys "Gear", _gear] call _addArray; + [actionKeys "Prone", _drop] call _addArray; + [actionKeys "Crouch", _drop] call _addArray; + [actionKeys "MoveLeft", _interrupt] call _addArray; + [actionKeys "MoveRight", _interrupt] call _addArray; + [actionKeys "MoveForward", _interrupt] call _addArray; + [actionKeys "MoveBack", _interrupt] call _addArray; + [actionKeys "PushToTalk", _noise] call _addArray; + [actionKeys "VoiceOverNet", _noise] call _addArray; + [actionKeys "PushToTalkDirect", _noise] call _addArray; + [actionKeys "Chat", _noise] call _addArray; + [actionKeys "User20", _journal] call _addArray; + [actionKeys "Diary", _journal] call _addArray; + [actionKeys "NetworkStats", _journal] call _addArray; + //[actionKeys "Turbo", _turbo] call _addArray; + [[DIK_F4, DIK_TAB, DIK_DELETE], _forcesave] call _addArray; + //[[DIK_F4, DIK_RMENU, DIK_LMENU,DIK_LSHIFT,DIK_RSHIFT,DIK_ESCAPE], _forcesave2] call _addArray; + [actionKeys "LeanLeft", _build_left ] call _addArray; + [actionKeys "LeanRight", _build_right ] call _addArray; + [actionKeys "PersonView", _build_camOnOff ] call _addArray; // Camera Mode + [actionKeys "GetOver", _build_str8OnOff ] call _addArray; // V +// [[DIK_NUMPAD7], _rotate_left] call _addArray; +// [[DIK_NUMPAD9], _rotate_right] call _addArray; + [actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray; + [[ DIK_F9,DIK_F10,DIK_F11,DIK_F12, + DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4, + DIK_F3,DIK_F2,DIK_F1,DIK_0,DIK_9, + DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray; + + (findDisplay 46) displayRemoveAllEventHandlers "KeyUp"; + (findDisplay 46) displayRemoveAllEventHandlers "KeyDown"; + (findDisplay 46) displayAddEventHandler ["KeyDown", preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf')]; + //diag_log [diag_ticktime, __FILE__, "eh reset" ]; +}; + +if (r_player_unconsciousInputDisabled) exitWith {true}; +_code = keyboard_keys select _dikCode; +if (!isNil "_code") then { + call _code; +}; + +_handled \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 13368f934..a0d96f3e7 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -20,7 +20,6 @@ if (!isDedicated) then { player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf"; building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf"; building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf"; - dayz_spaceInterrupt = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\dayz_spaceInterrupt.sqf"; player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre && audial rating player_harvest = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_harvest.sqf"; player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf"; @@ -118,6 +117,7 @@ if (!isDedicated) then { player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf"; object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf"; + player_switchWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_switchWeapon.sqf"; player_flipvehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf"; player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf"; player_antiWall = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_antiWall.sqf"; @@ -138,7 +138,7 @@ if (!isDedicated) then { player_spawn_1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_1.sqf"; player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf"; onPreloadStarted "dayz_preloadFinished = false;"; - onPreloadFinished "dayz_preloadFinished = true;"; + onPreloadFinished "if (!isNil 'init_keyboard') then { [] spawn init_keyboard; }; dayz_preloadFinished = true;"; // helper functions player_hasTools = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_hasTools.sqf"; @@ -641,6 +641,12 @@ if (!isDedicated) then { ]; _medical }; + + init_keyboard = { + waituntil {!(isNull (findDisplay 46))}; + keyboard_keys = nil; + [controlNull, 1, false,false,false] call compile preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf'); + }; //Server Only if (isServer) then { diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 3f3becd46..4798218e8 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -196,6 +196,7 @@ if (isNil "Dayz_Dark_UI") then { //Player self-action handles dayz_resetSelfActions = { + s_player_equip_carry = -1; s_player_fire = -1; s_player_cook = -1; s_player_boil = -1; @@ -288,6 +289,8 @@ r_action = false; r_action_unload = false; r_player_handler = false; r_player_handler1 = false; +r_player_unconsciousInProgress = false; +r_player_unconsciousInputDisabled = false; r_player_dead = false; r_player_unconscious = false; r_player_infected = false; @@ -452,6 +455,9 @@ dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted +if(isNil "dayz_quickSwitch") then { + dayz_quickSwitch = false; //Enable quick weapon switch, +}; if(isNil "DZE_SelfTransfuse") then { DZE_SelfTransfuse = false; }; @@ -749,7 +755,8 @@ if(!isDedicated) then { //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then { // dayzDebug = true; //}; - + dayz_onBack = ""; + dayz_onBackActive = false; DZE_ActionInProgress = false; // DayZ Epoch Client only variables @@ -819,4 +826,5 @@ if(!isDedicated) then { DZE_InRadiationZone = false; DZE_SaveTime = 30; + Dayz_constructionContext = []; }; diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index 5909eefd2..b072c8947 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -654,6 +654,9 @@ class FSM "" \n "dayz_playerName = name player;" \n "_model call player_switchModel;" \n + "diag_log [ 'resetting keyboard events',(MISSION_ROOT+'keyboard.sqf')];" \n + "keyboard_keys = nil;" \n + "[controlNull, 1, false,false,false] call compile preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf');" \n "" \n "gear_done= true;" \n "player allowDamage false;" \n @@ -1086,7 +1089,6 @@ class FSM name = "Preload_Display"; init = /*%FSM*/"dayz_lastCheckBit = 0;" \n "" \n - "(findDisplay 46) displayAddEventHandler [""KeyDown"",""_this call dayz_spaceInterrupt""];" \n "player disableConversation true;" \n "" \n "eh_player_killed = player addeventhandler [""FiredNear"",{_this call player_weaponFiredNear;} ];" \n diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf index fdbb50110..9231f1981 100644 --- a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epochconfig +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 1000; // Default = 1500 @@ -39,12 +40,13 @@ DynamicVehicleDamageHigh = 100; // Default: 100 dayz_sellDistance_vehicle = 10; dayz_sellDistance_boat = 30; dayz_sellDistance_air = 40; - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf index 64f6255be..4d9809c36 100644 --- a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 1000; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf index 2e8049e38..71debb384 100644 --- a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf @@ -7,7 +7,7 @@ cutText ["","BLACK OUT"]; enableSaving [false, false]; //REALLY IMPORTANT VALUES -dayZ_instance = 11; //The instance +dayZ_instance = 11; //The instance dayZ_serverName = ""; //Shown to all players in the bottom left of the screen dayzHiveRequest = []; initialized = false; @@ -27,6 +27,7 @@ enableSentences false; //--------------------------------------------------------------------// //Map & Player Spawn Variables +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default: 1 (on shore) spawnArea= 1500; // Default: 1500 dayz_paraSpawn = false; // Default: false @@ -61,6 +62,7 @@ dayz_sellDistance_boat = 30; // Default: 30 dayz_sellDistance_air = 40; // Default: 40 //Player Variables +dayz_quickSwitch = false; // Default: false DZE_R3F_WEIGHT = true; // Default: true DZE_FriendlySaving = true; // Default: true DZE_PlayerZed = true; // Default: true @@ -106,6 +108,7 @@ EpochEvents = [ ["any","any","any","any",15,"supply_drop"] ]; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load In Compiled Functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -144,6 +147,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf index 241a3286f..3916e00ab 100644 --- a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -83,6 +85,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf index 554c0b9af..f0830aa4a 100644 --- a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea = 2500; // Default = 1500 @@ -44,11 +45,11 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False // DZEdebug = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -87,6 +88,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf index f81c4a753..84c063c8f 100644 --- a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -42,11 +43,11 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False // DZEdebug = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -86,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf index 73d8085e3..16f49e724 100644 --- a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf @@ -20,7 +20,8 @@ enableRadio false; // May prevent "how are you civillian?" messages from NPC enableSentences false; -// DayZ Epoch config +// DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -39,14 +40,14 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; // DZEdebug = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -86,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf index 64439a0eb..25417214b 100644 --- a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf index bce8fb58f..cb02b2be4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf index bcf074c4c..9abb61f38 100644 --- a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -38,12 +39,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -83,6 +85,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf index c652064a7..0a78ccaf0 100644 --- a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1000; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf index 28407461b..7a937d3e4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea = 1500; // Default = 1500 @@ -38,13 +39,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +85,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf index a04c9ec22..1bfd0cbd2 100644 --- a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea = 1500; // Default = 1500 @@ -38,13 +39,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +85,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf index aea8ad7ae..1e9d991f9 100644 --- a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf index 26c17cc24..ec1e35f99 100644 --- a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/init.sqf @@ -19,6 +19,7 @@ player setVariable ["BIS_noCoreConversations", true]; enableRadio false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -37,12 +38,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -82,6 +84,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf b/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf index 4a6f2ac09..4fde255b9 100644 --- a/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_24.Napf/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epochconfig +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 // @@ -41,12 +42,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -86,6 +88,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_24.Napf/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_24.Napf/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_24.Napf/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_24.Napf/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_24.Napf/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_24.Napf/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf index 9d875c35e..b04b2850d 100644 --- a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epochconfig +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 2000; // Default = 1500 // @@ -41,12 +42,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -86,6 +88,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf index 20917ae61..91ae3cda5 100644 --- a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 250; // Default = 1500 MaxHeliCrashes= 1; // Default = 5 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf index 9e8bbe0f3..5c9b0ea79 100644 --- a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epochconfig +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +87,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf index 183bcc6a8..0804e2516 100644 --- a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf index e86f736ea..c70a2b563 100644 --- a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea = 1500; // Default = 1500 @@ -39,13 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf index 40b534307..3e8256512 100644 --- a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea = 1500; // Default = 1500 @@ -39,13 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; - +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -85,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf index 565afbd5f..a2a060cda 100644 --- a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epochconfig +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf index 05715925f..262d65e52 100644 --- a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf @@ -21,6 +21,7 @@ enableRadio false; enableSentences false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 0; // Default = 1 (on shore) spawnArea= 500; // Default = 1500 @@ -39,12 +40,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -84,6 +86,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/keyboard.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/rules.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file diff --git a/Server Files/MPMissions/TEMPLATE/init.sqf b/Server Files/MPMissions/TEMPLATE/init.sqf index 9075a53d2..e742508e7 100644 --- a/Server Files/MPMissions/TEMPLATE/init.sqf +++ b/Server Files/MPMissions/TEMPLATE/init.sqf @@ -19,6 +19,7 @@ player setVariable ["BIS_noCoreConversations", true]; enableRadio false; // DayZ Epoch config +dayz_enableRules = true; // Default: true spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -37,12 +38,13 @@ dayz_maxAnimals = 5; // Default: 8 dayz_tameDogs = true; DynamicVehicleDamageLow = 0; // Default: 0 DynamicVehicleDamageHigh = 100; // Default: 100 - +dayz_quickSwitch = false; // Default: false DZE_BuildOnRoads = false; // Default: False EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]]; dayz_fullMoonNights = true; +MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) progressLoadingScreen 0.1; @@ -82,6 +84,7 @@ if (!isDedicated) then { //Lights //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; + if (dayz_enableRules) then { execVM "rules.sqf"; }; if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; }; }; #include "\z\addons\dayz_code\system\REsec.sqf" diff --git a/Server Files/MPMissions/TEMPLATE/keyboard.sqf b/Server Files/MPMissions/TEMPLATE/keyboard.sqf new file mode 100644 index 000000000..be4f1ac39 --- /dev/null +++ b/Server Files/MPMissions/TEMPLATE/keyboard.sqf @@ -0,0 +1 @@ +#include "\z\addons\dayz_code\compile\keyboard.sqf" \ No newline at end of file diff --git a/Server Files/MPMissions/TEMPLATE/rules.sqf b/Server Files/MPMissions/TEMPLATE/rules.sqf new file mode 100644 index 000000000..bbb2cf8f2 --- /dev/null +++ b/Server Files/MPMissions/TEMPLATE/rules.sqf @@ -0,0 +1,32 @@ +private ["_messages", "_timeout"]; + +if (isServer) exitWith {}; +waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") }; + +_messages = [ + ["DayZ Epoch", "Welcome "+(name player)], + ["World", worldName], + ["Teamspeak", "Some ts info"], + ["Website/Forums", "some website info"], + ["Server Rules", "Duping, glitching or using any
exploit will result in a
permanent ban."], + ["Server Rules", "No Talking in side."], + ["Server Rules", "Hackers will be banned permanently
Respect others"], + ["News", "Some random New info!
RandomNews
"] +]; + +_timeout = 5; +{ + private ["_title", "_content", "_titleText"]; + sleep 2; + _title = _x select 0; + _content = _x select 1; + _titleText = format[("%1
%2"), _title, _content]; + [ + _titleText, + [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 + [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 + _timeout, + 0.5 + ] spawn BIS_fnc_dynamicText; + sleep (_timeout * 1.1); +} forEach _messages; \ No newline at end of file