Results 1 to 4 of 4

Thread: ratios?

  1. #1

    ratios?

    Hello everyone,

    I am working on a new tag for my clan, and I have it all figure out minus one thing, what is the stat for win/loss ratio and kill/death ration? I went through all of the stats, and I cant find ratios, just raw stats.

    Also, how do I add text right beside a stat? For example, I have it auto pulling peoples names, but I want to automatically add our clan tags next to the name, and since I am having it "centered" it makes it hard to just place it there and hope it works. Here is what I am using.

    text({x:270,y:12,text: p.name,align:'center'});
    Last edited by Kocrachon; 2013-05-25 at 21:48.

  2. #2

    Re: ratios?

    I am trying this method, but no success.


    // Kill/Death
    var kdr = p.stats.global.kills && p.stats.global.deaths ? p.stats.global.kills / p.stats.global.deaths : 0;
    kdr = kdr.toFixed(2);

    //Kdr
    text({ x: 10, y: row3, align: 'right', text: kdr});
    text({ x: 10, y: row3, align: 'left', text: "K/D" });

  3. #3
    Administrator 1ApRiL's Avatar
    Join Date
    2011-02-12
    Location
    Waiblingen, Germany
    Posts
    1,517
    BFBC2 PC
    1ApRiL
    NFS World
    1APRIL
    BF2
    1ApRiL
    BF3 PC
    1ApRiL

    Re: ratios?

    If row3 is set, it looks right.
    Admin of bfhstats.com / bf4stats.com / bf3stats.com | Twitter

  4. #4

    Re: ratios?

    It reconizes kdr as a variable, but the spot it is suppose to be showing up in shows up blank. if i place actual text there it shows up.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
P-STATS NETWORK FORUM LOGIN CREATE ACCOUNT