查看: 4447|回复: 30

[源码]服务器维护提示插件

[复制链接]
发表于 2013-2-19 11:30:39 | 显示全部楼层 |阅读模式
public plugin_init() {
        register_plugin("关闭服务器", "1.1", "Remo Williams")
        register_concmd("amx_exit","servershutdown",ADMIN_IMMUNITY," - 服务器10秒退出提示")
}


public servershutdown(id) {
        if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {
                console_print(id,"[注意] 你没有足够的权限使用该命令.")
                return PLUGIN_HANDLED
        }
        set_task(0.0,"alert")
        set_task(3.0,"ten")
        set_task(4.0,"nine")
        set_task(5.0,"eight")
        set_task(6.0,"seven")
        set_task(7.0,"six")
        set_task(8.0,"five")
        set_task(9.0,"four")
        set_task(10.0,"three")
        set_task(11.0,"two")
        set_task(12.0,"one")
        set_task(13.0,"zero")
        set_task(17.0,"exit_server")

        return PLUGIN_HANDLED
}

public alert() {
        client_print(0,print_chat,"***** 注意! 服务器临时维护!请大家稍候登陆! *****")
        server_print("***** ALERT! SERVER RESTART!*****")
        client_cmd(0,"spk ^"fvox/warning.wav^"")
}

public ten() {
        client_print(0,print_chat,"服务器将在 10 秒后关闭....")
        server_print("Server Shutdown in 10....")
        client_cmd(0,"spk ^"fvox/ten.wav^"")
}

public nine() {
        client_print(0,print_chat,"服务器将在 9 秒后关闭....")
        server_print("Server Shutdown in 9....")
        client_cmd(0,"spk ^"fvox/nine.wav^"")
}

public eight() {
        client_print(0,print_chat,"服务器将在 8 秒后关闭....")
        server_print("Server Shutdown in 8....")

        client_cmd(0,"spk ^"fvox/eight.wav^"")
}

public seven() {
        client_print(0,print_chat,"服务器将在 7 秒后关闭....")
        server_print("Server Shutdown in 7....")

        client_cmd(0,"spk ^"fvox/seven.wav^"")
}

public six() {
        client_print(0,print_chat,"服务器将在 6 秒后关闭....")
        server_print("Server Shutdown in 6....")

        client_cmd(0,"spk ^"fvox/six.wav^"")
}

public five() {
        client_print(0,print_chat,"服务器将在 5 秒后关闭....")
        server_print("Server Shutdown in 5....")

        client_cmd(0,"spk ^"fvox/five.wav^"")
}

public four() {
        client_print(0,print_chat,"服务器将在 4 秒后关闭....")
        server_print("Server Shutdown in 4....")

        client_cmd(0,"spk ^"fvox/four.wav^"")
}

public three() {
        client_print(0,print_chat,"服务器将在 3 秒后关闭....")
        server_print("Server Shutdown in 3....")

        client_cmd(0,"spk ^"fvox/three.wav^"")
}

public two() {
        client_print(0,print_chat,"服务器将在 2 秒后关闭....")
        server_print("Server Shutdown in 2....")

        client_cmd(0,"spk ^"fvox/two.wav^"")
}

public one() {
        client_print(0,print_chat,"服务器将在 1 秒后关闭....")
        server_print("Server Shutdown in 1....")

        client_cmd(0,"spk ^"fvox/one.wav^"")
}

public zero() {
        client_print(0,print_chat,"服务器关闭 请大家稍候....")
        server_print("Server Shutting Down!")

        client_cmd(0,"spk ^"fvox/safe_day.wav^"")
}

服务器维护提示插件.rar

4.96 KB, 下载次数: 20

售价: 2 金钱  [记录]

发表于 2013-2-21 03:11:24 | 显示全部楼层
真好。。。。。。。。。  
发表于 2013-2-22 17:18:24 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2013-3-5 14:57:20 | 显示全部楼层
不错!  
发表于 2013-9-29 20:28:46 | 显示全部楼层
正有需要!!
发表于 2013-10-1 03:33:51 | 显示全部楼层
顶一下              
发表于 2014-9-29 18:02:36 | 显示全部楼层
有空一起交流一下  
发表于 2014-10-11 09:44:13 | 显示全部楼层
看完了这么强的文章,我想说点什么,但是又不知道说什么好,想来想去只想  
发表于 2014-10-13 09:21:39 | 显示全部楼层
哈哈 瞧你说的~~~  
发表于 2015-2-13 18:13:46 | 显示全部楼层
我帮你 喝喝  
您需要登录后才可以回帖 登录 | 中文注册

本版积分规则