#Paper Posted November 5, 2010 Share Posted November 5, 2010 (edited) How i can make a point ranking whit this res? https://community.multitheftauto.com/index.php?p= ... ils&id=819 Edited November 5, 2010 by Guest Link to comment
Aibo Posted November 5, 2010 Share Posted November 5, 2010 maybe i'm stupid but i don't understand what you mean by "classific". Link to comment
#Paper Posted November 5, 2010 Author Share Posted November 5, 2010 maybe i'm stupid but i don't understand what you mean by "classific". oh sry fixxed... Link to comment
Aibo Posted November 5, 2010 Share Posted November 5, 2010 if you mean you want ranks according to points then you'll need something like this: function getPointRank(points) local rank = "No Rank" if points => 10000 then rank = "Super Mega Rank with 10000 or more points" elseif points => 2000 then rank = "Super Rank with 2000-9999 points" elseif points => 1000 then rank = "Rank with 1000-1999 points" elseif points => 500 then rank = "Second Rank with 500-999 points" elseif points => 0 then rank = "First Rank with 0-499 points" end return rank end you can can change/add the rank point limits, change the rank names obviously. and if you want like "top 10" calculation then it wont be that easy, cause this resource uses XML to store the data (which is stupid for this kind of data, better gowith SQL imo). Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now