HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*==========================================================================================
  2.  
  3. AMX Round Count v0.0.1
  4. Copyright © 2010 by Duna. All rights reserved.
  5.  
  6.   Last Update: 29/11/2010
  7. Visit: www.csduna.blogspot.com
  8.  
  9.  
  10. -*- Description -*-
  11.  
  12. At the beginning of each round, the plugin will display a message on the hud,
  13.   stating the number of round and along with the message, a sound.
  14.   There are 4 different sounds.
  15.  
  16. Enjoy!
  17.  
  18. ===========================================================================================*/
  19.  
  20. #include <amxmodx>
  21. #include <amxmisc>
  22.  
  23. new const PLUGIN[] = "AMX Round Count"
  24. new const VERSION[] = "0.0.1"
  25. new const AUTHOR[] = "Duna"
  26.  
  27. new g_roundCount
  28.  
  29. public plugin_init(){
  30. register_plugin(PLUGIN,VERSION,AUTHOR)
  31. register_event("RoundTime", "roundcount", "bc")
  32. register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
  33. return PLUGIN_CONTINUE
  34. }
  35.  
  36. new prepare_sounds[][] =
  37. {
  38. "rcount/prepare1",
  39. "rcount/prepare2",
  40. "rcount/prepare3",
  41. "rcount/prepare4"
  42. };
  43.  
  44. public roundcount()
  45. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  46.  
  47. ++g_roundCount
  48.  
  49. new r = random(256)
  50. new g = random(256)
  51. new b = random(256)
  52.  
  53. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  54. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  55.  
  56. client_cmd(0,"spk %s",prepare_sounds[random(sizeof prepare_sounds)]);
  57. }
  58.  
  59. public reset_counter(){
  60. g_roundCount = 0
  61. }
  62.  
  63. public plugin_precache(){
  64. precache_sound("rcount/prepare1.wav")
  65. precache_sound("rcount/prepare2.wav")
  66. precache_sound("rcount/prepare3.wav")
  67. precache_sound("rcount/prepare4.wav")
  68. return PLUGIN_CONTINUE
  69. }
  70.  
  71. /*==========================================================================================
  72.   the end ...
  73. ===========================================================================================*/
  74.  
  75. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  76. *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  77. */
  78.