Jump to content

Remove players from webmap?


Gamida

Recommended Posts

Thanks stompy. Am not owner and don't know if he would want all the players stats reset or not. Thought there might have been a way to just remove certain players. Out of curiosity do you know why this happens? I have seen it before with one or two people but never this many. Am guessing more people are hearing of the server and trying it out.

Link to comment
Share on other sites

Thanks stompy. Am not owner and don't know if he would want all the players stats reset or not. Thought there might have been a way to just remove certain players. Out of curiosity do you know why this happens? I have seen it before with one or two people but never this many. Am guessing more people are hearing of the server and trying it out.

 

in allocs mod it makes an entry for every player that ever joins the server. There's no way to delete them individually via allocs mod, so wiping the file is the only way to reset it unless you make a reader/writer script to filter the data

Link to comment
Share on other sites

Too bad that it doesn't make it so that by default it wouldn't show stuff, that has position 0,0,0 and time played 0, that would pretty much do the trick.

 

Its javascipt that fills the table. Bit busy with work now but ill post a adjusted javascript for the players to filter out all players with totalplaytime < 1 minute

 

Cheers

Link to comment
Share on other sites

[ATTACH]24098[/ATTACH]

 

remove .txt extension and put in /Mods/Allocs_WebAndMapRendering/webserver/js (replace after backing up players.js)

 

didnt look at adjusting the pager class so for quick solution i made default rows visible = 200

 

You can adjust the totalplaytime filter by changing the bold value below (its in seconds, so to filter out all players that played less than 5 minutes, put 300 in there):

 

ajaxProcessing: function(data){
		var rows = [];
		var skipped = 0;
		for (var i=0; i < data.players.length; i++) {
			if(data.players[i]["totalplaytime"] > [b]60[/b])
			{
				var row = [];
				for (var c = 0; c < columns.length; c++) {

					var col = columns[c];
					var val = data.players[i][col[0]];
					if (col.length > 2 && col[2] != null) {
						val = col[2] (val);
					}
					row.push (val);

				}
				rows.push (row);
			}
			else {skipped++}
		}

		return {
			"total": (data.total - skipped),
			"headers": headers,
			"rows": rows
		};
	},

 

Cheers

 

-edit- or if you dont mind doing it with every new session of the playertab and dont want tamper with the .js code, you can simply fill the filterbox of the "Total Playtime" column with the statement "> numberOfSecondsPlayed" ( "> 60" or "> 300" for example) it will achieve the same thing. No need to replace the players.js for that.

 

filterplaytime.jpg.aa54fb4e00e3c44d5876c6ca95478b4c.jpg

players.js.txt

Link to comment
Share on other sites

Thanks. Will pass this post onto the proper authority :)

 

Filling the filterbox you can do as a "normal user" :)

It will stay there until you hit the browser refresh button and you can still sort on all columns and/or put extra filters in other colums filterboxes.

 

Cheers

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...