The server I'm making this plugin for, contains only steamed players.
So I've a rating system with
5 stars,
Quote:
1. #####_[5/5]
2. ####__[4/5]
3. ###___[3/5]
4. ##____[2/5]
5. #_____[1/5]
6. ______[0/5]
|
I've every star vote count, like
Quote:
5stars - 25votes
4stars - 10votes
3stars - 40votes
2stars - 38 votes
1star - 51 votes
0stars - 19 votes
|
total = 183 votes.
I would like to show the rating in percents,
Code:
5stars = 25/183*100;
4stars = 10/183*100;
Quote:
1. 5stars ( 13.6% )
2. 4stars ( 5.4% )
|
PHP Code:
formatex(5stars, 192, "##### ( %1.f%% )", i5 / iVoteCount * 100.0)
I'm doing it like this but percent value is always 0. I don't know why.