Forum

> > CS2D > Scripts > [Request]Develop plmix command.
Forums overviewCS2D overview Scripts overviewLog in to reply

English [Request]Develop plmix command.

4 replies
To the start Previous 1 Next To the start

old [Request]Develop plmix command.

cs2d_is_a_Gem
User Off Offline

Quote
Hello dear video game forum.
I am trying to separate the players with the highest score by means of a command.
On standard servers, experienced teams of players usually meet to easily win the other team in all rounds.
By keeping more than 20 players on the server this is a problem as new players enter the losing team and a vicious circle is formed.

this code would be very useful for any public standard server and thus we help the steam players who are the ones who suffer and losing so many times they do not like the game very much.

> EJ:
Spoiler >




∗ Thanks in advance and remember that this will be useful. º.º

old Re: [Request]Develop plmix command.

Gaios
Reviewer Off Offline

Quote
Do you want to mix players in both teams as good 1:1 bad ratio? I mean, do you want to make teams with similar skill? How will you check out the players then? If new player joins, his score is 0-0.. unless you will store their scores (or the !rank does).

old Re: [Request]Develop plmix command.

Ajmin
User Off Offline

Quote
Find the mean of scores, And everyone who scored above that ....
that would work.

Btw. You wanna make all the goods in 1 team and the bads in other? or like make both the team fair by ensuring each team has equal proportion of goods and bads..?

old Re: [Request]Develop plmix command.

_Yank
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function shuffle(id)
	local sort
	local playlist = player(0, "team1")
	for _, current in ipairs(player(0, "team2")) do table.insert(playlist, current) end

	sort = function(a, b)
		local aScoreRatio = player(a, "score") / player(a, "deaths")
		local bScoreRatio = player(b, "score") / player(b, "deaths")
		return aScoreRatio < bScoreRatio
	end

	table.sort(playlist, sort)

	for modifier, current in ipairs(playlist) do if modifier % 2 == 0 then parse("maket "..current) else parse("makect "..current) end end

end

This is what I do on BASS. Maybe it's too simple but it kinda works on most occasions. It distributes players by their "score ratio". I haven't revised the code so, except it to not be the most effiecient approach.

old Re: [Request]Develop plmix command.

cs2d_is_a_Gem
User Off Offline

Quote
@user Gaios: Good point, but I'm not looking to create and store a score database.

@user Ajmin: that gets too far away from the script I'm looking for.

@user _Yank: your code is very similar to what I'm looking for, I just want to distribute the best scores of the players that are playing at that moment in the 2 teams (there is no need for a database).

thank you very much guys for your help and your advice, I'm just looking for a simple code that separates the best scores into 2 Teams without using save / load.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview