心静如水 发表于 2008-8-9 12:38:29

请教个命令问题.......(请版主再进来一次)

让服务器转换玩家做T是这样的吗:
engclient_cmd(id,"jointeam","1")

zwfgdlc 发表于 2008-8-9 15:27:51

回复: 请教个命令问题.......


engclient_cmd(id,"jointeam","1")
engclient_cmd(id, "joinclass", "1")

Rulzy 发表于 2008-8-9 16:04:12

回复: 请教个命令问题.......

这得在没有开启自动平衡,并且此队伍还未达到最大人数时才有效

心静如水 发表于 2008-8-9 19:54:13

回复: 请教个命令问题.......

public plugin_init() {
register_plugin("Pingjun","1.1","JOHN")
register_logevent("endRound", 2, "1=Round_End");
return PLUGIN_CONTINUE
}
public endRound(){
new Tnum=0,CTnum=0
new players,num
get_players( players, num)
for (new i = 0; i < num; i++){
new team=get_user_team(i)
if(team==1)
++Tnum
else
++CTnum

if(Tnum-CTnum>=2){
if((get_user_frags(i)>5)&& (get_user_frags(i)/get_user_deaths(i)>=1.3)&& (get_user_team(i)==1)){
new player = i
engclient_cmd(player,"jointeam","2");
engclient_cmd(player, "joinclass", "2");
}
return PLUGIN_HANDLED
}
if(CTnum-Tnum>=2){
if((get_user_frags(i)>5)&& (get_user_frags(i)/get_user_deaths(i)>=1.3)&& (get_user_team(i)==2)){
new player = i
engclient_cmd(player,"jointeam","1");
engclient_cmd(player, "joinclass", "1");
}
return PLUGIN_HANDLED
}
}
return PLUGIN_HANDLED
}

自动平衡时出现选队伍的菜单,请问两位版主如何去掉这个菜单显示呢?
或纠正一下.....谢谢....

Rulzy 发表于 2008-8-9 21:55:21

回复: 请教个命令问题.......(请版主再进来一次)

自动平衡,直接使用cs_set_user_team函数就可以了。

Syntax
cs_set_user_team ( index, CsTeams:team, [ CsInternalModel: model = CS_DONTCHANGE ] )

Team values are CS_TEAM_T, CS_TEAM_CT, or CS_TEAM_SPECTATOR.

You can optionally set a model:
CS_DONTCHANGE
CS_CT_URBAN
CS_T_TERROR
CS_T_LEET
CS_T_ARCTIC
CS_CT_GSG9
CS_CT_GIGN
CS_CT_SAS
CS_T_GUERILLA
CS_CT_VIP

nclsadidas 发表于 2008-8-14 13:38:30

回复: 请教个命令问题.......(请版主再进来一次)

有一个问题想问:
public endRound(){
new Tnum=0,CTnum=0
new players,num
get_players( players, num)
for (new i = 0; i < num; i++){
new team=get_user_team(i)
if(team==1)
++Tnum
else
++CTnum

这里get_user_team(i)参数需要一个玩家的index. 而index是从1-32.你的i是从0开始.这样的话.不会有问题吗?

心静如水 发表于 2008-8-14 18:33:48

回复: 请教个命令问题.......(请版主再进来一次)

这是小问题...............
俺其实是想如何做一个实力平衡插件:

每隔三局就把在此地图上地图时间里得分在前六名者(不是指累计排名)均衡到双方队伍.............

论坛里以前有的功能太繁杂了.....
很多人并不用....
页: [1]
查看完整版本: 请教个命令问题.......(请版主再进来一次)