Calmy2008,поставь этот плагин, он напишет на какой карте твой сервер завис :)
Код
#include <amxmodx>
#include <amxmisc>
#include <engine>
new cfile[128]
public plugin_init()
{
register_plugin("Reboot Map", "1.0", "Sho0ter")
get_datadir(cfile, charsmax(cfile))
add(cfile, charsmax(cfile), "/lastmap.dat")
if(file_exists(cfile))
{
if(file_size(cfile, 1) == 2)
{
new buffer[32], len
read_file(cfile, 0, buffer, charsmax(buffer), len)
set_task(5.0, "do_mapchange", _, buffer, 31)
log_to_file("reboot.log", "Server startup after crash. Map will be restore after 5 seconds..................................")
}
}
delete_file(cfile)
new cmap[32]
get_mapname(cmap, charsmax(cmap))
write_file(cfile, cmap)
set_task(10.0, "log_start")
return PLUGIN_CONTINUE
}
public plugin_end()
{
new cmap[32], line[72]
get_mapname(cmap, charsmax(cmap))
if(!file_exists(cfile))
{
write_file(cfile, cmap)
}
formatex(line, charsmax(line), "Map %s (%d) successfully ended", cmap, entity_count())
write_file(cfile, line)
log_to_file("reboot.log", line)
return PLUGIN_CONTINUE
}
public do_mapchange(const buffer[32])
{
log_to_file("reboot.log", "Restore map %s after crash...", buffer)
server_cmd("changelevel %s", buffer)
return PLUGIN_CONTINUE
}
public log_start()
{
new cmap[32], line[72]
get_mapname(cmap, charsmax(cmap))
formatex(line, charsmax(line), "Map %s (%d) successfully started", cmap, entity_count())
log_to_file("reboot.log", line)
}