AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ H3LP ] Server Stop/Crash (https://forums.alliedmods.net/showthread.php?t=299429)

DarthMan 07-14-2017 08:18

[ H3LP ] Server Stop/Crash
 
Hello. Is there any way to use amxx to pre-check server stop/crash (before server is stopped or crashes) ? I need that because I want to use nvault on my new plug-in and I want to open it on plugin init and close on plugin end or server stop / crash, because if the server would stop or crash the vault would not be closed, resulting in an error. Thanks !

heroicpower7613 07-14-2017 08:49

Re: [ H3LP ] Server Stop/Crash
 
so you basically want to close the vault before crash?
im pretty sure plugin_end gets called on crash/stop

anyway if the server is crashing why not ask help for it and fix it? i thought that was your problem as i read the post title

DarthMan 07-14-2017 09:28

Re: [ H3LP ] Server Stop/Crash
 
Quote:

Originally Posted by heroicpower7613 (Post 2535259)
so you basically want to close the vault before crash?
im pretty sure plugin_end gets called on crash/stop

anyway if the server is crashing why not ask help for it and fix it? i thought that was your problem as i read the post title

Well, the thing is, I wrote an un-precacher plug-in that reads from ini containing the mapname, and it's executed only on the maps that have many resources. The thing is, the server could sometimes crash because of the un-precacher plug-in that I had to make so that custom weapon models and stuff can be loaded without reaching the 512 limit. Some maps have exactly 512 resources, so precaching just a single resource could crash the server, and it can also crash without even precaching anything because there are some client stuff resources that could precache when u join and the precache limit would be increased. This happens mostly on some CS/TFC maps. I mostly know what kind of stuff a map doesn't require to un-precache, but sometimes on map change for example, that stuff will no longer be precached even if the plugin is not running, because it was once blocked from being precached. So then the server would simply crash.

DarthMan 07-14-2017 13:27

Re: [ H3LP ] Server Stop/Crash
 
Quote:

Originally Posted by heroicpower7613 (Post 2535259)
so you basically want to close the vault before crash?
im pretty sure plugin_end gets called on crash/stop

anyway if the server is crashing why not ask help for it and fix it? i thought that was your problem as i read the post title

plugin_end doesn't get called on server stop/crash, only if using the quit command.

eyal282 07-15-2017 10:35

Re: [ H3LP ] Server Stop/Crash
 
Open it when you need it immediately and close it in the end of the function.

heroicpower7613 07-15-2017 11:13

Re: [ H3LP ] Server Stop/Crash
 
Quote:

Originally Posted by DarthMan (Post 2535314)
plugin_end doesn't get called on server stop/crash, only if using the quit command.

it doesn't give any error either.
your error is from something else.

DarthMan 07-15-2017 12:48

Re: [ H3LP ] Server Stop/Crash
 
Quote:

Originally Posted by heroicpower7613 (Post 2535516)
it doesn't give any error either.
your error is from something else.

It turns out that it works fine if I do quit, the issue inky happens if I press the x button. If I close it by quit command it works fine.


All times are GMT -4. The time now is 22:52.

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