How do I punt The kilss % in Score board

Results 1 to 12 of 12
  1. #1
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    idea How do I punt The kilss % in Score board

    Can some one post how to set up de Score board like that with the damage and the % of the kills ect pliz help me



  2. #2
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    ZCombatInterface.cpp:

    Inside struct ZScoreBoardItem, add this under int nDeaths
    float nKDP;
    Search for this
    ZScoreBoardItem( const MUID& _uidUID, char *_szName,char *_szClan,int _nTeam,bool _bDeath,int _nExp,int _nKills,int _nDeaths, float _nKDP,int _nPing,bool _bMyChar,bool _bGameRoomUser, bool _bCommander = false)

    Add this under nDeaths = _nDeaths;
    nKDP = (_nKills <= 0) ? 0.0f : ((float)_nKills / (float)(_nKills + _nDeaths) * 100.0f);
    search for this:
    pItem->nDeaths= pCharacter->GetStatus()->nDeaths;

    add this under it:
    pItem->nKDP = (pItem->nKills <= 0) ? 0.0f : ((float)pItem->nKills / (float)(pItem->nKills + pItem->nDeaths) * 100.0f);
    Search for this:

    x=ITEM_XPOS[4];
    sprintf(szText,"%d",pItem->nDeaths);
    TextRelative(pDC,x,texty,szText,true);

    Add this under it:
    x = ITEM_XPOS[5];
    sprintf(szText, "%.1f%%", pItem->nKDP);
    TextRelative(pDC, x, texty, szText, true);
    Search for this:
    sprintf(szText,"%d",pItem->nDeaths);
    TextRelative(pDC,x+.35f,texty,szText,true);

    add this under it:
    sprintf(szText, "%.1f%%", pItem->nKDP);
    TextRelative(pDC, x + .39f, texty, szText, true);
    search for this:
    x=0.61f;
    sprintf(szText,"%d",pItem->nDeaths);
    TextRelative(pDC,x,texty,szText,true);

    add this under it:
    x = 0.70f;
    sprintf(szText, "%.1f%%", pItem->nKDP);
    TextRelative(pDC, x, texty, szText, true);
    ZMessages.h

    Search for MSG_WORD_PING, under it add this:

    #define MSG_WORD_KDP "KD%"

    Recompile and do some organizing and you'll be all set.
    Last edited by jetman82; 21-01-15 at 02:32 PM.

  3. #3
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    Re: How do I punt The kilss % in Score board

    Bro thanks but I mean the one the say RATIO bro sorry if I was not clear sorry but if u can post the tuto how to put the RATIO in the Score boeard

  4. #4
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    umm.... this is the ratio lol, look more closely at the code. nKDP stands for Kill/Death Percentage. This should be a big flag telling you it's for the ratio:

    (_nKills <= 0) ? 0.0f : ((float)_nKills / (float)(_nKills + _nDeaths) * 100.0f);

  5. #5
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    Re: How do I punt The kilss % in Score board

    I have and error bro how can I move because is on top of the ping and it show both of them at the same Spot

  6. #6
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    You'll need to re-organize, change teh XITEM_POS values around. I didn't change those values correctly, just coded it to where it'd work.

  7. #7
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    Re: How do I punt The kilss % in Score board

    broo am a noob but thanks any ways :D

  8. #8
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    I started out as a noob too(well, I still am actually), you don't start out knowing something. It's not very hard, why not actually give it a try instead of expecting it to be handed to you on a silver spoon. I already provided the code, now all you have to do is change the position.. it's simple.

  9. #9
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    Re: How do I punt The kilss % in Score board

    i have to take the exp and place it there cuz i dont know how to make space for it

  10. #10
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    lol.. ill design a k/d widget thingy for you then, but after this you need to start trying ot learn how to do the stuff yourself. I started out like you asking a few questions but I also tried everything before asking. ONly way to learn is to try.

    - - - Updated - - -

    As said, here's the way you do it to make it like that server (im not doing the damage given/taken, no one wants to see that in the tab list, it takes up too much space, looks sloppy).

    1. Find this:
    x=ITEM_XPOS[3];
    sprintf(szText,"%d",pItem->nKills);
    TextRelative(pDC,x,texty,szText,true);
    pDC->SetColor( color);
    Replace with this:
    x=ITEM_XPOS[3];
    sprintf(szText,"%d / %d",pItem->nKills, pItem->nDeaths);
    TextRelative(pDC,x,texty,szText,true);
    pDC->SetColor( color);
    2. Find this:
    TextRelative(pDC,x,y, ZMsg(MSG_WORD_DEATH));

    Comment it out (won't be needing it)
    3. Find this:
    x = ITEM_XPOS[5] - .01f;//KD Percentage
    TextRelative(pDC, x, y, MSG_WORD_KDP);
    x = ITEM_XPOS[6] - .01f; // Ping
    TextRelative(pDC, x, y, ZMsg(MSG_WORD_PING));
    Replace with this:
    x = ITEM_XPOS[4] - .01f;//KD Percentage
    TextRelative(pDC, x, y, MSG_WORD_KDP);
    x = ITEM_XPOS[5] - .01f; // Ping
    TextRelative(pDC, x, y, ZMsg(MSG_WORD_PING));
    4. Find this:
    const float normalXPOS[6]
    change the 5th number in the bracket to this:
    0.87f
    5. Find this inside of DrawScoreBoard:
    pItem->nKDP = (pItem->nKills <= 0) ? 0.0f : ((float)pItem->nKills / (float)(pItem->nKills + pItem->nDeaths) * 100.0f);
    Replace it with this:
    if (pItem->nKills > pItem->nDeaths)
    pItem->nKDP = (pItem->nKills <= 0) ? 0.0f : ((float)pItem->nKills / (float)(pItem->nKills + pItem->nDeaths) * 100.0f);
    else if (pItem->nDeaths > pItem->nKills)
    pItem->nKDP = (pItem->nDeaths <= 0) ? 0.0f : ((float)pItem->nDeaths / (float)(pItem->nDeaths + pItem->nKills) * -100.f);
    else if(pItem->nKills = pItem->nDeaths)
    pItem->nKDP = 50.f
    You probably don't need that last else if statement, but I added it as a safety measure, so the calculation can never be wrong or cause a bug if the kills = deaths.

    Now kills/deaths are in one spot, KD% is in the spot to the right of it, and ping to the right of KD%. It will also do negative numbers for you. If you encounter a bug let me know, although there shouldn't be any.

    Edit: sorry, I had this set to do tenths instead of hundreths, find this:
    sprintf(szText, "%.1f%%", pItem->nKDP);
    replace the 1 with a 2 for hundreths.
    Last edited by jetman82; 22-01-15 at 11:02 PM. Reason: Was only set for tenths, not hundredths

  11. #11
    Apprentice Anfernin is offline
    MemberRank
    Jul 2012 Join Date
    Lawrence, UniteLocation
    24Posts

    Re: How do I punt The kilss % in Score board

    I cant do it cuz u got different thing on the but I did something else but question see in my Score board it say EXP where can i chage that !!

  12. #12
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: How do I punt The kilss % in Score board

    It's not hard lol... Look I'm not trying to be mean, but I won't hold your hand through this. The gunz community has enough people trying to get me to do that. It's not hard to find, you literally aren't even trying at this point lol. Honestly if you can't learn the basics then you shouldn't be opening up a server (not that I should open one up either, I still suck at coding, that's why I haven't).



Advertisement