Advertisement
Guest User

Init.sqf

a guest
Jul 8th, 2013
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 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. //disable greeting menu
  16. player setVariable ["BIS_noCoreConversations", true];
  17. //disable radio messages to be heard and shown in the left lower corner of the screen
  18. enableRadio false;
  19.  
  20. //Load in compiled functions
  21. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  22. progressLoadingScreen 0.1;
  23. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
  24. progressLoadingScreen 0.2;
  25. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  26. progressLoadingScreen 0.4;
  27. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
  28. progressLoadingScreen 1.0;
  29.  
  30. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  31.  
  32. /* BIS_Effects_* fixes from Dwarden */
  33. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  34. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  35. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  36.  
  37. BIS_Effects_globalEvent = {
  38. BIS_effects_gepv = _this;
  39. publicVariable "BIS_effects_gepv";
  40. _this call BIS_Effects_startEvent;
  41. };
  42.  
  43. BIS_Effects_startEvent = {
  44. switch (_this select 0) do {
  45. case "AirDestruction": {
  46. [_this select 1] spawn BIS_Effects_AirDestruction;
  47. };
  48. case "AirDestructionStage2": {
  49. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  50. };
  51. case "Burn": {
  52. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  53. };
  54. };
  55. };
  56.  
  57. "BIS_effects_gepv" addPublicVariableEventHandler {
  58. (_this select 1) call BIS_Effects_startEvent;
  59. };
  60.  
  61. if ((!isServer) && (isNull player) ) then
  62. {
  63. waitUntil {!isNull player};
  64. waitUntil {time > 3};
  65. };
  66.  
  67. if ((!isServer) && (player != player)) then
  68. {
  69. waitUntil {player == player};
  70. waitUntil {time > 3};
  71. };
  72.  
  73. if (isServer) then {
  74. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  75. "PVDZ_sec_atp" addPublicVariableEventHandler { diag_log format["%1", _this select 1];};
  76. };
  77.  
  78. if (!isDedicated) then {
  79. //Conduct map operations
  80. 0 fadeSound 0;
  81. waitUntil {!isNil "dayz_loadScreenMsg"};
  82. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  83.  
  84. //Run the player monitor
  85. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
  86. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  87. [] execVM "\z\addons\dayz_code\system\antihack.sqf";
  88. };
  89.  
  90. // Logo watermark: adding a logo in the bottom left corner of the screen with the server name in it
  91. if (!isNil "dayZ_serverName") then {
  92. [] spawn {
  93. waitUntil {(!isNull Player) and (alive Player) and (player == player)};
  94. waituntil {!(isNull (findDisplay 46))};
  95. 5 cutRsc ["wm_disp","PLAIN"];
  96. ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText dayZ_serverName;
  97. };
  98. };
  99.  
  100. #include "\z\addons\dayz_code\system\REsec.sqf"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement