Surama 0 Report post Posted December 16, 2013 In this tuto i show u how u can easy add earthquake in u'r server... Earthquake have't damage U need: 1) mission.pbo 2) Notepad 1st step ----------- Unpuck u'r mission pbo, and in root create a new SQF file, likes - earthquake.sqf put this code in u'r earthquake.sqf earth = { playsound "eq"; for "_i" from 0 to 140 do { _vx = vectorup _this select 0; _vy = vectorup _this select 1; _vz = vectorup _this select 2; _coef = 0.01 - (0.0001 * _i); _this setvectorup [ _vx+(-_coef+random (2*_coef)), _vy+(-_coef+random (2*_coef)), _vz+(-_coef+random (2*_coef)) ]; sleep (0.01 + random 0.01); }; }; while {true} do { player spawn earth; sleep (360 + random 30); }; 2-nd step ------------------- In u'r INIT.sqf file find: //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "playerspawn.sqf";}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; And below that add code: null = [] execVM "earthquake.sqf"; ------------------------------------------------------ changing these parameters "sleep (360 + random 30);" [in u'r earthquake.sqf file] - you can increase \reduce time of a dream and intensity... ------------------------------------------------------ DONE! Pack u'r mission file, upload it to server! Quote Share this post Link to post Share on other sites More sharing options...
Surama 0 Report post Posted December 16, 2013 In this tuto i show u how u can easy add earthquake in u'r server... Earthquake have't damage U need: 1) mission.pbo 2) Notepad 1st step ----------- Unpuck u'r mission pbo, and in root create a new SQF file, likes - earthquake.sqf put this code in u'r earthquake.sqf earth = { playsound "eq"; for "_i" from 0 to 140 do { _vx = vectorup _this select 0; _vy = vectorup _this select 1; _vz = vectorup _this select 2; _coef = 0.01 - (0.0001 * _i); _this setvectorup [ _vx+(-_coef+random (2*_coef)), _vy+(-_coef+random (2*_coef)), _vz+(-_coef+random (2*_coef)) ]; sleep (0.01 + random 0.01); }; }; while {true} do { player spawn earth; sleep (360 + random 30); }; 2-nd step ------------------- In u'r INIT.sqf file find: //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "playerspawn.sqf";}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; And below that add code: null = [] execVM "earthquake.sqf"; ------------------------------------------------------ changing these parameters "sleep (360 + random 30);" [in u'r earthquake.sqf file] - you can increase \reduce time of a dream and intensity... ------------------------------------------------------ DONE! Pack u'r mission file, upload it to server! Quote Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.