j0k3r5 stats panel help

Simkon

New Member
Hey, i'm trying to modify this to show text based on a current player's humanity in a table. e.g. if the player's humanity is greater than 5000 and less than 25000 it would display "Hero".

When i run this script the table loads fine but just has "any" in the rank spot.

Any help would be appreciated.
Code:
/*
 
    /////Tweaked j0k3r5 / Original work done by Matt L / and to anyone else that is involved that Ive forgotten////
    ////www.j0k3r5.com////
    If modified and released give credits where due, thank you.
   
*/
 
 
 
 
 
 
 
 
 
 
 
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};
 
while {custom_monitor} do
{
    _logo = "custom_stats\stats_logo.paa";
    _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
    _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
    _textCity = "Wilderness";
        if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
        if (player == vehicle player) then
        {
    _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));   
        }
        else
        {
    _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));   
        };
    _kills =                player getVariable["zombieKills",0];
    _killsH =                player getVariable["humanKills",0];
    _killsB =                player getVariable["banditKills",0];
    _humanity =                player getVariable["humanity",0];
    _headShots =            player getVariable["headShots",0];
    _zombies =              count entities "zZombie_Base";
    _zombiesA =            {alive _x} count entities "zZombie_Base";
    _babybandit1 =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0) && ((_x getVariable ["humanity",0]) > -5000)}; setVariable [_babybandittext,text "Baby Bandit",true];
    _bandit1  =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) < -5000) && ((_x getVariable ["humanity",0]) > -25000)}; setVariable [_bandittext,text "Bandit",true];
    _superbandit1 =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) < -25000)} && ((_x getVariable ["humanity",0]) > -100000); setVariable [_superbandittext,text "Super Bandit",true];
    _veteranbandit1  =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) < -100000)} && ((_x getVariable ["humanity",0]) > -250000); setVariable [_veteranbandittext,text "Veteran Bandit",true];
    _colossalbandit1 =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) < -250000)}; setVariable [_colossalbandittext,text "Colossal Bandit",true];
    _babyhero1  =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) > 0) && ((_x getVariable ["humanity",0]) < 5000)}; setVariable [_babyherotext,text "Baby Hero",true];
    _hero1 =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) > 5000) && ((_x getVariable ["humanity",0]) < 15000)}; setVariable [_herotext,text "Hero",true];
    _superhero1  =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) > 15000) && ((_x getVariable ["humanity",0]) < 30000)}; setVariable [_superherotext,text "Super Hero",true];
    _veteranhero1 =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) > 30000) && ((_x getVariable ["humanity",0]) < 100000)}; setVariable [_veteranherotext,text "Veteran Hero",true];
    _colossalhero1  =            {(isPlayer _x) && ((_x getVariable ["humanity",0]) > 100000)}; setVariable [_colossalherotext,text "Colossal Hero",true];
   
   
    hintSilent parseText format ["
   
    <t size='1'    font='Bitstream'align='center'>%1</t><br/>
    <t size='1'    font='Bitstream'align='center' color='#2cabe2' >Your rank is: %18%19%20%21%22%23%24%25%26%27</t><br/>
    <br/>
    <img size='6' image='%13'/>
    <br/>
    <br/>
    <t size='0.75'    font='Bitstream'align='left'>Location:</t><t size='0.75'                font='Bitstream'align='right'>%15</t><br/>
    <t size='0.75'    font='Bitstream'align='left'>Blood Left:</t><t size='0.75'                font='Bitstream'align='right'>%2</t><br/>
    <t size='0.75'    font='Bitstream'align='left'>Temperature:</t><t size='0.75'    font='Bitstream' align='right'>%8</t><br/>
    <t size='0.75'    font='Bitstream'align='left'>Humanity:</t><t size='0.75'                font='Bitstream'align='right'>%3</t><br/>
    <t size='0.75'    font='Bitstream'align='left'color='#2cabe2'>Heroes Killed:</t><t size='0.75'            font='Bitstream'align='right'>%4</t><br/>
    <t size='0.75'    font='Bitstream'align='left'color='#ff0000'>Bandits Killed:</t><t size='0.75'            font='Bitstream'align='right'>%5</t><br/>
    <t size='0.75'    font='Bitstream'align='left'color='#666666'>Zeds Killed:</t><t size='0.75'            font='Bitstream'align='right'>%6</t><br/>
    <t size='0.75'    font='Bitstream'align='left'>Headshots:</t><t size='0.75'                font='Bitstream'align='right'>%7</t><br/>
    <t size='0.75'    font='Bitstream'align='left'>FPS:</t><t size='0.75'                font='Bitstream'align='right'>%10</t><br/>
    <br/>
    <t size='0.75'    font='Bitstream'align='left'>Survived:</t><t size='0.75'                font='Bitstream'align='right'color='#FF0000'>%17 Dayz</t>
    <br/>
    <t size='1'        font='Bitstream'align='center'color='#FF0000'>Restart in %14 minutes!</t>
    <br/>
    <br/>
    <img size='4' image='%16'/>
    <br/>
   
   
    ",
    dayz_playerName,                                            //1
    r_player_blood,                                                //2
    round _humanity,                                            //3
    _killsH,                                                    //4
    _killsB,                                                    //5
    _kills,                                                        //6
    _headShots,                                                    //7
    dayz_temperatur,                                            //8
    {alive _x} count entities "zZombie_Base",                    //9
    diag_fps,                                                    //10
    _banditCount,                                                //11
    _heroCount,                                                    //12
    _logo,                                                        //13
    (360-(round(serverTime/60))),                                //14
    _textCity,                                                    //15
    _pic,                                                        //16
    (dayz_Survived),                                            //17
    _babybandittext,                                            //18
    _bandittext,                                                //19
    _superbandittext,                                            //20
    _veteranbandittext,                                            //21
    _colossalbandittext,                                        //22
    _babyherotext,                                                //23
    _herotext,                                                    //24
    _superherotext,                                                //25
    _veteranherotext,                                            //26
    _colossalherotext,                                            //27
    ];
