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
![]()
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
![]()
ZCombatInterface.cpp:
Inside struct ZScoreBoardItem, add this under int nDeaths
Search for thisfloat nKDP;
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;
search for this:nKDP = (_nKills <= 0) ? 0.0f : ((float)_nKills / (float)(_nKills + _nDeaths) * 100.0f);
pItem->nDeaths= pCharacter->GetStatus()->nDeaths;
add this under it:
Search for this:pItem->nKDP = (pItem->nKills <= 0) ? 0.0f : ((float)pItem->nKills / (float)(pItem->nKills + pItem->nDeaths) * 100.0f);
x=ITEM_XPOS[4];
sprintf(szText,"%d",pItem->nDeaths);
TextRelative(pDC,x,texty,szText,true);
Add this under it:
Search for this:x = ITEM_XPOS[5];
sprintf(szText, "%.1f%%", pItem->nKDP);
TextRelative(pDC, x, texty, szText, true);
sprintf(szText,"%d",pItem->nDeaths);
TextRelative(pDC,x+.35f,texty,szText,true);
add this under it:
search for this:sprintf(szText, "%.1f%%", pItem->nKDP);
TextRelative(pDC, x + .39f, texty, szText, true);
x=0.61f;
sprintf(szText,"%d",pItem->nDeaths);
TextRelative(pDC,x,texty,szText,true);
add this under it:
ZMessages.hx = 0.70f;
sprintf(szText, "%.1f%%", pItem->nKDP);
TextRelative(pDC, x, texty, szText, true);
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.
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
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);
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
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.
broo am a noob but thanks any ways :D
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.
i have to take the exp and place it there cuz i dont know how to make space for it
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:
Replace with this:x=ITEM_XPOS[3];
sprintf(szText,"%d",pItem->nKills);
TextRelative(pDC,x,texty,szText,true);
pDC->SetColor( color);
2. Find this:x=ITEM_XPOS[3];
sprintf(szText,"%d / %d",pItem->nKills, pItem->nDeaths);
TextRelative(pDC,x,texty,szText,true);
pDC->SetColor( color);
3. Find this:TextRelative(pDC,x,y, ZMsg(MSG_WORD_DEATH));
Comment it out (won't be needing it)
Replace with 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));
4. Find 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));
change the 5th number in the bracket to this:const float normalXPOS[6]
5. Find this inside of DrawScoreBoard:0.87f
Replace it with this:pItem->nKDP = (pItem->nKills <= 0) ? 0.0f : ((float)pItem->nKills / (float)(pItem->nKills + pItem->nDeaths) * 100.0f);
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.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
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
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 !!
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).