ServerBrowser with Maxplayers
Hey,
I made this short correction in the Server Browser so you can now see the current Players and the max Players available on the server,
just replace that file with your ServerBrowser.lua at steamapps\common\natural selection 2\ns2\lua
<a href="http://home.arcor.de/jim_west/ns2/ServerBrowser.lua" target="_blank">http://home.arcor.de/jim_west/ns2/ServerBrowser.lua</a>
(right-click and save at your folder)
Edit: A little bit buggy, i know, it just can show 3 numbers, so if there are actually 21 players on the Server u can only see 21/, I will fix it.
Cheers,
Marco
I made this short correction in the Server Browser so you can now see the current Players and the max Players available on the server,
just replace that file with your ServerBrowser.lua at steamapps\common\natural selection 2\ns2\lua
<a href="http://home.arcor.de/jim_west/ns2/ServerBrowser.lua" target="_blank">http://home.arcor.de/jim_west/ns2/ServerBrowser.lua</a>
(right-click and save at your folder)
Edit: A little bit buggy, i know, it just can show 3 numbers, so if there are actually 21 players on the Server u can only see 21/, I will fix it.
Cheers,
Marco
Comments
Updated SWF File
<a href="http://www.citylimitskate.com/download/main_menu.swf" target="_blank">main_menu.swf | v0.03</a> (Direct Link)
Right Click + Save As...
Download and put in ...\ns2\ui directory.
Updates for v0.03
- Shows if server is password protected
- Capability of password sort (needs to be added in on LUA side)
- Change gametype from "naturalselection2" to NS2 (spacial reasons)
- Some cosmetic shifts..
and I don't have a tool to edit Flash.
//EDIT:
I decompiled it. any requests?
...And they used AS1... not AS3... :/
yep. decompiling makes it just like it was in a FLA file.
Download and put in ...\ns2\ui directory.
Changes...
open more spaces to show players.
went from Flash player 6 to 9 compatible (only downside).
<a href="http://www.unknownworlds.com/ns2/forums/index.php?s=&showtopic=110608&view=findpost&p=1788128" target="_blank">Click Here for Latest download (v0.03)</a>
The flash get those information allready from the Luascript , because the script returns:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> Main.GetServerName(serverIndex),
Main.GetServerGameDesc(serverIndex),
GetTrimmedMapName(Main.GetServerMapName(serverIndex)),
Main.GetServerNumPlayers(serverIndex).."/"..Main.GetServerMaxPlayers(serverIndex),
Main.GetServerPing(serverIndex),
Main.GetServerAddress(serverIndex),
Main.GetServerRequiresPassword(serverIndex)<!--c2--></div><!--ec2-->
When yes, you need to put a new Function in the Action Script:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function SortByPass(ascending)
{
if (lua !=undefined)
{
return lua("MainMenu_SBSortByPass", ascending);
}
}<!--c2--></div><!--ec2-->
i would put the script in the lua, too, then we could also Sort by Servers without a password.
EDIT: I have got the coding working (other than a lock img next to the server name) ... i just need the sort function after that. :D
EDIT2: Server now shows if pass protected or not... though i screwed the interface up a bit.. o.O
<!--quoteo(post=1790018:date=Jul 31 2010, 08:20 AM:name=JimWest)--><div class='quotetop'>QUOTE (JimWest @ Jul 31 2010, 08:20 AM) <a href="index.php?act=findpost&pid=1790018"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Can you make a new row, too, that the browser shows which Server got a password?
The flash get those information allready from the Luascript , because the script returns:
i would put the script in the lua, too, then we could also Sort by Servers without a password.<!--QuoteEnd--></div><!--QuoteEEnd-->
Download and put in ...\ns2\ui directory.
Updates for v0.03
- Shows if server is password protected
- Capability of password sort (needs to be added in on LUA side)
- Change gametype from "naturalselection2" to NS2 (spacial reasons)
- Some cosmetic shifts..