跪求<每局自动换队伍换边>的插件
是整队换边~~找了很久,不记得在那里看到过~~我希望不管哪边赢都自动换队伍,是整队换.
每局换一次
回复: 跪求<每局自动换队伍换边>的插件
#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 == 1) {
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, "0", 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
}
找到这个代码,自己修改了一下没有用,希望高人帮忙,修改一下~~~
这个只有T赢才换,CT赢了不换,而且只能换能换两次.
回复: 跪求<每局自动换队伍换边>的插件
本帖最后由 sakulekingz 于 2009-1-5 12:13 编辑#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new a_score = 0
new b_score = 0
public plugin_init() {
register_plugin("50 Rounds Swap Restart", "1.0", "Codetrinis")
register_event("TeamScore", "score_new", "a")
}
public restart(time[]) {
set_cvar_string("sv_restart", time)
}
public score_new() {
new playersCT
new playersT
new nbrCT,nbrT
new team
new totalScore = a_score + b_score
read_data(1, team, 31)
if(team == 'C') {
a_score = read_data(2)
}
else{
if(team == 'T')
{
b_score = read_data(2)
}
}
get_players(playersCT,nbrCT,"e","CT")
get_players(playersT,nbrT,"e","TERRORIST")
if(totalScore == 1){
for(new i = 0; i < nbrCT; i++) {
cs_set_user_team(playersCT, 1)
}
for(new i = 0; i < nbrT; i++) {
cs_set_user_team(playersT, 2)
}
}
}
回复: 跪求<每局自动换队伍换边>的插件
不知道你测试过不~~晚上测试一下~~~ 可以用吗?? 每局换?为什么? 没有直接的插件吗 代码不太懂哟 是否能改下!比如自定义局数20局自动换边、 是有插件只不过需要输入命令才能正队换!就是在打的激烈的时候输入命令CT也会变成T汗!
页:
[1]