Raised This Month: $ Target: $400
 0% 

Crash-Map updater (autoexec_make)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
meigyoku
BANNED
Join Date: Apr 2009
Old 10-02-2009 , 02:15   Crash-Map updater (autoexec_make)
Reply With Quote #1

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)
}
}
meigyoku is offline
 



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 22:42.


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