回复: 插件高手请进!关于自动换边插件!
Post by 冰河有个每局结束后自动随机换队伍的插件,不过我忘记了名字叫什么。
是 randomteams.amxx 吧
回复: 插件高手请进!关于自动换边插件!
同意楼上的意见,根据时间确定上下半场。高手快来!回复: 插件高手请进!关于自动换边插件!
个人觉得按局数来的好,因为一局多长时间也不确定,有时正在游戏中它就换图,相当郁闷的。回复: 插件高手请进!关于自动换边插件!
在别处找来一个源代码,但不是很完善,哪位高手能修改一下:#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new a_score = 0
new b_score = 0
public restart(time[]) {
set_cvar_string("sv_restart", time)
return PLUGIN_CONTINUE
}
public score_new() {
new team
read_data(1, team, 31)
if(team == 'C') {
a_score = read_data(2)
} else if(team == 'T') {
b_score = read_data(2)
}
new totalScore = a_score + b_score
if(totalScore == 50) {
new playersCT
new playersT
new nbrCT, nbrT
get_players(playersCT,nbrCT,"e","CT")
get_players(playersT,nbrT,"e","TERRORIST")
for(new i = 0; i < nbrCT; i++) {
cs_set_user_team(playersCT, CS_TEAM_T)
}
for(new i = 0; i < nbrT; i++) {
cs_set_user_team(playersT, CS_TEAM_CT)
}
set_task(5.0, "restart", 0, "1", 1)
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("50 Rounds Swap Restart", "1.0", "Codetrinis")
register_event("TeamScore", "score_new", "a")
return PLUGIN_CONTINUE
}
回复: 插件高手请进!关于自动换边插件!
用这个吧,真正解决问题的方案http://www.dt-club.net/forum/thread/71/31496.htm?highlight=%E5%B9%B3%E8%A1%A1
回复: 插件高手请进!关于自动换边插件!
14楼说的插件用过,太繁琐,而且每次都要判定平衡,很费系统资源,也不支持22人以上设置!回复: 插件高手请进!关于自动换边插件!
高手快来!急切盼望!回复: 插件高手请进!关于自动换边插件!
那就用这个试试:[分享]实现公众服务器的自动换边!
http://www.dt-club.net/forum/thread/71/11098.htm