Advertisement
Guest User

Untitled

a guest
May 9th, 2014
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. startLoadingScreen ["","RscDisplayLoadCustom"];
  2. cutText ["","BLACK OUT"];
  3. enableSaving [false, false];
  4.  
  5. //Server Settings
  6. dayZ_instance = 22121; // The instance
  7. dayZ_serverName = "LTG"; // Servername (country code + server number)
  8. dayz_antihack = 0; // DayZ Antihack / 1 = enabled // 0 = disabled
  9. dayz_REsec = 0; // DayZ RE Security / 1 = enabled // 0 = disabled
  10.  
  11. //Game Settings
  12. dayz_spawnselection = 0; // DayZ Spawnselection / 1 = enabled // 0 = disabled, No current spawn limits.
  13. dayz_spawnCrashSite_clutterCutter = 1; // Helicrash Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the Helicrash
  14. dayz_spawnInfectedSite_clutterCutter = 1; // Infected Base Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the infected base
  15.  
  16. initialized = false;
  17. dayzHiveRequest = [];
  18. dayz_previousID = 0;
  19. 0 fadeSound 0;
  20. //disable greeting menu
  21. //player setVariable ["BIS_noCoreConversations", true];
  22. //disable radio messages to be heard and shown in the left lower corner of the screen
  23. //enableRadio false;
  24.  
  25. //Load in compiled functions
  26. call compile preprocessFileLineNumbers "Fixes\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  27. progressLoadingScreen 0.1;
  28. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
  29. progressLoadingScreen 0.2;
  30. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  31. progressLoadingScreen 0.4;
  32. call compile preprocessFileLineNumbers "Fixes\compiles.sqf"; //Compile regular functions
  33. progressLoadingScreen 1.0;
  34. stream_locationCheck = {
  35. };
  36.  
  37. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  38.  
  39.  
  40. if (!(isNull player)) then
  41. {
  42. gc_veh_flip_script_script_action_manager = execVM "gc_veh_flip\action_manager.sqf";
  43. };
  44. if (!isServer && isNull player) then
  45. {
  46. waitUntil {!isNull player};
  47. gc_veh_flip_script_script_action_manager = execVM "gc_veh_flip\action_manager.sqf";
  48. };
  49.  
  50.  
  51. [] spawn {
  52. while {true} do {
  53. waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})};
  54. diag_log "Res3tting B!S effects...";
  55. /* BIS_Effects_* fixes from Dwarden */
  56. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  57. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  58. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  59.  
  60. BIS_Effects_globalEvent = {
  61. BIS_effects_gepv = _this;
  62. publicVariable "BIS_effects_gepv";
  63. _this call BIS_Effects_startEvent;
  64. };
  65.  
  66. BIS_Effects_startEvent = {
  67. switch (_this select 0) do {
  68. case "AirDestruction": {
  69. [_this select 1] spawn BIS_Effects_AirDestruction;
  70. };
  71. case "AirDestructionStage2": {
  72. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  73. };
  74. case "Burn": {
  75. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  76. };
  77. };
  78. };
  79.  
  80. "BIS_effects_gepv" addPublicVariableEventHandler {
  81. (_this select 1) call BIS_Effects_startEvent;
  82. };
  83.  
  84. BIS_Effects_EH_Fired = {false};
  85. BIS_Effects_Rifle = {false};
  86. sleep 1;
  87. };
  88. };
  89.  
  90. if ((!isServer) && (isNull player) ) then
  91. {
  92. waitUntil {!isNull player};
  93. waitUntil {time > 3};
  94. };
  95.  
  96. if ((!isServer) && (player != player)) then
  97. {
  98. waitUntil {player == player};
  99. waitUntil {time > 3};
  100. };
  101.  
  102. if (isServer) then {
  103. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  104. "PVDZ_sec_atp" addPublicVariableEventHandler {
  105. _x = _this select 1;
  106. if (typeName _x == "STRING") then {
  107. diag_log _x;
  108. }
  109. else {
  110. _unit = _x select 0;
  111. _source = _x select 1;
  112. if (((!(isNil {_source})) AND {(!(isNull _source))}) AND {((_source isKindOf "CAManBase") AND {(owner _unit != owner _source)})}) then {
  113. diag_log format ["P1ayer %1 hit by %2 %3 from %4 meters",
  114. _unit call fa_plr2Str, _source call fa_plr2Str, _x select 2, _x select 3];
  115. if (_unit getVariable["processedDeath", 0] == 0) then {
  116. _unit setVariable [ "attacker", name _source ];
  117. _unit setVariable [ "noatlf4", diag_ticktime ]; // server-side "not in combat" test, if player is not already dead
  118. };
  119. };
  120. };
  121. };
  122. };
  123.  
  124. if (!isDedicated) then {[] execVM "Scripts\kh_actions.sqf";
  125. [] execVM "anti_invis.sqf";
  126. [] execVM "scripts\debug_monitor.sqf";
  127. [] execVM "scripts\Server_WelcomeCredits.sqf";
  128. waitUntil {!isNil "dayz_loadScreenMsg"};
  129. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  130.  
  131. //Run the player monitor
  132. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "spawn.sqf";}];
  133. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  134. };
  135.  
  136. // Logo watermark: adding a logo in the bottom left corner of the screen with the server name in it
  137. if (!isNil "dayZ_serverName") then {
  138. [] spawn {
  139. waitUntil {(!isNull Player) and (alive Player) and (player == player)};
  140. waituntil {!(isNull (findDisplay 46))};
  141. 5 cutRsc ["wm_disp","PLAIN"];
  142. ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText dayZ_serverName;
  143. };
  144. };
  145.  
  146. //Custom Scripts
  147. execVM "R3F_ARTY_AND_LOG\init.sqf";
  148. [] execVM "marker.sqf";
  149. [] execVM "Nametags\cpcnametags.sqf";
  150. [] execVM "regen\regen_blood.sqf";
  151. [] execVM "scripts\SWS.sqf";
  152.  
  153.  
  154.  
  155. //Spawn selection
  156. p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf";
  157. waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
  158. if (PVCDZ_plr_Login2 select 2) then {player spawn p2_newspawn;};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement