谁有可以显示对方名字和剩余HP,护甲的插件吗??

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS个性化修改专区谁有可以显示对方名字和剩余HP,护甲的插件吗??
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
5个回复

谁有可以显示对方名字和剩余HP,护甲的插件吗??

楼层直达
不就是我咯

ZxID:11573094

等级: 中士
举报 只看楼主 使用道具 楼主   发表于: 2010-11-27 0
我想用在僵尸的,就是只要把鼠标移到目标人物(不分敌我),就会显示他的名字,剩余血量。护甲的插件。
谁有??
还有,别再给我发什么显示掉血的插件了。。
挽留我

ZxID:12878056

等级: 元老

举报 只看该作者 沙发   发表于: 2010-11-27 0
  1. /* AMX Mod X
  2. *  StatsX 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. //--------------------------------
  35. #include <amxmodx>
  36. #include <amxmisc>
  37. #include <csx>
  38. //--------------------------------
  39. // Uncomment to activate log debug messages.
  40. //#define STATSX_DEBUG
  41. // HUD statistics duration in seconds (minimum 1.0 seconds).
  42. #define HUD_DURATION_CVAR  "amx_statsx_duration"
  43. #define HUD_DURATION        "12.0"
  44. // HUD statistics stop relative freeze end in seconds.
  45. // To stop before freeze end use a negative value.
  46. #define HUD_FREEZE_LIMIT_CVAR  "amx_statsx_freeze"
  47. #define HUD_FREEZE_LIMIT        "-2.0"
  48. // HUD statistics minimum duration, in seconds, to trigger the display logic.
  49. #define HUD_MIN_DURATION    0.2
  50. // Config plugin constants.
  51. #define MODE_HUD_DELAY      0  // Make a 0.01 sec delay on HUD reset process.
  52. // You can also manualy enable or disable these options by setting them to 1
  53. // For example:
  54. // public ShowAttackers = 1
  55. // However amx_statscfg command is recommended
  56. public KillerChat          = 0 // displays killer hp&ap to victim console
  57.                                 //  and screen
  58. public ShowAttackers        = 0 // shows attackers
  59. public ShowVictims          = 0 // shows victims
  60. public ShowKiller          = 0 // shows killer
  61. public ShowTeamScore        = 0 // shows team score at round end
  62. public ShowTotalStats      = 0 // shows round total stats
  63. public ShowBestScore        = 0 // shows rounds best scored player
  64. public ShowMostDisruptive  = 0 // shows rounds most disruptive player
  65. public EndPlayer            = 0 // displays player stats at the end of map
  66. public EndTop15            = 0 // displays top15 at the end of map
  67. public SayHP                = 0 // displays information about user killer
  68. public SayStatsMe          = 0 // displays user's stats and rank
  69. public SayRankStats        = 0 // displays user's rank stats
  70. public SayMe                = 0 // displays user's stats
  71. public SayRank              = 0 // displays user's rank
  72. public SayReport            = 0 // report user's weapon status to team
  73. public SayScore            = 0 // displays team's map score
  74. public SayTop15            = 0 // displays first 15 players
  75. public SayStatsAll          = 0 // displays all players stats and rank
  76. public SayMiscFunc          = 0 // displays timeleft, thetime, currentmap, ff
  77. public ShowStats            = 1 // set client HUD-stats switched off by default
  78. public ShowDistHS          = 0 // show distance and HS in attackers and
  79.                                 //  victims HUD lists
  80. public ShowFullStats        = 0 // show full HUD stats (more than 78 chars)
  81. public SpecRankInfo        = 0 // displays rank info when spectating
  82. // Standard Contstants.
  83. #define MAX_TEAMS              2
  84. #define MAX_PLAYERS            32 + 1
  85. #define MAX_NAME_LENGTH        31
  86. #define MAX_WEAPON_LENGTH      31
  87. #define MAX_TEXT_LENGTH        255
  88. #define MAX_BUFFER_LENGTH      2047
  89. // User stats parms id
  90. #define STATS_KILLS            0
  91. #define STATS_DEATHS            1
  92. #define STATS_HS                2
  93. #define STATS_TKS              3
  94. #define STATS_SHOTS            4
  95. #define STATS_HITS              5
  96. #define STATS_DAMAGE            6
  97. // Global player flags.
  98. new BODY_PART[8][] = {
  99.   "WHOLEBODY",
  100.   "HEAD",
  101.   "CHEST",
  102.   "STOMACH",
  103.   "LEFTARM",
  104.   "RIGHTARM",
  105.   "LEFTLEG",
  106.   "RIGHTLEG"
  107. }
  108. // Killer information, save killer info at the time when player is killed.
  109. #define KILLED_KILLER_ID        0  // Killer userindex/user-ID
  110. #define KILLED_KILLER_HEALTH    1  // Killer's health
  111. #define KILLED_KILLER_ARMOUR    2  // Killer's armour
  112. #define KILLED_TEAM            3  // Killer's team
  113. #define KILLED_KILLER_STATSFIX  4  // Fix to register the last hit/kill
  114. new g_izKilled[MAX_PLAYERS][5]
  115. // Menu variables and configuration
  116. #define MAX_PPL_MENU_ACTIONS    2  // Number of player menu actions
  117. #define PPL_MENU_OPTIONS        7  // Number of player options per displayed menu
  118. new g_iPluginMode                                  = 0
  119. new g_izUserMenuPosition[MAX_PLAYERS]              = { 0, ... }
  120. new g_izUserMenuAction[MAX_PLAYERS]                = { 0, ... }
  121. new g_izUserMenuPlayers[MAX_PLAYERS][32]
  122. new g_izSpecMode[MAX_PLAYERS]                      = { 0, ... }
  123. new g_izShowStatsFlags[MAX_PLAYERS]                = { 0, ... }
  124. new g_izStatsSwitch[MAX_PLAYERS]                    = { 0, ... }
  125. new Float:g_fzShowUserStatsTime[MAX_PLAYERS]        = { 0.0, ... }
  126. new Float:g_fShowStatsTime                          = 0.0
  127. new Float:g_fFreezeTime                            = 0.0
  128. new Float:g_fFreezeLimitTime                        = 0.0
  129. new Float:g_fHUDDuration                            = 0.0
  130. new g_iRoundEndTriggered                            = 0
  131. new g_iRoundEndProcessed                            = 0
  132. new Float:g_fStartGame                              = 0.0
  133. new g_izTeamScore[MAX_TEAMS]                        = { 0, ... }
  134. new g_izTeamEventScore[MAX_TEAMS]                  = { 0, ... }
  135. new g_izTeamRndStats[MAX_TEAMS][8]
  136. new g_izTeamGameStats[MAX_TEAMS][8]
  137. new g_izUserUserID[MAX_PLAYERS]                    = { 0, ... }
  138. new g_izUserAttackerDistance[MAX_PLAYERS]          = { 0, ... }
  139. new g_izUserVictimDistance[MAX_PLAYERS][MAX_PLAYERS]
  140. new g_izUserRndName[MAX_PLAYERS][MAX_NAME_LENGTH]
  141. new g_izUserRndStats[MAX_PLAYERS][8]
  142. new g_izUserGameStats[MAX_PLAYERS][8]
  143. // Common buffer to improve performance, as Small always zero-initializes all vars
  144. new g_sBuffer[MAX_BUFFER_LENGTH+1]                  = ""
  145. new g_sScore[MAX_TEXT_LENGTH+1]                    = ""
  146. new g_sAwardAndScore[MAX_BUFFER_LENGTH+1]          = ""
  147. new t_sText[MAX_TEXT_LENGTH+1]                      = ""
  148. new t_sName[MAX_NAME_LENGTH+1]                      = ""
  149. new t_sWpn[MAX_WEAPON_LENGTH+1]                    = ""
  150. //--------------------------------
  151. //  Initialize
  152. //--------------------------------
  153. public plugin_init() {
  154.   // Register plugin.
  155.   register_plugin( "StatsX", AMXX_VERSION_STR, "AMXX Dev Team")
  156.   register_dictionary("statsx.txt")
  157.   // Register events.
  158.   register_event( "TextMsg", "eventStartGame", "a",
  159.                   "2=#Game_Commencing", "2=#Game_will_restart_in" )
  160.   register_event( "ResetHUD", "eventResetHud", "be" )
  161.   register_event( "RoundTime", "eventStartRound", "bc" )
  162.   register_event( "SendAudio", "eventEndRound", "a",
  163.                   "2=%!MRAD_terwin", "2=%!MRAD_ctwin", "2=%!MRAD_rounddraw" )
  164.   register_event( "TeamScore", "eventTeamScore", "a" )
  165.   register_event( "30", "eventIntermission", "a" )
  166.   register_event( "TextMsg", "eventSpecMode", "bd", "2&ec_Mod" )
  167.   register_event( "StatusValue", "eventShowRank", "bd", "1=2" )
  168.   // Register commands.
  169.   register_clcmd( "say /hp", "cmdHp", 0, "- display info. about your killer (chat)" )
  170.   register_clcmd( "say /statsme", "cmdStatsMe", 0, "- display your stats (MOTD)" )
  171.   register_clcmd( "say /rankstats", "cmdRankStats", 0, "- display your server stats (MOTD)" )
  172.   register_clcmd( "say /me", "cmdMe", 0, "- display current round stats (chat)" )
  173.   register_clcmd( "say /score", "cmdScore", 0, "- display last score (chat)" )
  174.   register_clcmd( "say /rank", "cmdRank", 0, "- display your rank (chat)" )
  175.   register_clcmd( "say /report", "cmdReport", 0, "- display waepon status (say_team)" )
  176.   register_clcmd( "say /top15", "cmdTop15", 0, "- display top 15 players (MOTD)" )
  177.   register_clcmd( "say /stats", "cmdStats", 0, "- display players stats (menu/MOTD)" )
  178.   register_clcmd( "say /timeleft", "cmdTimeLeft", 0, "- display time left on map (say)" )
  179.   register_clcmd( "say /thetime", "cmdTheTime", 0, "- display the time (say)" )
  180.   register_clcmd( "say /currentmap", "cmdCurrentMap", 0, "- display current map (say)" )
  181.   register_clcmd( "say /ff", "cmdFf", 0, "- display friendly fire status (say)" )
  182.   register_clcmd( "say /switch", "cmdSwitch", 0, "- switch client's stats on or off" )
  183.   // Register menus.
  184.   register_menucmd( register_menuid("Server Stats"), 1023, "actionStatsMenu" )
  185.   // Register special configuration setting and default value.
  186.   register_srvcmd( "amx_statsx_mode", "cmdPluginMode", ADMIN_CFG, "<flags> - sets plugin options" )
  187.   #if defined STATSX_DEBUG
  188.   register_clcmd( "say /hudtest", "cmdHudTest" )
  189.   #endif
  190.   register_cvar( HUD_DURATION_CVAR, HUD_DURATION )
  191.   register_cvar( HUD_FREEZE_LIMIT_CVAR, HUD_FREEZE_LIMIT )
  192.   // Init buffers and some global vars.
  193.   g_sBuffer[0] = 0
  194.   save_team_chatscore()
  195. }
  196. public plugin_cfg() {
  197.   new addStast[] = "amx_statscfg add ^"%s^" %s"
  198.   server_cmd( addStast, "Show killer hp&ap","KillerChat" )
  199.   server_cmd( addStast, "Show Attackers", "ShowAttackers" )
  200.   server_cmd( addStast, "Show Victims", "ShowVictims" )
  201.   server_cmd( addStast, "Show killer", "ShowKiller" )
  202.   server_cmd( addStast, "Show Team Score", "ShowTeamScore" )
  203.   server_cmd( addStast, "Show Total Stats", "ShowTotalStats" )
  204.   server_cmd( addStast, "Show Best Score", "ShowBestScore" )
  205.   server_cmd( addStast, "Show Most Disruptive", "ShowMostDisruptive" )
  206.   server_cmd( addStast, "HUD-stats default", "ShowStats" )
  207.   server_cmd( addStast, "Dist&HS in HUD lists", "ShowDistHS" )
  208.  
  209.   server_cmd( addStast, "Stats at the end of map", "EndPlayer")
  210.   server_cmd( addStast, "Top15 at the end of map", "EndTop15" )
  211.   server_cmd( addStast, "Say /hp", "SayHP" )
  212.   server_cmd( addStast, "Say /statsme", "SayStatsMe" )
  213.   server_cmd( addStast, "Say /rankstats", "SayRankStats" )
  214.   server_cmd( addStast, "Say /me", "SayMe" )
  215.   server_cmd( addStast, "Say /rank", "SayRank" )
  216.   server_cmd( addStast, "Say /report", "SayReport" )
  217.   server_cmd( addStast, "Say /score", "SayScore" )
  218.   server_cmd( addStast, "Say /top15", "SayTop15" )
  219.   server_cmd( addStast, "Say /stats", "SayStatsAll" )
  220.   server_cmd( addStast, "Misc say commands", "SayMiscFunc" )
  221.  
  222.   server_cmd( addStast, "Spec. Rank Info", "SpecRankInfo" )
  223.   // Update local configuration vars with value in cvars.
  224.   get_config_cvars()
  225. }
  226. // Set hudmessage format.
  227. set_hudtype_killer( Float:fDuration )
  228.   set_hudmessage( 220, 80, 0, 0.05, 0.15, 0, 6.0, fDuration, (fDuration>=g_fHUDDuration)?1.0:0.0, 1.0, 2 )
  229. set_hudtype_endround( Float:fDuration )
  230.   set_hudmessage( 100, 200, 0, 0.05, 0.55, 0, 0.02, fDuration, (fDuration>=g_fHUDDuration)?1.0:0.0, 1.0, 1 )
  231. set_hudtype_attacker( Float:fDuration )
  232.   set_hudmessage( 220, 80, 0, 0.55, 0.35, 0, 6.0, fDuration, (fDuration>=g_fHUDDuration)?1.0:0.0, 1.0, 3 )
  233. set_hudtype_victim( Float:fDuration )
  234.   set_hudmessage( 0, 80, 220, 0.55, 0.60, 0, 6.0, fDuration, (fDuration>=g_fHUDDuration)?1.0:0.0, 1.0, 4 )
  235. set_hudtype_specmode() {
  236.   set_hudmessage( 255, 255, 255, 0.02, 0.87, 2, 0.05, 0.1, 0.01, 3.0, 1)
  237. }
  238. #if defined STATSX_DEBUG
  239. public cmdHudTest( id ) {
  240.   new i, iLen
  241.   iLen = 0
  242.   for ( i = 1; i < 20; i++ )
  243.     iLen += format( g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "....x....1....x....2....x....3....x....4....x....^n" )
  244.   set_hudtype_killer( 50.0 )
  245.   show_hudmessage( id, g_sBuffer )
  246. }
  247. #endif
  248. // Stats formulas
  249. Float:accuracy( izStats[8] ) {
  250.   if ( !izStats[STATS_SHOTS] ) return ( 0.0 )
  251.   return ( 100.0 * float( izStats[STATS_HITS] ) / float( izStats[STATS_SHOTS] ) )
  252. }
  253. Float:effec( izStats[8] ) {
  254.   if ( !izStats[STATS_KILLS] ) return ( 0.0 )
  255.   return ( 100.0 * float( izStats[STATS_KILLS] ) / float( izStats[STATS_KILLS] + izStats[STATS_DEATHS] ) )
  256. }
  257. // Distance formula (metric)
  258. Float:distance( iDistance ) {
  259.   return float( iDistance ) * 0.0254
  260. }
  261. // Get plugin config flags.
  262. set_plugin_mode( id, sFlags[] ) {
  263.   if ( sFlags[0] )
  264.     g_iPluginMode = read_flags( sFlags )
  265.   get_flags( g_iPluginMode, t_sText, MAX_TEXT_LENGTH )
  266.   console_print( id, "%L", id, "MODE_SET_TO", t_sText )
  267.   return g_iPluginMode
  268. }
  269. // Get config parameters.
  270. get_config_cvars() {
  271.   g_fFreezeTime = get_cvar_float("mp_freezetime")
  272.   if ( g_fFreezeTime < 0.0 ) g_fFreezeTime = 0.0
  273.   g_fHUDDuration = get_cvar_float( HUD_DURATION_CVAR )
  274.   if ( g_fHUDDuration < 1.0 ) g_fHUDDuration = 1.0
  275.   g_fFreezeLimitTime = get_cvar_float( HUD_FREEZE_LIMIT_CVAR )
  276. }
  277. // Get and format attackers header and list.
  278. get_attackers( id, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  279.   new izStats[8],izBody[8]
  280.   new iAttacker
  281.   new iFound, iLen
  282.   new iMaxPlayer = get_maxplayers()
  283.   iFound = 0
  284.   sBuffer[0] = 0
  285.  
  286.   // Get and format header. Add killing attacker statistics if user is dead.
  287.   // Make sure shots is greater than zero or division by zero will occur. 
  288.   // To print a '%', 4 of them must done in a row.
  289.   izStats[STATS_SHOTS] = 0
  290.   iAttacker = g_izKilled[id][KILLED_KILLER_ID]
  291.   if ( iAttacker )
  292.     get_user_astats( id, iAttacker, izStats, izBody )
  293.   if ( izStats[STATS_SHOTS] && ShowFullStats ) {
  294.     get_user_name( iAttacker, t_sName, MAX_NAME_LENGTH )
  295.     iLen = format( sBuffer, MAX_BUFFER_LENGTH, "%L -- %s -- %0.2f%%%% %L:^n",
  296.                   id, "ATTACKERS", t_sName, accuracy( izStats ), id, "ACC" )
  297.   }
  298.   else
  299.     iLen = format( sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "ATTACKERS" )
  300.   // Get and format attacker list.
  301.   for ( iAttacker = 1; iAttacker <= iMaxPlayer; iAttacker++ ) {
  302.     if ( get_user_astats( id, iAttacker, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH ) ) {
  303.       iFound = 1
  304.       get_user_name( iAttacker, t_sName, 32 )
  305.       if ( izStats[STATS_KILLS] ) {
  306.         if ( !ShowDistHS )
  307.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  308.                           "%s -- %d %L / %d %L / %s^n",
  309.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  310.                           t_sWpn )
  311.         else if ( izStats[STATS_HS] )
  312.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  313.                           "%s -- %d %L / %d %L / %s / %0.0f m / HS^n",
  314.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  315.                           t_sWpn, distance(g_izUserAttackerDistance[id]) )
  316.         else
  317.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  318.                           "%s -- %d %L / %d %L / %s / %0.0f m^n",
  319.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  320.                           t_sWpn, distance(g_izUserAttackerDistance[id]) )
  321.       }
  322.       else
  323.         iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  324.                         "%s -- %d %L / %d %L^n",
  325.                         t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG" )
  326.     }
  327.   }
  328.   if ( !iFound )
  329.     sBuffer[0] = 0
  330.   return iFound
  331. }
  332. // Get and format victims header and list
  333. get_victims( id, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  334.   new izStats[8], izBody[8]
  335.   new iVictim
  336.   new iFound, iLen
  337.   new iMaxPlayer = get_maxplayers()
  338.   iFound = 0
  339.   sBuffer[0] = 0
  340.  
  341.   // Get and format header.
  342.   // Make sure shots is greater than zero or division by zero will occur. 
  343.   // To print a '%', 4 of them must done in a row.
  344.   izStats[STATS_SHOTS] = 0
  345.   get_user_vstats( id, 0, izStats, izBody )
  346.   if ( izStats[STATS_SHOTS] )
  347.     iLen = format( sBuffer, MAX_BUFFER_LENGTH, "%L -- %0.2f%%%% %L:^n",
  348.                   id, "VICTIMS", accuracy( izStats ), id, "ACC" )
  349.   else
  350.     iLen = format( sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "VICTIMS" )
  351.   for ( iVictim = 1; iVictim <= iMaxPlayer; iVictim++ ) {
  352.     if( get_user_vstats( id, iVictim, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH ) ) {
  353.       iFound = 1
  354.       get_user_name( iVictim, t_sName, MAX_NAME_LENGTH )
  355.       if ( izStats[STATS_DEATHS] ) {
  356.         if ( !ShowDistHS )
  357.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  358.                           "%s -- %d %L / %d %L / %s^n",
  359.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  360.                           t_sWpn )
  361.         else if ( izStats[STATS_HS] )
  362.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  363.                           "%s -- %d %L / %d %L / %s / %0.0f m / HS^n",
  364.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  365.                           t_sWpn, distance(g_izUserVictimDistance[id][iVictim]) )
  366.         else
  367.           iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  368.                           "%s -- %d %L / %d %L / %s / %0.0f m^n",
  369.                           t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG",
  370.                           t_sWpn, distance(g_izUserVictimDistance[id][iVictim]) )
  371.       }
  372.       else
  373.         iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  374.                         "%s -- %d %L / %d %L^n",
  375.                         t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG" )
  376.     }
  377.   }
  378.   if ( !iFound )
  379.     sBuffer[0] = 0
  380.   return iFound
  381. }
  382. // Get and format kill info.
  383. get_kill_info( id, iKiller, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  384.   new iFound, iLen
  385.   iFound = 0
  386.   sBuffer[0] = 0
  387.   if ( iKiller && iKiller != id ) {
  388.     new izAStats[8], izABody[8], izVStats[8], iaVBody[8]
  389.     iFound = 1
  390.     get_user_name( iKiller, t_sName, MAX_NAME_LENGTH )
  391.     izAStats[STATS_HITS]  = 0
  392.     izAStats[STATS_DAMAGE] = 0
  393.     t_sWpn[0] = 0
  394.     get_user_astats( id, iKiller, izAStats, izABody, t_sWpn, MAX_WEAPON_LENGTH )
  395.     izVStats[STATS_HITS]  = 0
  396.     izVStats[STATS_DAMAGE] = 0
  397.     get_user_vstats( id, iKiller, izVStats, iaVBody )
  398.     iLen  = format( sBuffer, MAX_BUFFER_LENGTH,
  399.                     "%L^n", id, "KILLED_YOU_DIST",
  400.                     t_sName, t_sWpn, distance(g_izUserAttackerDistance[id]) )
  401.     iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  402.                     "%L^n", id, "DID_DMG_HITS",
  403.                     izAStats[STATS_DAMAGE], izAStats[STATS_HITS],
  404.                     g_izKilled[id][KILLED_KILLER_HEALTH], g_izKilled[id][KILLED_KILLER_ARMOUR] )
  405.     iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  406.                     "%L^n", id, "YOU_DID_DMG",
  407.                     izVStats[STATS_DAMAGE], izVStats[STATS_HITS] )
  408.   }
  409.   return iFound
  410. }
  411. // Get and format most disruptive.
  412. add_most_disruptive( sBuffer[MAX_BUFFER_LENGTH+1] ) {
  413.   new id, iMaxDamageId, iMaxDamage, iMaxHeadShots
  414.  
  415.   iMaxDamageId  = 0
  416.   iMaxDamage    = 0
  417.   iMaxHeadShots = 0
  418.   // Find player.
  419.   for ( id = 1; id < MAX_PLAYERS; id++ ) {
  420.     if ( g_izUserRndStats[id][STATS_DAMAGE] >= iMaxDamage &&
  421.         ( g_izUserRndStats[id][STATS_DAMAGE] > iMaxDamage || g_izUserRndStats[id][STATS_HS] > iMaxHeadShots ) ) {
  422.       iMaxDamageId  = id
  423.       iMaxDamage    = g_izUserRndStats[id][STATS_DAMAGE]
  424.       iMaxHeadShots = g_izUserRndStats[id][STATS_HS]
  425.     }
  426.   }
  427.   // Format statistics.
  428.   if ( iMaxDamageId ) {
  429.     id = iMaxDamageId
  430.     new Float:fGameEff = effec( g_izUserGameStats[id] )
  431.     new Float:fRndAcc = accuracy( g_izUserRndStats[id] )
  432.     format( t_sText, MAX_TEXT_LENGTH,
  433.             "%L: %s^n%d %L / %d %L -- %0.2f%%%% %L / %0.2f%%%% %L^n",
  434.             LANG_SERVER, "MOST_DMG", g_izUserRndName[id], g_izUserRndStats[id][STATS_HITS], LANG_SERVER, "HIT_S",
  435.             iMaxDamage, LANG_SERVER, "DMG", fGameEff, LANG_SERVER, "EFF", fRndAcc, LANG_SERVER, "ACC" )
  436.     add( sBuffer, MAX_BUFFER_LENGTH, t_sText )
  437.   }
  438.   return iMaxDamageId
  439. }
  440. // Get and format best score.
  441. add_best_score( sBuffer[MAX_BUFFER_LENGTH+1] ) {
  442.   new id, iMaxKillsId, iMaxKills, iMaxHeadShots
  443.   iMaxKillsId  = 0
  444.   iMaxKills    = 0
  445.   iMaxHeadShots = 0
  446.   // Find player
  447.   for ( id = 1; id < MAX_PLAYERS; id++ ) {
  448.     if ( g_izUserRndStats[id][STATS_KILLS] >= iMaxKills &&
  449.         ( g_izUserRndStats[id][STATS_KILLS] > iMaxKills || g_izUserRndStats[id][STATS_HS] > iMaxHeadShots ) ) {
  450.       iMaxKillsId  = id
  451.       iMaxKills    = g_izUserRndStats[id][STATS_KILLS]
  452.       iMaxHeadShots = g_izUserRndStats[id][STATS_HS]
  453.     }
  454.   }
  455.   // Format statistics.
  456.   if ( iMaxKillsId ) {
  457.     id = iMaxKillsId
  458.     new Float:fGameEff = effec( g_izUserGameStats[id] )
  459.     new Float:fRndAcc = accuracy( g_izUserRndStats[id] )
  460.     format( t_sText, MAX_TEXT_LENGTH,
  461.             "%L: %s^n%d %L / %d hs -- %0.2f%%%% %L / %0.2f%%%% %L^n",
  462.             LANG_SERVER, "BEST_SCORE", g_izUserRndName[id], iMaxKills, LANG_SERVER, "KILL_S",
  463.             iMaxHeadShots, fGameEff, LANG_SERVER, "EFF", fRndAcc, LANG_SERVER, "ACC" )
  464.     add( sBuffer, MAX_BUFFER_LENGTH, t_sText )
  465.   }
  466.   return iMaxKillsId
  467. }
  468. // Get and format team score.
  469. add_team_score( sBuffer[MAX_BUFFER_LENGTH+1] ) {
  470.   new Float:fzMapEff[MAX_TEAMS], Float:fzMapAcc[MAX_TEAMS], Float:fzRndAcc[MAX_TEAMS]
  471.   // Calculate team stats
  472.   for ( new iTeam = 0; iTeam < MAX_TEAMS; iTeam++ ) {
  473.     fzMapEff[iTeam] = effec( g_izTeamGameStats[iTeam] )
  474.     fzMapAcc[iTeam] = accuracy( g_izTeamGameStats[iTeam] )
  475.     fzRndAcc[iTeam] = accuracy( g_izTeamRndStats[iTeam] )
  476.   }
  477.   // Format round team stats, MOTD
  478.   format( t_sText, MAX_TEXT_LENGTH,
  479.           "TERRORIST %d / %0.2f%%%% %L / %0.2f%%%% %L^nCT %d / %0.2f%%%% %L / %0.2f%%%% %L^n",
  480.           g_izTeamScore[0], fzMapEff[0], LANG_SERVER, "EFF", fzRndAcc[0], LANG_SERVER, "ACC",
  481.           g_izTeamScore[1], fzMapEff[1], LANG_SERVER, "EFF", fzRndAcc[1], LANG_SERVER, "ACC" )
  482.   add( sBuffer, MAX_BUFFER_LENGTH, t_sText )
  483. }
  484. // Get and format team stats, chat version
  485. save_team_chatscore() {
  486.   new Float:fzMapEff[MAX_TEAMS], Float:fzMapAcc[MAX_TEAMS], Float:fzRndAcc[MAX_TEAMS]
  487.   // Calculate team stats
  488.   for ( new iTeam = 0; iTeam < MAX_TEAMS; iTeam++ ) {
  489.     fzMapEff[iTeam] = effec( g_izTeamGameStats[iTeam] )
  490.     fzMapAcc[iTeam] = accuracy( g_izTeamGameStats[iTeam] )
  491.     fzRndAcc[iTeam] = accuracy( g_izTeamRndStats[iTeam] )
  492.   }
  493.   // Format game team stats, chat
  494.   format( g_sScore, MAX_BUFFER_LENGTH,
  495.           "TERRORIST %d / %0.2f%%%% %L / %0.2f%%%% %L  --  CT %d / %0.2f%%%% %L / %0.2f%%%% %L",
  496.           g_izTeamScore[0], fzMapEff[0], LANG_SERVER, "EFF", fzMapAcc[0], LANG_SERVER, "ACC",
  497.           g_izTeamScore[1], fzMapEff[1], LANG_SERVER, "EFF", fzMapAcc[1], LANG_SERVER, "ACC" )
  498. }
  499. // Get and format total stats.
  500. add_total_stats( sBuffer[MAX_BUFFER_LENGTH+1] ) {
  501.   format( t_sText, MAX_TEXT_LENGTH,
  502.           "%L: %d %L / %d hs -- %d %L / %d %L^n",
  503.           LANG_SERVER, "TOTAL", g_izUserRndStats[0][STATS_KILLS], LANG_SERVER, "KILL_S", g_izUserRndStats[0][STATS_HS],
  504.           g_izUserRndStats[0][STATS_HITS], LANG_SERVER, "HITS", g_izUserRndStats[0][STATS_SHOTS], LANG_SERVER, "SHOT_S" )
  505.   add( sBuffer, MAX_BUFFER_LENGTH, t_sText )
  506. }
  507. // Get and format a user's list of body hits from an attacker.
  508. add_attacker_hits( id, iAttacker, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  509.   new iFound = 0
  510.   if ( iAttacker && iAttacker != id ) {
  511.     new izStats[8], izBody[8], iLen
  512.     izStats[STATS_HITS] = 0
  513.     get_user_astats( id, iAttacker, izStats, izBody )
  514.     if ( izStats[STATS_HITS] ) {
  515.       iFound = 1
  516.       iLen = strlen( sBuffer )
  517.       get_user_name( iAttacker, t_sName, MAX_NAME_LENGTH )
  518.       iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  519.                       "%L:^n", id, "HITS_YOU_IN", t_sName )
  520.       for ( new i = 1; i < 8; i++ ) {
  521.         if ( !izBody[i] ) continue
  522.         iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  523.                         "%L: %d^n", id, BODY_PART[i], izBody[i] )
  524.       }
  525.     }
  526.   }
  527.   return iFound
  528. }
  529. // Get and format killed stats: killer hp, ap, hits.
  530. format_kill_ainfo( id, iKiller, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  531.   new iFound = 0
  532.   if ( iKiller && iKiller != id ) {
  533.     new izStats[8], izBody[8]
  534.     new iLen
  535.     iFound = 1
  536.     get_user_name( iKiller, t_sName, MAX_NAME_LENGTH )
  537.     izStats[STATS_HITS] = 0
  538.     get_user_astats( id, iKiller, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH )
  539.     iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  540.                   "%L (%dhp, %dap) >>", id, "KILLED_BY_WITH", t_sName, t_sWpn,
  541.                   distance(g_izUserAttackerDistance[id]),
  542.                   g_izKilled[id][KILLED_KILLER_HEALTH], g_izKilled[id][KILLED_KILLER_ARMOUR] )
  543.     if ( izStats[STATS_HITS] ) {
  544.       for ( new i = 1; i < 8; i++ ) {
  545.         if ( !izBody[i] ) continue
  546.         iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  547.                         " %L: %d", id, BODY_PART[i], izBody[i] )
  548.       }
  549.     }
  550.     else
  551.       iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  552.                       " %L", id, "NO_HITS" )
  553.   }
  554.   else
  555.     format( sBuffer, MAX_BUFFER_LENGTH, "%L", id, "YOU_NO_KILLER" )
  556.   return iFound
  557. }
  558. // Get and format killed stats: hits, damage on killer.
  559. format_kill_vinfo( id, iKiller, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  560.   new iFound = 0
  561.   new izStats[8]
  562.   new izBody[8]
  563.   new iLen
  564.   izStats[STATS_HITS] = 0
  565.   izStats[STATS_DAMAGE] = 0
  566.   get_user_vstats( id, iKiller, izStats, izBody )
  567.   if ( iKiller && iKiller != id ) {
  568.     iFound = 1
  569.     get_user_name( iKiller, t_sName, MAX_NAME_LENGTH )
  570.     iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  571.                   "%L >>", id, "YOU_HIT",
  572.                   t_sName, izStats[STATS_HITS], izStats[STATS_DAMAGE] )
  573.   }
  574.   else
  575.     iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  576.                   "%L >>", id, "LAST_RES",
  577.                   izStats[STATS_HITS], izStats[STATS_DAMAGE] )
  578.   if ( izStats[STATS_HITS] ) {
  579.     for ( new i = 1; i < 8; i++ ) {
  580.       if ( !izBody[i] ) continue
  581.       iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  582.                       " %L: %d", id, BODY_PART[i], izBody[i] )
  583.     }
  584.   }
  585.   else
  586.     iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  587.                     " %L", id, "NO_HITS" )
  588.   return iFound
  589. }
  590. // Get and format top 15.
  591. format_top15( sBuffer[MAX_BUFFER_LENGTH+1] ){
  592.   new iMax = get_statsnum()
  593.   new izStats[8], izBody[8]
  594.   new iLen = 0
  595.   if ( iMax > 15 )
  596.     iMax = 15
  597.   new lKills[16],lDeaths[16],lHits[16],lShots[16],lEff[16],lAcc[16]
  598.   format(lKills,15,"%L",LANG_SERVER,"KILLS")
  599.   format(lDeaths,15,"%L",LANG_SERVER,"DEATHS")
  600.   format(lHits,15,"%L",LANG_SERVER,"HITS")
  601.   format(lShots,15,"%L",LANG_SERVER,"SHOTS")
  602.   format(lEff,15,"%L",LANG_SERVER,"EFF")
  603.   format(lAcc,15,"%L",LANG_SERVER,"ACC")
  604.   ucfirst(lEff)
  605.   ucfirst(lAcc)
  606.   iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  607.                   "<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><body bgcolor=#000000><font color=#FFB000><pre>" )
  608.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  609.                   "%2s %-22.22s %6s %6s %6s %6s %4s %4s %4s^n",
  610.                   "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc )
  611.   for ( new i = 0; i < iMax && MAX_BUFFER_LENGTH - iLen > 0; i++ ) {
  612.     get_stats( i, izStats, izBody, t_sName, MAX_NAME_LENGTH )
  613.     iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  614.                     "%2d %-22.22s %6d %6d %6d %6d %4d %3.0f%% %3.0f%%^n", i+1, t_sName,
  615.                     izStats[STATS_KILLS], izStats[STATS_DEATHS], izStats[STATS_HITS],
  616.                     izStats[STATS_SHOTS], izStats[STATS_HS],
  617.                     effec( izStats ), accuracy( izStats ) )
  618.   }
  619. }
  620. // Get and format rank stats.
  621. format_rankstats( id, sBuffer[MAX_BUFFER_LENGTH+1], iMyId=0 ) {
  622.   new izStats[8] = { 0, ... }
  623.   new izBody[8]
  624.   new iRankPos, iLen
  625.   new lKills[16],lDeaths[16],lHits[16],lShots[16],lDamage[16],lEff[16],lAcc[16]
  626.   format(lKills,15,"%L",id,"KILLS")
  627.   format(lDeaths,15,"%L",id,"DEATHS")
  628.   format(lHits,15,"%L",id,"HITS")
  629.   format(lShots,15,"%L",id,"SHOTS")
  630.   format(lDamage,15,"%L",id,"DAMAGE")
  631.   format(lEff,15,"%L",id,"EFF")
  632.   format(lAcc,15,"%L",id,"ACC")
  633.   ucfirst(lEff)
  634.   ucfirst(lAcc)
  635.   iRankPos = get_user_stats( id, izStats, izBody )
  636.   iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  637.                   "<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><body bgcolor=#000000><font color=#FFB000><pre>" )
  638.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  639.                   "%L %L^n^n", id, (!iMyId||iMyId==id)?"YOUR":"PLAYERS",
  640.                   id, "RANK_IS", iRankPos, get_statsnum() )
  641.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  642.                   "%6s: %d  (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
  643.                   lKills, izStats[STATS_KILLS], izStats[STATS_HS],
  644.                   lDeaths, izStats[STATS_DEATHS], lHits, izStats[STATS_HITS],
  645.                   lShots, izStats[STATS_SHOTS], lDamage, izStats[STATS_DAMAGE],
  646.                   lEff, effec( izStats ), lAcc, accuracy( izStats ) )
  647.   new L_BODY_PART[8][32]
  648.   for (new i=1; i<8; i++) {
  649.     format(L_BODY_PART[i],31,"%L",id,BODY_PART[i])
  650.   }
  651.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  652.                   "%10s:^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d",
  653.                   "HITS", L_BODY_PART[1], izBody[1], L_BODY_PART[2], izBody[2],
  654.                   L_BODY_PART[3], izBody[3], L_BODY_PART[4], izBody[4], L_BODY_PART[5], izBody[5],
  655.                   L_BODY_PART[6], izBody[6], L_BODY_PART[7], izBody[7])
  656. }
  657. // Get and format stats.
  658. format_stats( id, sBuffer[MAX_BUFFER_LENGTH+1] ) {
  659.   new izStats[8] = { 0, ... }
  660.   new izBody[8]
  661.   new iWeapon, iLen
  662.   new lKills[16],lDeaths[16],lHits[16],lShots[16],lDamage[16],lEff[16],lAcc[16],lWeapon[16]
  663.   format(lKills,15,"%L",id,"KILLS")
  664.   format(lDeaths,15,"%L",id,"DEATHS")
  665.   format(lHits,15,"%L",id,"HITS")
  666.   format(lShots,15,"%L",id,"SHOTS")
  667.   format(lDamage,15,"%L",id,"DAMAGE")
  668.   format(lEff,15,"%L",id,"EFF")
  669.   format(lAcc,15,"%L",id,"ACC")
  670.   format(lWeapon,15,"%L",id,"WEAPON")
  671.   ucfirst(lEff)
  672.   ucfirst(lAcc)
  673.   get_user_wstats( id, 0, izStats, izBody )
  674.   iLen = format( sBuffer, MAX_BUFFER_LENGTH,
  675.                   "<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><body bgcolor=#000000><font color=#FFB000><pre>" )
  676.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  677.                   "%6s: %d  (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
  678.                   lKills, izStats[STATS_KILLS], izStats[STATS_HS],
  679.                   lDeaths, izStats[STATS_DEATHS], lHits, izStats[STATS_HITS],
  680.                   lShots, izStats[STATS_SHOTS], lDamage, izStats[STATS_DAMAGE],
  681.                   lEff, effec( izStats ), lAcc, accuracy( izStats ) )
  682.   iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  683.                   "%-12.12s  %6s  %6s  %6s  %6s  %6s  %4s^n",
  684.                   lWeapon, lKills, lDeaths, lHits, lShots, lDamage, lAcc )
  685.   for ( iWeapon = 1; iWeapon < xmod_get_maxweapons() && MAX_BUFFER_LENGTH - iLen > 0 ; iWeapon++ ) {
  686.     if ( get_user_wstats( id, iWeapon, izStats, izBody ) ) {
  687.       xmod_get_wpnname( iWeapon, t_sWpn, MAX_WEAPON_LENGTH )
  688.       iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
  689.                       "%-12.12s  %6d  %6d  %6d  %6d  %6d  %3.0f%%^n",
  690.                       t_sWpn, izStats[STATS_KILLS], izStats[STATS_DEATHS],
  691.                       izStats[STATS_HITS], izStats[STATS_SHOTS],
  692.                       izStats[STATS_DAMAGE], accuracy( izStats ) )
  693.     }
  694.   }
  695. }
  696. // Show round end stats. If gametime is zero then use default duration time.
  697. show_roundend_hudstats( id, Float:fGameTime ) {
  698.  
  699.   // Bail out if there no HUD stats should be shown
  700.   // for this player or end round stats not created.
  701.   if ( !g_izStatsSwitch[id] ) return
  702.   if ( !g_sAwardAndScore[0] ) return
  703.   // If round end timer is zero clear round end stats.
  704.   if ( g_fShowStatsTime == 0.0 ) {
  705.     set_hudtype_endround( 0.05 )
  706.     show_hudmessage( id, "" )
  707.     #if defined STATSX_DEBUG
  708.     log_amx( "Clear round end HUD stats for #%d", id ) 
  709.     #endif
  710.   }
  711.   // Set HUD-duration to default or remaining time.
  712.   new Float:fDuration
  713.   if ( fGameTime == 0.0 )
  714.     fDuration = g_fHUDDuration
  715.   else {
  716.     fDuration = g_fShowStatsTime + g_fHUDDuration - fGameTime
  717.     if ( fDuration > g_fFreezeTime + g_fFreezeLimitTime )
  718.       fDuration = g_fFreezeTime + g_fFreezeLimitTime
  719.   }
  720.   // Show stats only if more time left than coded minimum.
  721.   if ( fDuration >= HUD_MIN_DURATION ) {
  722.     set_hudtype_endround( fDuration )
  723.     show_hudmessage( id, g_sAwardAndScore )
  724.     #if defined STATSX_DEBUG
  725.     log_amx( "Show %1.2fs round end HUD stats for #%d", fDuration, id ) 
  726.     #endif
  727.   }
  728. }
  729. // Show round end stats.
  730. show_user_hudstats( id, Float:fGameTime ) {
  731.  
  732.   // Bail out if there no HUD stats should be shown
  733.   // for this player or user stats timer is zero.
  734.   if ( !g_izStatsSwitch[id] ) return
  735.   if ( g_fzShowUserStatsTime[id] == 0.0 ) return
  736.   // Set HUD-duration to default or remaining time.
  737.   new Float:fDuration
  738.   if ( fGameTime == 0.0 )
  739.     fDuration = g_fHUDDuration
  740.   else {
  741.     fDuration = g_fzShowUserStatsTime[id] + g_fHUDDuration - fGameTime
  742.     if ( fDuration > g_fFreezeTime + g_fFreezeLimitTime )
  743.       fDuration = g_fFreezeTime + g_fFreezeLimitTime
  744.   }
  745.   // Show stats only if more time left than coded minimum.
  746.   if ( fDuration >= HUD_MIN_DURATION ) {
  747.     if ( ShowKiller ) {
  748.       new iKiller
  749.       iKiller = g_izKilled[id][KILLED_KILLER_ID]
  750.       get_kill_info( id, iKiller, g_sBuffer )
  751.       add_attacker_hits( id, iKiller, g_sBuffer )
  752.       set_hudtype_killer( fDuration )
  753.       show_hudmessage( id, g_sBuffer )
  754.       #if defined STATSX_DEBUG
  755.       log_amx( "Show %1.2fs %suser HUD k-stats for #%d", fDuration, g_sBuffer[0]?"":"no ", id )
  756.       #endif
  757.     }
  758.     if ( ShowVictims ) {
  759.       get_victims( id, g_sBuffer )
  760.       set_hudtype_victim( fDuration )
  761.       show_hudmessage( id, g_sBuffer )
  762.       #if defined STATSX_DEBUG
  763.       log_amx( "Show %1.2fs %suser HUD v-stats for #%d", fDuration, g_sBuffer[0]?"":"no ", id )
  764.       #endif
  765.     }
  766.     if ( ShowAttackers ) {
  767.       get_attackers( id, g_sBuffer )
  768.       set_hudtype_attacker( fDuration )
  769.       show_hudmessage( id, g_sBuffer )
  770.       #if defined STATSX_DEBUG
  771.       log_amx( "Show %1.2fs %suser HUD a-stats for #%d", fDuration, g_sBuffer[0]?"":"no ", id )
  772.       #endif
  773.     }
  774.   }
  775. }
  776. //------------------------------------------------------------
  777. //  Plugin commands
  778. //------------------------------------------------------------
  779. // Set or get plugin config flags.
  780. public cmdPluginMode( id, level, cid ) {
  781.   if ( !cmd_access( id, level, cid, 1 ) )
  782.     return PLUGIN_HANDLED
  783.   if ( read_argc() > 1 )
  784.     read_argv( 1, g_sBuffer, MAX_BUFFER_LENGTH )
  785.   else
  786.     g_sBuffer[0] = 0
  787.   set_plugin_mode( id, g_sBuffer )
  788.   return PLUGIN_HANDLED
  789. }
  790. // Display MOTD stats.
  791. public cmdStatsMe( id ) {
  792.   if ( !SayStatsMe ) {
  793.     client_print( id, print_chat, "%L", id, "DISABLED_MSG" )
  794.     return PLUGIN_HANDLED
  795.   }
  796.   format_stats( id, g_sBuffer )
  797.   get_user_name( id, t_sName, MAX_NAME_LENGTH )
  798.   show_motd( id, g_sBuffer, t_sName )
  799.   return PLUGIN_CONTINUE
  800. }
  801. // Display MOTD rank.
  802. public cmdRankStats( id ) {
  803.   if ( !SayRankStats ) {
  804.     client_print( id, print_chat, "%L", id, "DISABLED_MSG" )
  805.     return PLUGIN_HANDLED
  806.   }
  807.   format_rankstats( id, g_sBuffer )
  808.   get_user_name( id, t_sName, MAX_NAME_LENGTH )
  809.   show_motd( id, g_sBuffer, t_sName )
  810.   return PLUGIN_CONTINUE
  811. }
  812. // Display MOTD top15 ranked.
  813. public cmdTop15( id ) {
  814.   if ( !SayTop15 ) {
  815.     client_print( id, print_chat, "%L", id, "DISABLED_MSG" )
  816.     return PLUGIN_HANDLED
  817.   }
  818.   format_top15( g_sBuffer )
  819.   show_motd( id, g_sBuffer, "Top 15" )
  820. }
不就是我咯

ZxID:11573094

等级: 中士
举报 只看该作者 板凳   发表于: 2010-12-02 0
晕。。直接给我SMA文件会麻烦过这样么。。。算了。。明天试试能不能用
不就是我咯

ZxID:11573094

等级: 中士
举报 只看该作者 地板   发表于: 2010-12-10 0
不能用。。编译错啦
杰斯仔

ZxID:98519

等级: 中尉
举报 只看该作者 4楼  发表于: 2010-12-11 0
   
本帖de评分: 1 条评分 DB -1
DB-1

请不要恶意灌水,恶意灌水包括:纯表情 ..

杰斯仔

ZxID:98519

等级: 中尉
举报 只看该作者 5楼  发表于: 2010-12-11 0
       
本帖de评分: 1 条评分 DB -1
DB-1

请不要恶意灌水,恶意灌水包括:纯表情 ..

« 返回列表
发帖 回复