AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ranking algorithm (https://forums.alliedmods.net/showthread.php?t=143888)

-=hunter=- 11-26-2010 10:14

Ranking algorithm
 
Hello. I want to do plugin but I had a problem.
Plugin able to calculate the points for players but I dont know best way to associate its with the rank of player. The plugin itself sets(increases and decreases) points for players depending on the situation
In example, first 100 players has 1 point and other 200 players has 2-4 points and other 2000 players has 5-1000 points.
New player get 5 points and how better to recount the ranks of players in this situation?

Maybe there is a module for this?

Exolent[jNr] 11-26-2010 15:29

Re: Ranking algorithm
 
I don't understand what these points are for.
Do you want points to be ranked closer to #1 or want less points?

-=hunter=- 11-26-2010 20:06

Re: Ranking algorithm
 
Example:
PHP Code:

Rank     Player          Points

1        Player1         1000
2        Player2         950
....
1000     Player1000      4
1001     Player1001      4
....
1400     Player1400      1
1401     Player1401      1
1402     Player1402      1
1403     Player1403      1 

I think for best perfomance I'm need to write module like csx

-=hunter=- 11-26-2010 22:02

Re: Ranking algorithm
 
I have similar understood how to make the best way.
After map loading must have ordered array with scores (index of this array = rank).
If player gets points and difference with previous rank more than certain number (in example, 10) then in new array need to set [0][0] = new rank [0][1] = previous rank and if need to calculate rank then it will be necessary to address to this new array.
If difference with previous rank less than certain number then will make usual shift.

I badly know English therefore it is difficult to explain


All times are GMT -4. The time now is 11:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.