AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Crash-Map updater (autoexec_make) (https://forums.alliedmods.net/showthread.php?t=105179)

meigyoku 10-02-2009 02:15

Crash-Map updater (autoexec_make)
 
My server often crashes in change map. I found old script. I do not understand about it. Can this script can help my server
============================================= ============
Name : Crash-Map updater (autoexec_make)
Author : Manip
Forums : http://djeyl.net/forum/index.php?showtopic=21480

This plugin changes the map in autoexec.cfg so when the server crashes it will
re-load on the map it was on before the crash. The maxplayers valve is read
from the current game so if you manually re-write a autoexec.cfg to a new
maxplayers it will then be read and used in all autoexec's after that.

Code:

#include <amxmod>
#include <amxmisc>
public plugin_init() {
register_plugin("AutoExec Make","0.1","Manip")
new execf[32]="autoexec.cfg"
if (file_exists(execf))
    delete_file(execf)
if (!(file_exists(execf))) {
new maxP = get_maxplayers()
new maxPs[32] = ""
numtostr(maxP, maxPs, 32)
new maxT[32] = "maxplayers "
add(maxT,31,maxPs)
new mapname[128]
get_mapname( mapname, 127 )
new maps[128] = "map "
add(maps,127,mapname)
write_file(execf,"fullserverinfo^r^n", 0)
write_file(execf,"log on^r^n", 1)
write_file(execf, maxT, 2)
write_file(execf, "^r^n", 3)
write_file(execf, maps, 4)
write_file(execf, "^r^n", 5)
}
}


Sylwester 10-02-2009 04:51

Re: Crash-Map updater (autoexec_make)
 
I doubt that this script will help you.
Quote:

My server often crashes in change map.
Servers usually don't crash like that without any reason, so instead of trying to find plugin that may or may not reduce crash rate by 0.00001% , why don't you try find the thing that causes crash and fix it.

If you are running steam only server then it's probably because of some plugin. In this case, if you can not find solution by yourself (using search, google...), then you should ask for help by posting in proper section providing list of plugins, crash logs etc.

If you are running nosteam, steam+nosteam, 47/48 or whatever, then don't even think about asking for help here.


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

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