搜索
查看: 1664|回复: 0

版主帮我看看

[复制链接]
发表于 2004-8-24 02:27:34 | 显示全部楼层 |阅读模式 来自 中国–江苏–常州–钟楼区
我想每局开使或者结束的时侯服务器自动运行一个命令应该怎么写

#include <amxmodx>

new monthname[12] = {"amx_snow 9999", "amx_rain 9999", "amx_rain_hi_load 9999", "amx_tstorm 9999", "amx_fireworks1 300", "amx_fireworks2 300", "amx_fireworks3 300", "amx_fireworks4 300", "amx_fireworks5 300", "amx_fireworks 300", "amx_fireworks_lc", "amx_fireworks0 5"};

public plugin_init()
{
        register_plugin("1","v1.0","222")
        register_clcmd("sky","sky222",ADMIN_VOTE,"999")
        register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
        register_cvar("mp_slaylosers","1",FCVAR_SERVER)
        return PLUGIN_CONTINUE
}

public end_round(){
    if( get_cvar_num("mp_slaylosers") ){
        new parm[32]
        new len = read_data(2,parm,31)
        set_task(1.0,"sky222",0,parm, len + 1)
    }
        
}

public sky222() {
        server_cmd("amx_snow 0,amx_rain 0,amx_rain_hi_load 0,amx_tstorm 0,amx_fireworks1 0,amx_fireworks2 0,amx_fireworks3 0,amx_fireworks4 0,amx_fireworks5 0,amx_fireworks 0,amx_fireworks0 0,%s","monthname")
        return PLUGIN_CONTINUE
}

上面这个可以编辑放进服务器也可以运行--就是不自动执行命令

版主帮我看看撒 :55:
游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表