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

[L4D2]A plugin that prevents empty server running 3rd party map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
Old 06-05-2018 , 13:21   [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #1

A lot dedicated servers have this problem:
The server no longer has player but it is still running a 3rd party map, this prevents people without the specific 3rd party map from joining the server.

This plugin checks the map name and number of online player, if the above condition keeps for more than 5x12 seconds, then change the map to default official map(c1m1_hotel).

checking intervals and default official map are hard coded, modifications are only possible by modifying the source and recompiling it.

Source code and smx file are available.

Possible improvements:
Check the map and number of players when a player leaves the server?
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_watchdog.sp - 543 views - 1.7 KB)

Last edited by rikka0w0; 06-10-2018 at 07:39.
rikka0w0 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-05-2018 , 13:43   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #2

Terrible plugin and it's not allowed to post .smx files, change the .txt file into .sp with winrar or just change the name and it will automatically compile.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 06-05-2018 , 17:53   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #3

I'll test this, that's a good idea.

I used one that changed to map a specific regular map when the server was empty.

But this changes only when it is in custom map, it looks good to me.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 06-05-2018 , 18:05   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #4

Works very well, thanks.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
Old 07-06-2018 , 14:28   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #5

I made another plugin, Improved Automatic Campaign Switcher, which offers a similar function but more flexible.
__________________
rikka0w0 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 07-07-2018 , 15:04   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #6

You should just use onclientdisconnect_post, and a non-repetitive timer of x seconds before changing back to c1m1_hotel.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
Old 07-15-2018 , 11:53   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #7

Quote:
Originally Posted by eyal282 View Post
You should just use onclientdisconnect_post, and a non-repetitive timer of x seconds before changing back to c1m1_hotel.
Thanks

I have fixed this problem in Improved ACS, the detection now uses onclientdisconnect()
https://forums.alliedmods.net/showthread.php?t=308708

And this feature can be turned off by setting a ConVar
__________________
rikka0w0 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 07-17-2018 , 04:00   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #8

Why have i not done this? :O

Gj on making this
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Neon123
Senior Member
Join Date: Jan 2016
Old 06-17-2021 , 09:35   Re: [L4D2]A plugin that prevents empty server running 3rd party map
Reply With Quote #9

i tried to use the plugin but its not working
Neon123 is offline
Reply


Thread Tools
Display Modes

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 13:12.


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