Advertisement
Guest User

Init Sarge

a guest
Jul 6th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. /*
  2. INITILIZATION
  3. */
  4. startLoadingScreen ["","RscDisplayLoadCustom"];
  5. cutText ["","BLACK OUT"];
  6. enableSaving [false, false];
  7.  
  8. //REALLY IMPORTANT VALUES
  9. dayZ_instance = 1; // The instance
  10. //dayZ_serverName = "UK1337"; // server name (country code + server number)
  11. dayzHiveRequest = [];
  12. initialized = false;
  13. dayz_previousID = 0;
  14.  
  15. /*
  16. //3km max view distance
  17. setViewDistance 3000;
  18. */
  19. //disable greeting menu
  20. player setVariable ["BIS_noCoreConversations", true];
  21. //disable radio messages to be heard and shown in the left lower corner of the screen
  22. enableRadio false;
  23.  
  24. //Load in compiled functions
  25. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  26. progressLoadingScreen 0.1;
  27. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
  28. progressLoadingScreen 0.2;
  29. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  30. progressLoadingScreen 0.4;
  31. call compile preprocessFileLineNumbers "\z\addons\dayz_codeinit\compiles.sqf"; //Compile regular functions
  32. progressLoadingScreen 1.0;
  33.  
  34. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  35.  
  36. /* BIS_Effects_* fixes from Dwarden */
  37. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  38. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  39. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  40.  
  41. BIS_Effects_globalEvent = {
  42. BIS_effects_gepv = _this;
  43. publicVariable "BIS_effects_gepv";
  44. _this call BIS_Effects_startEvent;
  45. };
  46.  
  47. BIS_Effects_startEvent = {
  48. switch (_this select 0) do {
  49. case "AirDestruction": {
  50. [_this select 1] spawn BIS_Effects_AirDestruction;
  51. };
  52. case "AirDestructionStage2": {
  53. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  54. };
  55. case "Burn": {
  56. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  57. };
  58. };
  59. };
  60.  
  61. "BIS_effects_gepv" addPublicVariableEventHandler {
  62. (_this select 1) call BIS_Effects_startEvent;
  63. };
  64.  
  65. if ((!isServer) && (isNull player) ) then
  66. {
  67. waitUntil {!isNull player};
  68. waitUntil {time > 3};
  69. };
  70.  
  71. if ((!isServer) && (player != player)) then
  72. {
  73. waitUntil {player == player};
  74. waitUntil {time > 3};
  75. };
  76.  
  77. if (isServer) then {
  78. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  79. "PVDZ_sec_atp" addPublicVariableEventHandler { diag_log format["%1", _this select 1];};
  80. };
  81. /*
  82. if (!isDedicated) then {
  83.  
  84. //Conduct map operations
  85. 0 fadeSound 0;
  86. waitUntil {!isNil "dayz_loadScreenMsg"};
  87. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  88.  
  89. //Run the player monitor
  90. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
  91. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  92. [] execVM "\z\addons\dayz_code\system\antihack.sqf";
  93. };
  94.  
  95. // Logo watermark: adding a logo in the bottom left corner of the screen with the server name in it
  96. if (!isNil "dayZ_serverName") then {
  97. [] spawn {
  98. waitUntil {(!isNull Player) and (alive Player) and (player == player)};
  99. waituntil {!(isNull (findDisplay 46))};
  100. 5 cutRsc ["wm_disp","PLAIN"];
  101. ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText dayZ_serverName;
  102. };
  103. };
  104.  
  105.  
  106.  
  107.  
  108.  
  109. // UPSMON
  110. call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
  111.  
  112. // SHK
  113. call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf";
  114.  
  115. // run SAR_AI
  116. [] execVM "addons\SARGE\SAR_AI_init.sqf";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement