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)
}
}