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

[ANY] Restart Empty Server (or Map)


Post New Thread Reply   
 
Thread Tools Display Modes
DabberDoug
Member
Join Date: Feb 2016
Location: USA
Old 04-06-2019 , 17:35   Re: [ANY] Restart empty server
Reply With Quote #11

Quote:
Originally Posted by Dragokas View Post
Is it really necessary and why? What game is it for? I'm unsure about how to catch that event.
Would be for CSGO, would just be used for a temp fix for something so if there isnt already a known fix no reason to spend the time to do it. ty tho
DabberDoug is offline
dyxL
Senior Member
Join Date: Jul 2010
Old 04-06-2019 , 17:51   Re: [ANY] Restart empty server
Reply With Quote #12

what is the maximum value of sm_restart_empty_delay
dyxL is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-07-2019 , 06:26   Re: [ANY] Restart empty server
Reply With Quote #13

It is not limited.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Scp106
Junior Member
Join Date: Jun 2014
Location: Russia, Moscow
Old 05-07-2019 , 14:26   Re: [ANY] Restart empty server
Reply With Quote #14

It works, but keeps spamming errors in logs.
Log Message


PHP Code:
public Action Event_player_disconnect(Event event, const char[] namebool dontBroadcast)
{
    if (!
g_ConVarEnable.BoolValue)
        return 
Plugin_Continue;
    
int client GetClientOfUserId(event.GetInt("userid"));
    if (!
IsFakeClient(client) && !RealPlayerExist(client)) {        //This line
        
g_ConVarHibernate.SetInt(0);
        
CreateTimer(g_ConVarDelay.FloatValueTimer_CheckPlayers);
    }
    return 
Plugin_Continue;

__________________

Last edited by Scp106; 05-07-2019 at 14:27.
Scp106 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-07-2019 , 15:22   Re: [ANY] Restart empty server
Reply With Quote #15

Download new version.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Scp106
Junior Member
Join Date: Jun 2014
Location: Russia, Moscow
Old 05-08-2019 , 15:21   Re: [ANY] Restart empty server
Reply With Quote #16

Quote:
Originally Posted by Dragokas View Post
Download new version.
Works fine! Thanks
Scp106 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-31-2020 , 12:38   Re: [ANY] Restart empty server
Reply With Quote #17

Updated.

Quote:
1.5
- Added change map method. New ConVar "sm_restart_empty_default_map" - Map name to change to when server become empty

1.6
- Added all plugins unload before restarting the server (for safe).

1.7
- Added ConVar: "sm_restart_empty_unload_ext_num". If you have Accelerator extension,
you need specify here order number of this extension in the list by executing "sm exts list" command, to prevent creating false crash log.
Plugin will automatically unload this extension before restarting the server.
- Log path location is changed to logs/restart.log
- no more auto-create "CRASH" folder (since it was a speficic of myarena.ru hosting only)
- All ConVars are cached.
- Some simplifications.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-03-2020 , 01:39   Re: [ANY] Restart empty server
Reply With Quote #18

Updated.

Quote:
1.8
- Default grace time ConVar is decreased down to 1 sec. to prevent misunderstanding of this feature by server administrators.
- Corrected identification of crash log from MyArena.ru server to clear it after server restart.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Lider99
Member
Join Date: Mar 2020
Old 05-14-2020 , 23:19   Re: [ANY] Restart empty server
Reply With Quote #19

Dragokas.

Hi,
you always manage to create great plugins.
Thank you for taking the time to make such a masterpiece)

Last edited by Lider99; 05-14-2020 at 23:21.
Lider99 is offline
Ja-Forces
Senior Member
Join Date: Jul 2009
Location: Leningrad
Old 07-11-2020 , 05:51   Re: [ANY] Restart empty server
Reply With Quote #20

Compiler 1.10 v. 6490

restart_empty.sp(119) : warning 204: symbol is assigned a value that is never used: "g_fCvarDelay"
restart_empty.sp(11 : warning 204: symbol is assigned a value that is never used: "g_iCvarMethod"
__________________
Ja-Forces 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 07:27.


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