搜索
查看: 5435|回复: 20

求:自動換隊插件

[复制链接]
发表于 2009-11-9 01:14:54 | 显示全部楼层 |阅读模式 来自 香港
求:自動換隊插件
各位:誰有中途全隊掉換插件!


謝謝!
发表于 2009-11-9 08:55:59 | 显示全部楼层 来自 辽宁营口
我有.......
回复

使用道具 举报

 楼主| 发表于 2009-11-18 01:42:41 | 显示全部楼层 来自 香港
2# meiyouyong


給我好嗎?
回复

使用道具 举报

发表于 2009-11-18 02:23:00 | 显示全部楼层 来自 四川内江
本帖最后由 sakulekingz 于 2009-11-18 02:44 编辑

自己写的。。。还没测试。。楼主需要的话可以先测试再使用
cvar:mp_autoscore <1-N> 为双方比分达到多少后自动更换队伍
  1.         #include <amxmodx>
  2.         #include <amxmisc>
  3.         #include <cstrike>
  4.        
  5.         #define PLUGIN        "Auto Swap Teams"
  6.         #define VERSION        "1.0"
  7.         #define AUTHOR        "dt.Sakulekingz (KIN)"
  8.         #define LOADING        "^n^t%s v%s, Copyright (C) 2009 by %s^n"
  9.        
  10.         new score[2];
  11.         new mp_autoscore;
  12.        
  13.         public plugin_init()
  14.         {
  15.                 register_plugin(PLUGIN, VERSION, AUTHOR);
  16.                 server_print(LOADING,PLUGIN,VERSION,AUTHOR);
  17.                 register_event("TeamScore", "team_score", "a");
  18.                 register_logevent("show_the_score", 2, "0=World triggered", "1=Round_Draw", "1=Round_End");
  19.                 mp_autoscore = register_cvar("mp_autoscore", "15");
  20.         }
  21.        
  22.         public team_score()
  23.         {
  24.                 new team[32];
  25.                 read_data(1,team,31);
  26.                 if (equal(team,"CT"))
  27.                 {
  28.                         score[0] = read_data(2);
  29.                 }
  30.                 else if (equal(team,"TERRORIST"))
  31.                 {
  32.                         score[1] = read_data(2);
  33.                 }
  34.         }
  35.        
  36.         public show_the_score()
  37.         {
  38.                 if(get_pcvar_num(mp_autoscore) == score[0]+score[1])
  39.                 {
  40.                         static player;
  41.                         for(player = 1; player <= get_maxplayers(); player++)
  42.                         {
  43.                                 switch(get_user_team(player))
  44.                                 {
  45.                                         case 1: cs_set_user_team(player, 2);
  46.                                         case 2: cs_set_user_team(player, 1);
  47.                                 }
  48.                         }
  49.                         color_print(0, "第%d局过去了服务器自动交换双方队伍!",get_pcvar_num(mp_autoscore));
  50.                 }
  51.         }
  52.        
  53.         color_print(const id, const szText[], any:...)
  54.         {
  55.                 new szMsg[192], iLen = formatex(szMsg, 191, "^x04[Auto Swap Teams] ^x01");
  56.                 vformat(szMsg[iLen], 191 - iLen, szText, 3);
  57.                
  58.                 message_begin(id ? MSG_ONE : MSG_BROADCAST, get_user_msgid("SayText"), _, id);
  59.                 write_byte(1);
  60.                 write_string(szMsg);
  61.                 message_end();
  62.         }
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2009-11-19 14:59:40 | 显示全部楼层 来自 香港
4# sakulekingz


先謝你啦.........

再請問:它是用時間來換邊?還是用局數來算?

最好是用一開局的15分後...才換邊!
回复

使用道具 举报

发表于 2009-11-19 16:17:20 | 显示全部楼层 来自 四川内江
5# 香港雞棚
是按双方比分更换队伍
回复

使用道具 举报

发表于 2009-11-19 21:56:09 | 显示全部楼层 来自 河南郑州
楼上加我QQ9142673,你赞助啥资源?QQ说
回复

使用道具 举报

发表于 2009-11-20 06:04:58 | 显示全部楼层 来自 北京
amx_transfer name name name (一次最多可以三位換隊)
amx_mtransfer (全體人員互換隊伍)
哪位朋友有这个插件啊?
回复

使用道具 举报

发表于 2009-12-11 12:04:20 | 显示全部楼层 来自 福建福州
听好用的
回复

使用道具 举报

发表于 2009-12-11 23:31:44 | 显示全部楼层 来自 广东江门
回LZ
按比分换队不行啊,比赛F的话行不通,按照回合才行,一般是满15回合自动换边。谢谢!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表