Advertisement
Matt34

Untitled

Jun 26th, 2013
1,446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. //Credit to Krixes for use of his code and also to AVendettaForYou for helping me figure some stuff out.
  2. //Modified by Matt L
  3. if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};
  4.  
  5. while {custom_monitor} do
  6. {
  7. _kills = player getVariable["zombieKills",0];
  8. _killsH = player getVariable["humanKills",0];
  9. _killsB = player getVariable["banditKills",0];
  10. _humanity = player getVariable["humanity",0];
  11. _headShots = player getVariable["headShots",0];
  12. _zombies = count entities "zZombie_Base";
  13. _zombiesA = {alive _x} count entities "zZombie_Base";
  14. _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
  15. _heroCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
  16. hintSilent parseText format ["
  17. <t size='1'font='Bitstream'align='center'>%1</t><br/>
  18. <t size='1'font='Bitstream'align='left'>Midochlorians Left:</t><t size='1.5' font='Bitstream'align='right'>%2</t><br/>
  19. <t size='1'font='Bitstream'align='left'>Humanity:</t><t size='1.5'font='Bitstream'align='right'>%3</t><br/>
  20. <t size='1'font='Bitstream'align='left'>Noobs Killed:</t><t size='1.5'font='Bitstream'align='right'>%4</t><br/>
  21. <t size='1'font='Bitstream'align='left'>Assholes Killed:</t><t size='1.5'font='Bitstream'align='right'>%5</t><br/>
  22. <t size='1'font='Bitstream'align='left'>Zombitches Killed:</t><t size='1.5'font='Bitstream'align='right'>%6</t><br/>
  23. <t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1.5'font='Bitstream'align='right'>%7</t><br/>
  24. <t size='1' font='Bitstream' align='left'>Zombitches (alive/total): </t><t size='1' font='Bitstream' align='right'>%9/%8</t><br/>
  25. <t size='1'font='Bitstream'align='left'>Current Bandit Count:</t><t size='1.5'font='Bitstream'align='right'>%11</t><br/>
  26. <t size='1'font='Bitstream'align='left'>Current Hero Count:</t><t size='1.5'font='Bitstream'align='right'>%12</t><br/>
  27. <t size='1' font='Bitstream' align='left'>FPS: </t><t size='1' font='Bitstream' align='right'>%10</t><br/>
  28. <t size='1'font='Bitstream'align='center'>Welcome to the Apocalypse! </t><br/>
  29.  
  30. ",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,count entities "zZombie_Base",{alive _x} count entities "zZombie_Base",diag_fps,_banditCount,_heroCount];
  31. sleep 1;
  32. };
  33.  
  34.  
  35. private ["_toggleUseTime","_toggleLastUsedTime","_lastToggle","_toggleUseTime","_toggleOn","_toggleOff"];
  36.  
  37. _toggleUseTime = 1; // Amount of time it takes in second for the player to toggle custom debug
  38. _toggleLastUsedTime = 8; // Amount of time in seconds before player can toggle custom debug again
  39. _toggleTime = time - lastToggle; // Variable used for easy reference in determining the cooldown
  40. _toggleOn = s_player_toggle;
  41. _toggleOff = s_player_toggle;
  42.  
  43. if (dayz_combat == 1) then { // Check if in combat
  44. cutText [format["You are in Combat and cannot toggle debug"], "PLAIN DOWN"]; //display text at bottom center of screen when in combat
  45. } else {
  46.  
  47. player removeAction s_player_toggle; //remove the action from users scroll menu
  48.  
  49. player playActionNow "Medic"; //play animation
  50.  
  51. r_interrupt = false; // public interuppt variable
  52. _animState = animationState player; // get the animation state of the player
  53. r_doLoop = true; // while true sets whether to continue
  54. _started = false; // this starts as false as a check
  55. _finished = false; // this starts as false
  56. while {r_doLoop} do {
  57. _animState = animationState player; // keep checking to make sure player is in correct animation
  58. _isMedic = ["medic",_animState] call fnc_inString; // checking to make sure the animstate is the medic animation still
  59. if (_isMedic) then {
  60. _started = true; // this is a check to make sure everything is still ok
  61. };
  62. if(!_isMedic && !r_interrupt && (time) < _toggleUseTime) then {
  63. player playActionNow "Medic"; //play animation
  64. _isMedic = true;
  65. };
  66. if (_started && !_isMedic && (time) > _toggleUseTime) then {
  67. r_doLoop = false; // turns off the loop
  68. _finished = true; // set finished to true
  69. lastToggle = time; // the last toggle time
  70. };
  71. if (r_interrupt) then {
  72. r_doLoop = false; // if interuppted turns loop off early so _finished is never true
  73. };
  74. sleep 0.1;
  75. };
  76. r_doLoop = false; // make sure loop is off
  77.  
  78. if (_finished) then {
  79. // this is for handling if interrupted
  80. r_interrupt = false;
  81. player switchMove "";
  82. player playActionNow "stop";
  83. cutText [format["You have disabled your debug monitor!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
  84. hintSilent "";
  85. };
  86. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement