Advertisement
infiSTAR23

Debug part

Apr 12th, 2014
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.46 KB | None | 0 0
  1.     if ("+str _DMS+") then {
  2.         [] spawn {
  3.             if ("+str _DMW+") then {
  4.                 [] spawn {
  5.                     while {1 == 1} do
  6.                     {
  7.                         if (isNil 's_player_debug') then {s_player_debug = -1;};
  8.                         if (isNil 'unit_veh') then {unit_veh = vehicle player;};
  9.                         if (s_player_debug == -1) then
  10.                         {
  11.                             s_player_debug = unit_veh addaction [('<t color=''#0066CC''>' + ('Debug') +'</t>'),'ca\modules\MP\data\scriptCommands\moveIn.sqf','Driver ([] spawn fnc_debugX0);',5,false,false,'',''];
  12.                         };
  13.                         if (unit_veh != vehicle player) then
  14.                         {
  15.                             unit_veh removeAction s_player_debug;
  16.                             unit_veh = nil;
  17.                             s_player_debug = -1;
  18.                         };
  19.                         sleep 1.5;
  20.                     };
  21.                 };
  22.             };
  23.             fnc_debugX0 = {
  24.                 if (isNil 'debugMonitorX') then
  25.                 {
  26.                     debugMonitorX = true;
  27.                     [] spawn fnc_debugX;
  28.                 }
  29.                 else
  30.                 {
  31.                     debugMonitorX = !debugMonitorX;
  32.                     hintSilent '';
  33.                     [] spawn fnc_debugX;
  34.                 };
  35.             }; 
  36.             fnc_debugX = {
  37.                 admin_debug_run = false;
  38.                 _BottomDebug = "+(str _BottomDebug)+";
  39.                 while {debugMonitorX} do
  40.                 {              
  41.                     _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
  42.                     if (player == vehicle player) then {_pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
  43.                     }else{_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));};
  44.                    
  45.                     _txt = '';
  46.                     _txt = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'displayName'));
  47.                    
  48.                     _stime = 0;
  49.                     if(serverTime > 36000)then{_stime = time;}else{_stime = serverTime;};
  50.                     _hours = (_stime/60/60);
  51.                     _hours = toArray (str _hours);
  52.                     _hours resize 1;
  53.                     _hours = toString _hours;
  54.                     _hours = compile _hours;
  55.                     _hours = call  _hours;
  56.                     _minutes = floor(_stime/60);
  57.                     _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format ['0%1',_minutes2];};
  58.                    
  59.                     hintSilent parseText format [""
  60.                     <t size='1' font='Bitstream' align='Center' >[%1]</t><br/>
  61.                     <img size='4.75' image='%4'/><br/>
  62.                     <t size='1' font='Bitstream' align='left' color='#CC0000'>Blood: </t><t size='1' font='Bitstream' align='right'>%2</t><br/>
  63.                     <t size='1' font='Bitstream' align='left' color='#0066CC'>Humanity: </t><t size='1' font='Bitstream' align='right'>%3</t><br/>
  64.                     <br/>
  65.                     <t size='1' font='Bitstream' align='left' color='#FFBF00'>Zombie Kills: </t><t size='1' font='Bitstream' align='right'>%9</t><br/>
  66.                     <t size='1' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='1' font='Bitstream' align='right'>%10</t><br/>
  67.                     <t size='1' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='1' font='Bitstream' align='right'>%11</t><br/>
  68.                     <br/>
  69.                     <t size='1' font='Bitstream' align='left' color='#FFBF00'>UPTIME: </t><t size='1' font='Bitstream' align='right'>%5h %6min</t><br/>
  70.                     <t size='1' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='1' font='Bitstream' align='right'>%8</t><br/>
  71.                     <t size='1' font='Bitstream' align='Center' color='#CC0000'>%7</t>
  72.                     "",
  73.                     _txt,
  74.                     (r_player_blood),
  75.                     round (player getVariable['humanity', 0]),
  76.                     _pic,
  77.                     _hours,
  78.                     _minutes2,
  79.                     _BottomDebug,
  80.                     (round diag_fps),
  81.                     (player getVariable['zombieKills', 0]),
  82.                     (player getVariable['humanKills', 0]),
  83.                     (player getVariable['banditKills', 0])
  84.                     ];
  85.                     sleep 1;
  86.                 };
  87.             };
  88.             [] spawn fnc_debugX0;
  89.         };
  90.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement