Shawn Posted August 24, 2016 Report Share Posted August 24, 2016 By pressing 0, it lets the player run without the need to hold W. It automatically exits the script if the player walks into water, has a broken leg, or becomes either unconscious or dead. 1. Create a file called AutoRun.sqf 2. Open it, and paste the following: if (player != vehicle player) exitWith {}; if (surfaceIsWater (getPosASL player)) exitWith {systemChat('Autorun currently unavailable.');}; if (r_fracture_legs or r_player_unconscious or deathHandled) exitWith {}; if (autoRunActive == 0) then { autoRunActive = 1; systemChat('Autorun Activated'); systemChat('Check for missions or obstacles you may run into'); autoRunThread = [] spawn { while {autoRunActive == 1} do { if ((player != vehicle player) or (surfaceIsWater (getPosASL player)) or r_fracture_legs or r_player_unconscious or deathHandled) exitWith {call autoRunOff; systemChat('Autorun Deactivated');}; player playAction "FastF"; uiSleep 0.5; }; }; } else { call autoRunOff; systemChat('Autorun Deactivated'); }; _handled = true; 3. Open up compiles.sqf and find: dze_surrender_off = { player setVariable ["DZE_Surrendered", false, true]; DZE_Surrender = false; }; 4. Paste the following directly below it: autoRunOff = { autoRunActive = 0; terminate autoRunThread; player playActionNow "Stop"; }; 5. Open up variables.sqf and find: DZE_SaveTime = 30; 6. Paste this line underneath: autoRunActive = 0; 7. Finally open up dayz_spaceInterrupt.sqf and find: // Disable ESC after death if (_dikCode == 0x01 && r_player_dead) then { _handled = true; }; 8. Insert directly below: if (_dikCode == 0x0B) then { []execVM "Path\To\AutoRun.sqf"; }; Remember, it does not have to be 0 to activate the script. You can change 0 by replacing 0x0B in the dayz_spaceInterrupt.sqf edit you made. Here is a link for other DIK KeyCodes: https://community.bistudio.com/wiki/DIK_KeyCodes Seelanpro, chi, Shak and 1 other 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now