pxhome 发表于 2008-12-15 21:41:38

跪求<每局自动换队伍换边>的插件

是整队换边~~找了很久,不记得在那里看到过~~
我希望不管哪边赢都自动换队伍,是整队换.
每局换一次

pxhome 发表于 2008-12-16 03:50:36

回复: 跪求<每局自动换队伍换边>的插件

#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 发表于 2008-12-16 13:13:07

回复: 跪求&lt;每局自动换队伍换边&gt;的插件

本帖最后由 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)
}
}
}

pxhome 发表于 2008-12-17 18:39:42

回复: 跪求&lt;每局自动换队伍换边&gt;的插件

不知道你测试过不~~
晚上测试一下~~~

kclee 发表于 2009-6-15 21:18:46

可以用吗??

blueskyts 发表于 2010-5-22 13:38:59

每局换?为什么?

唐僧 发表于 2010-6-23 13:20:59

没有直接的插件吗 代码不太懂哟

wenwen 发表于 2010-6-23 14:01:52

是否能改下!比如自定义局数20局自动换边、

wenwen 发表于 2010-6-23 14:04:31

是有插件只不过需要输入命令才能正队换!就是在打的激烈的时候输入命令CT也会变成T汗!
页: [1]
查看完整版本: 跪求&lt;每局自动换队伍换边&gt;的插件