求:自動換隊插件
求:自動換隊插件各位:誰有中途全隊掉換插件!
謝謝! 我有....... 2# meiyouyong
給我好嗎? 本帖最后由 sakulekingz 于 2009-11-18 02:44 编辑
自己写的。。。还没测试。。楼主需要的话可以先测试再使用
cvar:mp_autoscore <1-N> 为双方比分达到多少后自动更换队伍 #include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Auto Swap Teams"
#define VERSION "1.0"
#define AUTHOR "dt.Sakulekingz (KIN)"
#define LOADING "^n^t%s v%s, Copyright (C) 2009 by %s^n"
new score;
new mp_autoscore;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
server_print(LOADING,PLUGIN,VERSION,AUTHOR);
register_event("TeamScore", "team_score", "a");
register_logevent("show_the_score", 2, "0=World triggered", "1=Round_Draw", "1=Round_End");
mp_autoscore = register_cvar("mp_autoscore", "15");
}
public team_score()
{
new team;
read_data(1,team,31);
if (equal(team,"CT"))
{
score = read_data(2);
}
else if (equal(team,"TERRORIST"))
{
score = read_data(2);
}
}
public show_the_score()
{
if(get_pcvar_num(mp_autoscore) == score+score)
{
static player;
for(player = 1; player <= get_maxplayers(); player++)
{
switch(get_user_team(player))
{
case 1: cs_set_user_team(player, 2);
case 2: cs_set_user_team(player, 1);
}
}
color_print(0, "第%d局过去了服务器自动交换双方队伍!",get_pcvar_num(mp_autoscore));
}
}
color_print(const id, const szText[], any:...)
{
new szMsg, iLen = formatex(szMsg, 191, "^x04 ^x01");
vformat(szMsg, 191 - iLen, szText, 3);
message_begin(id ? MSG_ONE : MSG_BROADCAST, get_user_msgid("SayText"), _, id);
write_byte(1);
write_string(szMsg);
message_end();
} 4# sakulekingz
先謝你啦.........
再請問:它是用時間來換邊?還是用局數來算?
最好是用一開局的15分後...才換邊! 5# 香港雞棚
是按双方比分更换队伍 楼上加我QQ9142673,你赞助啥资源?QQ说 amx_transfer name name name (一次最多可以三位換隊)
amx_mtransfer (全體人員互換隊伍)
哪位朋友有这个插件啊? 听好用的 回LZ
按比分换队不行啊,比赛F的话行不通,按照回合才行,一般是满15回合自动换边。谢谢!