Raised This Month: $51 Target: $400
 12% 

[ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SOBgaming
Senior Member
Join Date: Jul 2015
Old 01-25-2017 , 08:57   [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #1

Hey guys,

Would need a plugin that would enable/disable server2 (could be a simply setting/removing sv_password on server2 and setting hostname) based on server1's current player count. Need the skeleton of it could edit it afterwards.

Enable the server2 when the server1 is over x players.
Disable the server2 when the server1 is below y players if server2 is empty.

Best case scenario it would kill/start screens on Linux but that couldn't be done through sourcemod and wouldn't belong there neither, the above would work just fine.

Thanks!
__________________

Last edited by SOBgaming; 01-25-2017 at 09:04.
SOBgaming is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-26-2017 , 12:32   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #2

I could do that, but I believe that this request has nothing to do with sourcemod. Maybe you woukd like. Deamon. I could do that in Java.
__________________
Want to check my plugins ?
Arkarr is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-26-2017 , 12:39   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #3

Quote:
Originally Posted by SOBgaming View Post
Hey guys,

Would need a plugin that would enable/disable server2 (could be a simply setting/removing sv_password on server2 and setting hostname) based on server1's current player count. Need the skeleton of it could edit it afterwards.

Enable the server2 when the server1 is over x players.
Disable the server2 when the server1 is below y players if server2 is empty.

Best case scenario it would kill/start screens on Linux but that couldn't be done through sourcemod and wouldn't belong there neither, the above would work just fine.

Thanks!
Oo this seems fun I'll give it a shot. Linux? Java it is then
headline is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-26-2017 , 14:13   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #4

Quote:
Originally Posted by Headline View Post
Oo this seems fun I'll give it a shot. Linux? Java it is then
You will do it ? Cool ! Mind to share it then ? I would like to know how you would do it.
__________________
Want to check my plugins ?
Arkarr is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-26-2017 , 18:43   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #5

Quote:
Originally Posted by Arkarr View Post
You will do it ? Cool ! Mind to share it then ? I would like to know how you would do it.
Sure.
headline is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-27-2017 , 04:00   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #6

Have you read Why Java Sucks?
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-27-2017 , 04:26   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #7

Quote:
Originally Posted by arne1288 View Post
Have you read Why Java Sucks?
It just sounds like the guy who wrote that is an asshole to be honest. No language is prefect, but most of the stuff he's bringing up seems petty. Java is fine, especially for this project specifically. I wouldn't write off an entire language due to the opinion of one guys blog lol

EDIT: I might end up using C# w/ mono lol. Idk yet

Last edited by headline; 01-27-2017 at 04:36.
headline is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-27-2017 , 05:09   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #8

Quote:
Originally Posted by Headline View Post
Java is fine, especially for this project specifically.
For a very simple thing like this one, I see no reasons in starting out with the programming/scripting languages that gives most "overload".

Especially not when most Linux systems these days are pre-equipped with Perl (and sometimes Python).
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 01-27-2017 at 05:10.
DarkDeviL is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-27-2017 , 05:25   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #9

Quote:
Originally Posted by arne1288 View Post
...
Java is not perfect, that's a fact. But it is kinda easy to do things with it. Also, Java is actually too much usued to simply give up on it. Let them time to improve. But I agree that python or Perl would be a better choice, sadly I don't know those languages enough. Also, someone might not want to install python to run a simple script while they already have Java.

EDIT:
Also, anyone can link an article to bash any language. At the end, only binary or maybe Assembly is the best
Don't get me wrong, I'm not a Java fanboy, but still, no reason to deny that it does have advantages.
__________________
Want to check my plugins ?

Last edited by Arkarr; 01-27-2017 at 05:32.
Arkarr is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 01-27-2017 , 17:45   Re: [ANY/CS:GO] Enable/Disable Server2 based on Server1 playercount
Reply With Quote #10

There's a few that are available without having to reinvent the wheel.
https://github.com/xPaw/PHP-Source-Query
https://github.com/kurt-stolle/game-server-query
https://github.com/GameServerManager...ons/gsquery.py
https://github.com/Holiverh/python-valve
If it matters, they're all NOT java...
Maxximou5 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:01.


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