how do i get "hands" stat to show up as "x.x k" in the hud?

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

how do i get "hands" stat to show up as "x.x k" in the hud?

Postby SaiYeN » Wed Aug 27, 2008 4:15 am

I want the HANDS stat to show up in the hud as "12.5k" instead of like "12535" for large numbers and if the number is less than 1000 just have it show up normally. Anyone know how to do that?

Thanks
SaiYeN
 
Posts: 34
Joined: Thu Jan 24, 2008 11:49 pm

Re: how do i get "hands" stat to show up as "x.x k" in the hud?

Postby js2002 » Wed Aug 27, 2008 7:46 am

Hi,

u can make ur own hand Stat that checks if the hands ar more than 1000 and then divide it /1000 and put a "k" behind it.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: how do i get "hands" stat to show up as "x.x k" in the hud?

Postby js2002 » Wed Aug 27, 2008 8:26 am

if(cnt_hands>1000,format(format_number((cnt_hands / 1000), 1,true , false),'k') ,cnt_hands)


dont forget to enter "1" into decimals where u add the stat to the HUD.

Damn, this version has a bug. If u hav 95 hands f.e. it shows 950.0 . Any ideas?
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: how do i get "hands" stat to show up as "x.x k" in the hud?

Postby js2002 » Wed Aug 27, 2008 9:10 am

I fixed it and will upload it into the repository.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 6 guests