sleep 1;
};
 
 
private ["_toggleUseTime","_toggleLastUsedTime","_lastToggle","_toggleUseTime","_toggleOn","_toggleOff"];
 
_toggleUseTime = 1; // Amount of time it takes in second for the player to toggle custom debug
_toggleLastUsedTime = 8; // Amount of time in seconds before player can toggle custom debug again
_toggleTime = time - lastToggle; // Variable used for easy reference in determining the cooldown
_toggleOn = s_player_toggle;
_toggleOff = s_player_toggle;
 
if (dayz_combat == 1) then { // Check if in combat
    cutText [format["You are in Combat and cannot toggle debug"], "PLAIN DOWN"]; //display text at bottom center of screen when in combat
} else {
 
    player removeAction s_player_toggle; //remove the action from users scroll menu
   
    r_interrupt = false; // public interrupt variable
    _started = false; // this starts as false as a check
    _finished = false; // this starts as false
    while {r_doLoop} do {
        if (_started && (time) > _toggleUseTime) then {
            r_doLoop = false; // turns off the loop
            _finished = true; // set finished to true
            lastToggle = time; // the last toggle time
        };
        if (r_interrupt) then {
            r_doLoop = false; // if interrupted turns loop off early so _finished is never true
        };
        sleep 0.1;
    };
    r_doLoop = false; // make sure loop is off
   
    if (_finished) then {
        // this is for handling if interrupted
        r_interrupt = false;
        player switchMove "";
        player playActionNow "stop";
        cutText [format["You have disabled your stats panel!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
        hintSilent "";
    };
};
 
Ive noticed your using the old code,

New version: http://opendayz.net/threads/j0k3r5-stats-panel-very-easy-install-stats-panel.15090/


Ive not added the variables, as that seems to be the problem.

But this is what Ive got so far done,

Code:
/*
 
/////Tweaked j0k3r5 / Original work done by Matt L / and to anyone else that is involved that Ive forgotten////
////www.j0k3r5.com////
If modified and released give credits where due, thank you.
 
*/
 
 
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
 
    if (_dikCode == 0x44) then {
        if (j0k3r5_stats) then {
            j0k3r5_stats = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
 
fnc_debug = {
    j0k3r5_stats = true;
    while {j0k3r5_stats} do
{
_logo = "custom\Stats\stats_logo.paa";
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
 
_nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
_textCity = "Wilderness";
if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
 
if (player == vehicle player) then
{
_pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
}
else
{
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
};
 
_timeleft=_combattimeout-time;
_kills =player getVariable["zombieKills",0];
_killsH =player getVariable["humanKills",0];
_killsB =player getVariable["banditKills",0];
_humanity =player getVariable["humanity",0];
_headShots =player getVariable["headShots",0];
_zombies =      count entities "zZombie_Base";
_zombiesA =    {alive _x} count entities "zZombie_Base";
 
 
 
hintSilent parseText format
[
"
<img size='6' image='%10'/>
<br/>
<t size='1'    font='Bitstream'align='center'color='#FFFF00'>%15</t><br/>
<t size='1'font='Bitstream'align='center'>MESSAGE 1</t><br/>
<t size='1'font='Bitstream'align='center'>MESSAGE 2</t><br/>
<br/>
<t size='0.75'font='Bitstream'align='left'>Your rank is:</t><t size='0.75'  font='Bitstream'align='right'color='#FF0000'>%18%19%20%21%22%23%24%25%26%27</t><br/>
<t size='0.75'font='Bitstream'align='left'>Location:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%11</t><br/>
<t size='0.75'font='Bitstream'align='left'>Blood:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%1</t><br/>
<t size='0.75'font='Bitstream'align='left'>Humanity:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%2</t><br/>
<t size='0.75'font='Bitstream'align='left'>Headshots:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%6</t><br/>
<t size='0.75'font='Bitstream'align='left'>Heroes Killed:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%3</t><br/>
<t size='0.75'font='Bitstream'align='left'>Bandits Killed:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%4</t><br/>
<t size='0.75'font='Bitstream'align='left'>Zombies Killed:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%5</t><br/>
<t size='0.75'font='Bitstream'align='left'>Zeds (alive/total): </t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%13/%12</t><br/>
<t size='0.75'font='Bitstream'align='left'>FPS: </t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%14</t><br/>
<t size='0.75'font='Bitstream'align='left'>Survived:</t><t size='0.75'font='Bitstream'align='right'color='#FF0000'>%7 Dayz</t>
<br/>
<br/>
<t size='1'font='Bitstream'align='center'color='#FFFF00'>Restart in %8 minutes!</t>
<br/>
<img size='6' image='%9'/>
<br/>
<t size='1'font='Bitstream' align='center'>Use F10 to Toggle</t>
<br/>
 
 
 
",
r_player_blood,//1
round _humanity,//2
_killsH,//3
_killsB,//4
_kills,//5
_headShots,//6
(dayz_Survived),//7
(180-(round(serverTime/60))),//8 change the 180 to suit your server mins for restarts
_pic,//9
_logo,//10
_textCity,//11
count entities "zZombie_Base",//12
{alive _x} count entities "zZombie_Base",//13
diag_fps,//14
dayz_playerName,//15
_babybandittext,                                            //18
_bandittext,                                                //19
_superbandittext,                                          //20
_veteranbandittext,                                        //21
_colossalbandittext,                                        //22
_babyherotext,                                              //23
_herotext,                                                  //24
_superherotext,                                            //25
_veteranherotext,                                          //26
_colossalherotext                                          //27
 
];
sleep 5;
};
};
 
[] spawn fnc_debug;
 
Hi mate, when i use the Jok3r5 stats panel i can't run the craft manual, i just get this blinking white cursor on screen when pressing I to open crafting. Something is conflicting somewhere, any ideas? I'm running pwnoz0r 1.8.0.3 if that helps! ;)

I also tried a debug panel someone made that was modified from your panel and i get the same with that also! They both runs fine but just conflict! Don't know if this helps but these are the scripts/mods/addons i've got running.

J0k3r5 Stats Panel. (crafing manual conflict)******
DZAI Lite - Dynamic AI Package.
R3F Logistics - Towing and Heli-Lift.
BDC's "Shots Fired!" Zombie Aggro Realism Sound Mod.
BDC's Enhanced Jerry/Fuel Can Filling.
Drink water - Ponds/Wells.
Street Lights.
House Lights.
Tower Lights.
Headshot Suicide.
DayZ Mission System.
[CPC] Name Tags.
Krixes - Tent Sleep Healing Script.
Krixes - Self Bloodbag Script.
Auto Delete Wrecked Vehicles.

If i remember i tried it last night without those running and i still got the crafting issue, it's a shame because i love your stats panel, it's the best one i've seen and i've tried quite a few lol! Now i don't run any because i'm sulking! :)
 
With regards to the question you posted on headshot suicide, the things that didn't work for me where skaronametags so instead i'm using [CPC] Name Tags which works for me and Server_WelcomeCredits. :confused:

Maybe i'll try again but i don't think i missed anything, and as you can see above i managed to get all the above working and some where way harder to install than those two i'm having issues with! ;)
 
Back
Top