搜索
查看: 2522|回复: 3

求一个到一定局数自动刷新的插件

[复制链接]
发表于 2016-2-29 11:42:47 | 显示全部楼层 |阅读模式 来自 山东
求一个到一定局数自动刷新的插件      可以自己设定多少局刷新    有源码最好啦
发表于 2016-2-29 22:05:47 | 显示全部楼层 来自 广西桂林
#include <amxmodx>
#include <amxmisc>

new gpMaxRound;
new gScoreT = 0;
new gScoreCT = 0;

public plugin_init()
{
        register_plugin("Auto Restart Round", "1.0", "Rulzy");
       
        register_event("TeamScore", "eTeamScore", "a");
       
        gpMaxRound = register_cvar("amx_maxround", "15");
}

public eTeamScore()
{
        new score = read_data(2);
        new TeamName[20];
        read_data(1, TeamName, 19);
        if( equali(TeamName, "TERRORIST") )
                gScoreT = score;
        else if( equali(TeamName, "CT") )
                gScoreCT = score;
        else
                return PLUGIN_CONTINUE;
        new maxRound = get_pcvar_num(gpMaxRound);
        if (gScoreT+gScoreCT >= maxRound)
                server_cmd("sv_restart 1");
        return PLUGIN_CONTINUE;
}
回复

使用道具 举报

发表于 2017-1-22 00:05:02 | 显示全部楼层 来自 广东深圳
#include <amxmodx>
#include <amxmisc>

//new ct_score, te_score;

public plugin_init()
{
        register_plugin("score_show", "1.0", "KWf")

        register_event("TeamScore", "save_score", "a")
}

public save_score(id)
{
        new score = read_data(2);        // 获取事件分数
        new teamName[29];                        // 储存队伍名称的字符容器
        read_data(1, teamName, 28); // 获取事件参数1(队伍名)

        server_print("(%s)队伍获得分数(%d)", teamName, score);
}
回复

使用道具 举报

发表于 2017-1-23 09:47:21 | 显示全部楼层 来自 湖北
支持!顶!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

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