搜索
查看: 3230|回复: 10

[求助]我用多年菜鸟的amxx1.6汉化增强版的问题

[复制链接]
发表于 2006-5-6 01:54:08 | 显示全部楼层 |阅读模式 来自 中国–吉林–长春
我用的是多年菜鸟的amxx1.6汉化增强版,前几天在stats.ini中开启了LastMan,发现汉化不完全,显示为:player (100 HP) vs. 3 TERRORISTS:现在全部希望都在你身上!我试着改miscstats.txt,但没用,就试着改源码,但TERRORISTS和CTS始终没改过来,高手们帮帮我吧!谢谢!下面是源码
  1. /* AMX Mod X
  2. *   Misc. Stats Plugin
  3. *
  4. * by the AMX Mod X Development Team
  5. *  originally developed by OLO
  6. *
  7. * This file is part of AMX Mod X.
  8. *
  9. *
  10. *  This program is free software; you can redistribute it and/or modify it
  11. *  under the terms of the GNU General Public License as published by the
  12. *  Free Software Foundation; either version 2 of the License, or (at
  13. *  your option) any later version.
  14. *
  15. *  This program is distributed in the hope that it will be useful, but
  16. *  WITHOUT ANY WARRANTY; without even the implied warranty of
  17. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. *  General Public License for more details.
  19. *
  20. *  You should have received a copy of the GNU General Public License
  21. *  along with this program; if not, write to the Free Software Foundation,
  22. *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. *  In addition, as a special exception, the author gives permission to
  25. *  link the code of this program with the Half-Life Game Engine ("HL
  26. *  Engine") and Modified Game Libraries ("MODs") developed by Valve,
  27. *  L.L.C ("Valve"). You must obey the GNU General Public License in all
  28. *  respects for all of the code used other than the HL Engine and MODs
  29. *  from Valve. If you modify this file, you may extend this exception
  30. *  to your version of the file, but you are not obligated to do so. If
  31. *  you do not wish to do so, delete this exception statement from your
  32. *  version.
  33. */
  34. #include <amxmodx>
  35. #include <csx>
  36. public MultiKill
  37. public MultiKillSound
  38. public BombPlanting
  39. public BombDefusing
  40. public BombPlanted
  41. public BombDefused
  42. public BombFailed
  43. public BombPickUp
  44. public BombDrop
  45. public BombCountVoice
  46. public BombCountDef
  47. public BombReached
  48. public ItalyBonusKill
  49. public EnemyRemaining
  50. public LastMan
  51. public KnifeKill
  52. public KnifeKillSound
  53. public GrenadeKill
  54. public GrenadeSuicide
  55. public HeadShotKill
  56. public HeadShotKillSound
  57. public RoundCounterSound
  58. public RoundCounter
  59. public KillingStreak
  60. public KillingStreakSound
  61. public DoubleKill
  62. public DoubleKillSound
  63. public PlayerName
  64. public FirstBloodSound
  65. new g_streakKills[33][2]
  66. new g_multiKills[33][2]
  67. new g_C4Timer
  68. new g_Defusing
  69. new g_Planter
  70. new Float:g_LastOmg
  71. new g_LastAnnounce
  72. new g_roundCount
  73. new Float:g_doubleKill
  74. new g_doubleKillId
  75. new g_friend[33]
  76. new g_firstBlood
  77. new g_MultiKillMsg[7][] =
  78. {
  79.         "MULTI_MSG",
  80.         "ULTRA_MSG",
  81.         "SPREE_MSG",
  82.         "RAMPAGE_MSG" ,
  83.         "UNSTOPPABLE_MSG",
  84.         "MONSTER_MSG",
  85.         "GODLIKE_MSG"
  86. }
  87. new g_Sounds[7][] =
  88. {
  89.         "multikill",
  90.         "ultrakill",
  91.         "killingspree",
  92.         "rampage",
  93.         "unstoppable",
  94.         "monsterkill",
  95.         "godlike"
  96. }
  97. new g_KillingMsg[7][] =
  98. {
  99.         "MULTI_SMALL",
  100.         "ULTRA_SMALL",
  101.         "SPREE_SMALL",
  102.         "RAMPAGE_SMALL",
  103.         "UNSTOPPABLE_SMALL",
  104.         "MONSTER_SMALL",
  105.         "GODLIKE_SMALL"
  106. }
  107. new g_KinfeMsg[4][] =
  108. {
  109.         "KNIFE_MSG_1",
  110.         "KNIFE_MSG_2",
  111.         "KNIFE_MSG_3",
  112.         "KNIFE_MSG_4"
  113. }
  114. new g_LastMessages[4][] =
  115. {
  116.         "LAST_MSG_1",
  117.         "LAST_MSG_2",
  118.         "LAST_MSG_3",
  119.         "LAST_MSG_4"
  120. }
  121. new g_HeMessages[4][] =
  122. {
  123.         "HE_MSG_1",
  124.         "HE_MSG_2",
  125.         "HE_MSG_3",
  126.         "HE_MSG_4"
  127. }
  128. new g_SHeMessages[4][] =
  129. {
  130.         "SHE_MSG_1",
  131.         "SHE_MSG_2",
  132.         "SHE_MSG_3",
  133.         "SHE_MSG_4"
  134. }
  135. new g_HeadShots[7][] =
  136. {
  137.         "HS_MSG_1",
  138.         "HS_MSG_2",
  139.         "HS_MSG_3",
  140.         "HS_MSG_4",
  141.         "HS_MSG_5",
  142.         "HS_MSG_6",
  143.         "HS_MSG_7"
  144. }
  145. new g_teamsNames[4][] =
  146. {
  147.         "TERRORIST",
  148.         "CT",
  149.         "TERRORISTS",
  150.         "CTS"
  151. }
  152. public plugin_init()
  153. {
  154.         register_plugin("CS Misc. Stats", AMXX_VERSION_STR, "AMXX Dev Team")
  155.         register_dictionary("miscstats.txt")
  156.         register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
  157.         register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
  158.         register_event("RoundTime", "eNewRound", "bc")
  159.         register_event("StatusValue", "setTeam", "be", "1=1")
  160.         register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
  161.         register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
  162.         new mapname[32]
  163.         get_mapname(mapname, 31)
  164.         if (equali(mapname, "de_", 3) || equali(mapname, "csde_", 5))
  165.         {
  166.                 register_event("StatusIcon", "eGotBomb", "be", "1=1", "1=2", "2=c4")
  167.                 register_event("TextMsg", "eBombPickUp", "bc", "2&#Got_bomb")
  168.                 register_event("TextMsg", "eBombDrop", "bc", "2&#Game_bomb_d")
  169.         }
  170.         else if (equali(mapname, "cs_italy"))
  171.         {
  172.                 register_event("23", "chickenKill", "a", "1=108", /*"12=106", */ "15=4")
  173.                 register_event("23", "radioKill", "a", "1=108", /*"12=294", */ "15=2")
  174.         }
  175. }
  176. public plugin_cfg()
  177. {
  178.         new g_addStast[] = "amx_statscfg add ^"%s^" %s"
  179.        
  180.         server_cmd(g_addStast, "MultiKill", "MultiKill")
  181.         server_cmd(g_addStast, "MultiKillSound", "MultiKillSound")
  182.         server_cmd(g_addStast, "Bomb Planting", "BombPlanting")
  183.         server_cmd(g_addStast, "Bomb Defusing", "BombDefusing")
  184.         server_cmd(g_addStast, "Bomb Planted", "BombPlanted")
  185.         server_cmd(g_addStast, "Bomb Defuse Succ.", "BombDefused")
  186.         server_cmd(g_addStast, "Bomb Def. Failure", "BombFailed")
  187.         server_cmd(g_addStast, "Bomb PickUp", "BombPickUp")
  188.         server_cmd(g_addStast, "Bomb Drop", "BombDrop")
  189.         server_cmd(g_addStast, "Bomb Count Down", "BombCountVoice")
  190.         server_cmd(g_addStast, "Bomb Count Down (def)", "BombCountDef")
  191.         server_cmd(g_addStast, "Bomb Site Reached", "BombReached")
  192.         server_cmd(g_addStast, "Italy Bonus Kill", "ItalyBonusKill")
  193.         server_cmd(g_addStast, "Last Man", "LastMan")
  194.         server_cmd(g_addStast, "Knife Kill", "KnifeKill")
  195.         server_cmd(g_addStast, "Knife Kill Sound", "KnifeKillSound")
  196.         server_cmd(g_addStast, "Grenade Kill", "GrenadeKill")
  197.         server_cmd(g_addStast, "Grenade Suicide", "GrenadeSuicide")
  198.         server_cmd(g_addStast, "HeadShot Kill", "HeadShotKill")
  199.         server_cmd(g_addStast, "HeadShot Kill Sound", "HeadShotKillSound")
  200.         server_cmd(g_addStast, "Round Counter", "RoundCounter")
  201.         server_cmd(g_addStast, "Round Counter Sound", "RoundCounterSound")
  202.         server_cmd(g_addStast, "Killing Streak", "KillingStreak")
  203.         server_cmd(g_addStast, "Killing Streak Sound", "KillingStreakSound")
  204.         server_cmd(g_addStast, "Enemy Remaining", "EnemyRemaining")
  205.         server_cmd(g_addStast, "Double Kill", "DoubleKill")
  206.         server_cmd(g_addStast, "Double Kill Sound", "DoubleKillSound")
  207.         server_cmd(g_addStast, "Player Name", "PlayerName")
  208.         server_cmd(g_addStast, "First Blood Sound", "FirstBloodSound")
  209. }
  210. public client_putinserver(id)
  211. {
  212.         g_multiKills[id] = {0, 0}
  213.         g_streakKills[id] = {0, 0}
  214. }
  215. public client_death(killer, victim, wpnindex, hitplace, TK)
  216. {
  217.         if (wpnindex == CSW_C4)
  218.                 return
  219.         new headshot = (hitplace == HIT_HEAD) ? 1 : 0
  220.         new selfkill = (killer == victim) ? 1 : 0
  221.         if (g_firstBlood)
  222.         {
  223.                 g_firstBlood = 0
  224.                 if (FirstBloodSound)
  225.                         play_sound("misc/firstblood")
  226.         }
  227.         if ((KillingStreak || KillingStreakSound) && !TK)
  228.         {
  229.                 g_streakKills[victim][1]++
  230.                 g_streakKills[victim][0] = 0
  231.                 if (!selfkill)
  232.                 {
  233.                         g_streakKills[killer][0]++
  234.                         g_streakKills[killer][1] = 0
  235.                        
  236.                         new a = g_streakKills[killer][0] - 3
  237.                         if ((a > -1) && !(a % 2))
  238.                         {
  239.                                 new name[32]
  240.                                 get_user_name(killer, name, 31)
  241.                                
  242.                                 if ((a >>= 1) > 6)
  243.                                         a = 6
  244.                                
  245.                                 if (KillingStreak)
  246.                                 {
  247.                                         set_hudmessage(0, 100, 255, 0.05, 0.55, 2, 0.02, 6.0, 0.01, 0.1, 3)
  248.                                         show_hudmessage(0,"%L",LANG_PLAYER,g_KillingMsg[a], name)
  249.                                 }
  250.                                
  251.                                 if (KillingStreakSound)
  252.                                 {
  253.                                         new file[32]
  254.                                        
  255.                                         format(file, 32, "misc/%s", g_Sounds[a])
  256.                                         play_sound(file)
  257.                                 }
  258.                         }
  259.                 }
  260.         }
  261.         if (MultiKill || MultiKillSound)
  262.         {
  263.                 if (!selfkill && !TK)
  264.                 {
  265.                         g_multiKills[killer][0]++
  266.                         g_multiKills[killer][1] += headshot
  267.                        
  268.                         new param[2]
  269.                        
  270.                         param[0] = killer
  271.                         param[1] = g_multiKills[killer][0]
  272.                         set_task(4.0 + float(param[1]), "checkKills", 0, param, 2)
  273.                 }
  274.         }
  275.         if (EnemyRemaining)
  276.         {
  277.                 new ppl[32], pplnum = 0
  278.                 new team = get_user_team(victim) - 1
  279.                
  280.                 if (team >= 0 && team < 4)
  281.                         get_players(ppl, pplnum, "e", g_teamsNames[1 - team])
  282.                
  283.                 if (pplnum)
  284.                 {
  285.                         new eppl[32], epplnum
  286.                        
  287.                         if (team >= 0 && team < 4)
  288.                         {
  289.                                 get_players(eppl, epplnum, "ae", g_teamsNames[team])
  290.                                 if (epplnum)
  291.                                 {
  292.                                         new message[128], team_name[32]
  293.                                         set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, 3)
  294.                                         for (new a = 0; a < pplnum; ++a)
  295.                                         {
  296.                                                 format(team_name, 31, "%L", ppl[a], (epplnum == 1) ? g_teamsNames[team] : g_teamsNames[team + 2])
  297.                                                 format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)
  298.                                                 show_hudmessage(ppl[a], message)
  299.                                         }
  300.                                 }
  301.                         }
  302.                 }
  303.         }
  304.         if (LastMan)
  305.         {
  306.                 new cts[32], ts[32], ctsnum, tsnum
  307.                
  308.                 get_players(cts, ctsnum, "ae", g_teamsNames[1])
  309.                 get_players(ts, tsnum, "ae", g_teamsNames[0])
  310.                
  311.                 if (ctsnum == 1 && tsnum == 1)
  312.                 {
  313.                         new ctname[32], tname[32]
  314.                        
  315.                         get_user_name(cts[0], ctname, 31)
  316.                         get_user_name(ts[0], tname, 31)
  317.                        
  318.                         set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, 3)
  319.                         show_hudmessage(0, "%s vs. %s", ctname, tname)
  320.                        
  321.                         play_sound("misc/maytheforce")
  322.                 }
  323.                 else if (!g_LastAnnounce)
  324.                 {
  325.                         new oposite = 0, team = 0
  326.                        
  327.                         if (ctsnum == 1 && tsnum > 1)
  328.                         {
  329.                                 g_LastAnnounce = cts[0]
  330.                                 oposite = tsnum
  331.                                 team = 0
  332.                         }
  333.                         else if (tsnum == 1 && ctsnum > 1)
  334.                         {
  335.                                 g_LastAnnounce = ts[0]
  336.                                 oposite = ctsnum
  337.                                 team = 1
  338.                         }
  339.                         if (g_LastAnnounce)
  340.                         {
  341.                                 new name[32]
  342.                                
  343.                                 get_user_name(g_LastAnnounce, name, 31)
  344.                                
  345.                                 set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, 3)
  346.                                 show_hudmessage(0, "%s (%d HP) vs. %d %s%s: %L", name, get_user_health(g_LastAnnounce), oposite, g_teamsNames[team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])
  347.                                
  348.                                 if (!is_user_connecting(g_LastAnnounce))
  349.                                         client_cmd(g_LastAnnounce, "spk misc/oneandonly")
  350.                         }
  351.                 }
  352.         }
  353.         if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
  354.         {
  355.                 if (KnifeKill)
  356.                 {
  357.                         new killer_name[32], victim_name[32]
  358.                        
  359.                         get_user_name(killer, killer_name, 31)
  360.                         get_user_name(victim, victim_name, 31)
  361.                        
  362.                         set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
  363.                         show_hudmessage(0, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)
  364.                 }
  365.                
  366.                 if (KnifeKillSound)
  367.                         play_sound("misc/humiliation")
  368.         }
  369.         if (wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide))
  370.         {
  371.                 new killer_name[32], victim_name[32]
  372.                
  373.                 get_user_name(killer, killer_name, 32)
  374.                 get_user_name(victim, victim_name, 32)
  375.                
  376.                 set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
  377.                
  378.                 if (!selfkill)
  379.                 {
  380.                         if (GrenadeKill)
  381.                                 show_hudmessage(0, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
  382.                 }
  383.                 else if (GrenadeSuicide)
  384.                         show_hudmessage(0, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
  385.         }
  386.         if (headshot && (HeadShotKill || HeadShotKillSound))
  387.         {
  388.                 if (HeadShotKill && wpnindex)
  389.                 {
  390.                         new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum
  391.                        
  392.                         xmod_get_wpnname(wpnindex, weapon_name, 31)
  393.                         get_user_name(killer, killer_name, 31)
  394.                         get_user_name(victim, victim_name, 31)
  395.                         get_players(players, pnum, "c")
  396.                        
  397.                         for (new i = 0; i < pnum; i++)
  398.                         {
  399.                                 format(message, 127, "%L", players[i], g_HeadShots[random_num(0, 6)])
  400.                                
  401.                                 replace(message, 127, "$vn", victim_name)
  402.                                 replace(message, 127, "$wn", weapon_name)
  403.                                 replace(message, 127, "$kn", killer_name)
  404.                                
  405.                                 set_hudmessage(100, 100, 255, -1.0, 0.29, 0, 6.0, 6.0, 0.5, 0.15, 1)
  406.                                 show_hudmessage(players[i], message)
  407.                         }
  408.                 }
  409.                
  410.                 if (HeadShotKillSound)
  411.                 {
  412.                         client_cmd(killer, "spk misc/headshot")
  413.                         client_cmd(victim, "spk misc/headshot")
  414.                 }
  415.         }
  416.         if ((DoubleKill || DoubleKillSound) && !selfkill)
  417.         {
  418.                 new Float:nowtime = get_gametime()
  419.                
  420.                 if (g_doubleKill == nowtime && g_doubleKillId == killer)
  421.                 {
  422.                         if (DoubleKill)
  423.                         {
  424.                                 new name[32]
  425.                                
  426.                                 get_user_name(killer, name, 31)
  427.                                
  428.                                 set_hudmessage(255, 0, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, 3)
  429.                                 show_hudmessage(0, "%L", LANG_PLAYER, "DOUBLE_KILL", name)
  430.                         }
  431.                        
  432.                         if (DoubleKillSound)
  433.                                 play_sound("misc/doublekill")
  434.                 }
  435.                
  436.                 g_doubleKill = nowtime
  437.                 g_doubleKillId = killer
  438.         }
  439. }
  440. public hideStatus(id)
  441. {
  442.         if (PlayerName)
  443.         {
  444.                 set_hudmessage(0, 0, 0, 0.0, 0.0, 0, 0.0, 0.01, 0.0, 0.0, 4)
  445.                 show_hudmessage(id, "")
  446.         }
  447. }
  448. public setTeam(id)
  449.         g_friend[id] = read_data(2)
  450. public showStatus(id)
  451. {
  452.         if (PlayerName)
  453.         {
  454.                 new name[32], pid = read_data(2)
  455.                
  456.                 get_user_name(pid, name, 31)
  457.                 new color1 = 0, color2 = 0
  458.                
  459.                 if (get_user_team(pid) == 1)
  460.                         color1 = 255
  461.                 else
  462.                         color2 = 255
  463.                
  464.                 if (g_friend[id] == 1)        // friend
  465.                 {
  466.                         new clip, ammo, wpnid = get_user_weapon(pid, clip, ammo)
  467.                         new wpnname[32]
  468.                        
  469.                         if (wpnid)
  470.                                 xmod_get_wpnname(wpnid, wpnname, 31)
  471.                        
  472.                         set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, 4)
  473.                         show_hudmessage(id, "%s -- %d HP / %d AP / %s", name, get_user_health(pid), get_user_armor(pid), wpnname)
  474.                 } else {
  475.                         set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, 4)
  476.                         show_hudmessage(id, name)
  477.                 }
  478.         }
  479. }
  480. public eNewRound()
  481. {
  482.         if (read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0))
  483.         {
  484.                 g_firstBlood = 1
  485.                 g_C4Timer = 0
  486.                 ++g_roundCount
  487.                
  488.                 if (RoundCounter)
  489.                 {
  490.                         set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  491.                         show_hudmessage(0, "%L", LANG_PLAYER, "PREPARE_FIGHT", g_roundCount)
  492.                 }
  493.                
  494.                 if (RoundCounterSound)
  495.                         play_sound("misc/prepare")
  496.                
  497.                 if (KillingStreak)
  498.                 {
  499.                         new appl[32], ppl, i
  500.                         get_players(appl, ppl, "ac")
  501.                        
  502.                         for (new a = 0; a < ppl; ++a)
  503.                         {
  504.                                 i = appl[a]
  505.                                
  506.                                 if (g_streakKills[i][0] >= 2)
  507.                                         client_print(i, print_chat, "* %L", i, "KILLED_ROW", g_streakKills[i][0])
  508.                                 else if (g_streakKills[i][1] >= 2)
  509.                                         client_print(i, print_chat, "* %L", i, "DIED_ROUNDS", g_streakKills[i][1])
  510.                         }
  511.                 }
  512.         }
  513. }
  514. public eRestart()
  515. {
  516.         eEndRound()
  517.         g_roundCount = 0
  518.         g_firstBlood = 1
  519. }
  520. public eEndRound()
  521. {
  522.         g_C4Timer = -2
  523.         g_LastOmg = 0.0
  524.         remove_task(8038)
  525.         g_LastAnnounce = 0
  526. }
  527. public checkKills(param[])
  528. {
  529.         new id = param[0]
  530.         new a = param[1]
  531.        
  532.         if (a == g_multiKills[id][0])
  533.         {
  534.                 a -= 3
  535.                
  536.                 if (a > -1)
  537.                 {
  538.                         if (MultiKill)
  539.                         {
  540.                                 new name[32]
  541.                                
  542.                                 get_user_name(id, name, 31)
  543.                                 set_hudmessage(255, 0, 100, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
  544.                                
  545.                                 if (a > 6)
  546.                                         a = 6
  547.                                
  548.                                 new temp[64]
  549.                                 format(temp,63,"%L %d %L (%d %L)",LANG_SERVER,"WITH",g_multiKills[id][0],LANG_SERVER,"KILLS",g_multiKills[id][1],LANG_SERVER,"HS")
  550.                                 show_hudmessage(0,"%L",LANG_PLAYER,g_MultiKillMsg[a],name,temp)
  551.                         }
  552.                        
  553.                         if (MultiKillSound)
  554.                         {
  555.                                 new sound[24]
  556.                                 format(sound, 23, "misc/%s", g_Sounds[a])
  557.                                 play_sound(sound)
  558.                         }
  559.                 }
  560.                 g_multiKills[id] = {0, 0}
  561.         }
  562. }
  563. public chickenKill()
  564.         if (ItalyBonusKill)
  565.                 announceEvent(0, "KILLED_CHICKEN")
  566. public radioKill()
  567. {
  568.         if (ItalyBonusKill)
  569.                 announceEvent(0, "BLEW_RADIO")
  570. }
  571. announceEvent(id, message[])
  572. {
  573.         new name[32]
  574.        
  575.         get_user_name(id, name, 31)
  576.         set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  577.         show_hudmessage(0, "%L", LANG_PLAYER, message, name)
  578. }
  579. public eBombPickUp(id)
  580.         if (BombPickUp)
  581.                 announceEvent(id, "PICKED_BOMB")
  582. public eBombDrop()
  583.         if (BombDrop)
  584.                 announceEvent(g_Planter, "DROPPED_BOMB")
  585. public eGotBomb(id)
  586. {
  587.         g_Planter = id
  588.        
  589.         if (BombReached && read_data(1) == 2 && g_LastOmg < get_gametime())
  590.         {
  591.                 g_LastOmg = get_gametime() + 15.0
  592.                 announceEvent(g_Planter, "REACHED_TARGET")
  593.         }
  594. }
  595. public bombTimer()
  596. {
  597.         if (--g_C4Timer > 0)
  598.         {
  599.                 if (BombCountVoice)
  600.                 {
  601.                         if (g_C4Timer == 30 || g_C4Timer == 20)
  602.                         {
  603.                                 new temp[64]
  604.                                
  605.                                 num_to_word(g_C4Timer, temp, 63)
  606.                                 format(temp, 63, "^"vox/%s seconds until explosion^"", temp)
  607.                                 play_sound(temp)
  608.                         }
  609.                         else if (g_C4Timer < 11)
  610.                         {
  611.                                 new temp[64]
  612.                                
  613.                                 num_to_word(g_C4Timer, temp, 63)
  614.                                 format(temp, 63, "^"vox/%s^"", temp)
  615.                                 play_sound(temp)
  616.                         }
  617.                 }
  618.                 if (BombCountDef && g_Defusing)
  619.                         client_print(g_Defusing, print_center, "%d", g_C4Timer)
  620.         }
  621.         else
  622.                 remove_task(8038)
  623. }
  624. public bomb_planted(planter)
  625. {
  626.         g_Defusing = 0
  627.        
  628.         if (BombPlanted)
  629.                 announceEvent(planter, "SET_UP_BOMB")
  630.        
  631.         g_C4Timer = get_cvar_num("mp_c4timer")
  632.         set_task(1.0, "bombTimer", 8038, "", 0, "b")
  633. }
  634. public bomb_planting(planter)
  635.         if (BombPlanting)
  636.                 announceEvent(planter, "PLANT_BOMB")
  637. public bomb_defusing(defuser)
  638. {
  639.         if (BombDefusing)
  640.                 announceEvent(defuser, "DEFUSING_BOMB")
  641.        
  642.         g_Defusing = defuser
  643. }
  644. public bomb_defused(defuser)
  645.         if (BombDefused)
  646.                 announceEvent(defuser, "DEFUSED_BOMB")
  647. public bomb_explode(planter, defuser)
  648.         if (BombFailed && defuser)
  649.                 announceEvent(defuser, "FAILED_DEFU")
  650. public play_sound(sound[])
  651. {
  652.         new players[32], pnum
  653.         get_players(players, pnum, "c")
  654.         new i
  655.        
  656.         for (i = 0; i < pnum; i++)
  657.         {
  658.                 if (is_user_connecting(players[i]))
  659.                         continue
  660.                
  661.                 client_cmd(players[i], "spk %s", sound)
  662.         }
  663. }
复制代码
第一个vs.我改成了单挑,显示正常,把第二个vs.改成了对决,hp改成了生命值。是不是还要改别的?
发表于 2006-5-6 08:51:52 | 显示全部楼层 来自 中国–福建–龙岩

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

你的修改没有错,自行编译后使用就知道效果了。
:D
回复

使用道具 举报

 楼主| 发表于 2006-5-6 20:39:52 | 显示全部楼层 来自 中国–吉林–长春

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

Post by 金闪闪
你的修改没有错,自行编译后使用就知道效果了。
:D

改完的效果如下图,明显看出“CTS”字样,这个怎么改?谢谢!

本帖子中包含更多资源

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

×
回复

使用道具 举报

发表于 2006-5-6 22:17:43 | 显示全部楼层 来自 中国–福建–龙岩–新罗区

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

也许你误会了,在E文中,多人以上就必须是CTs的。
只有单人才是CT。
:D
回复

使用道具 举报

 楼主| 发表于 2006-5-6 22:29:53 | 显示全部楼层 来自 中国–吉林–长春

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

先谢谢闪闪,我知道那是复数形式,我是想把CTS汉化成反恐精英(或警察),把TERRORISTS汉化成恐怖份子(或匪徒),不知如何实现。
另外在miscstats.txt文件里CTS和TERRORISTS已经汉化了。在左下角可以看到“还剩X个反恐精英(或恐怖份子)”字样。
不知为何开启了LastMan,这两项就这样显示了。
回复

使用道具 举报

 楼主| 发表于 2006-5-7 16:50:29 | 显示全部楼层 来自 中国–吉林–长春

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

郁闷哪!期待有人帮我!
回复

使用道具 举报

 楼主| 发表于 2006-5-10 08:00:33 | 显示全部楼层 来自 中国–吉林–长春

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

难道真的没办法了?急呀
回复

使用道具 举报

发表于 2006-5-10 08:47:38 | 显示全部楼层 来自 中国–福建–龙岩

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

检查“if (LastMan)”部分代码。

根据g_teamsNames[team]返回团队代码。
当是CTS时,team=0,是TS是team=1。那么对应的g_teamsNames[team]要如何修改呢?

:D
回复

使用道具 举报

 楼主| 发表于 2006-5-10 12:03:25 | 显示全部楼层 来自 中国–吉林–长春

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

Post by 金闪闪
检查“if (LastMan)”部分代码。

根据g_teamsNames[team]返回团队代码。
当是CTS时,team=0,是TS是team=1。那么对应的g_teamsNames[team]要如何修改呢?

:D


感谢呀!困扰我多日的问题终于解决了!真是一句话点醒梦中人啊!
回复

使用道具 举报

发表于 2006-5-10 12:18:53 | 显示全部楼层 来自 中国–辽宁–鞍山–海城市

回复: [求助]我用多年菜鸟的amxx1.6汉化增强版的问题

金闪闪是不是大学生啊~~~~
高手~~~~小弟佩服:gogo:
回复

使用道具 举报

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

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