|
发表于 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;
} |
|