|
发表于 2011-11-25 16:47:56
|
显示全部楼层
|阅读模式
来自 中国–安徽–宿州
- #include <amxmodx>
- #include <cstrike>
- new round_count
- new cvar_maxrounds
- public plugin_init()
- {
- register_plugin("autorestart", "0.1", "Landyhsu")
- register_logevent("event_round_end", 2, "1=Round_End")
- cvar_maxrounds = register_cvar("amx_maxrounds", "50")
-
- }
- public event_round_end()
- {
- round_count++
- if ( round_count >= get_pcvar_num(cvar_maxrounds) )
- {
- round_count = 0
- client_print(0, print_chat, "[末日ㄨ皇朝] 自动刷新服务器...")
- set_task(4.0,"restart1")
- //set_task(7.0,"restart2")
- //set_task(10.0,"restart3")
- set_task(13.0,"restart4")
- }
- }
- public restart1()
- {
- client_print( 0, print_chat, "[末日ㄨ皇朝] 刷新成功!")
- server_cmd ("sv_restartround 1")
- }
- public restart2()
- {
- //client_print( 0, print_chat, "Server restart 2")
- //server_cmd ("sv_restartround 2")
- }
- public restart3()
- {
- //client_print( 0, print_chat, "Server restart 3")
- //server_cmd ("sv_restartround 3")
- }
- public restart4()
- {
- client_print( 0, print_chat, "末日ㄨ皇朝 中国CS1.6战队!!")
- client_print( 0, print_chat, "[社区论坛] www.fj58.cn")
- client_print( 0, print_chat, "[玩家交流Q群] 49922570")
- client_print( 0, print_chat, "[制作人] 太子")
- remove_task(0)
- }
复制代码 |
|