HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Vox Round Say"
  5. #define VERSION "1.2"
  6. #define AUTHOR "God@Dorin"
  7.  
  8. new rounds_elapsed;
  9. new play_sound;
  10. new chat_message;
  11. new g_maxplayers;
  12. new g_map[32]
  13. new say_text;
  14.  
  15. public plugin_init()
  16. {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. register_event("HLTV", "new_round", "a", "1=0", "2=0");
  19. register_event("TextMsg", "restart_round", "a", "2=#Game_will_restart_in");
  20. register_dictionary("round_message.txt");
  21. play_sound = register_cvar("amx_playsound","1");
  22. chat_message = register_cvar("amx_chatmessage","1");
  23. say_text = get_user_msgid("SayText");
  24. g_maxplayers = get_maxplayers();
  25. get_mapname(g_map, 31)
  26. }
  27. public new_round()
  28. {
  29. rounds_elapsed += 1;
  30.  
  31. new p_playernum;
  32. p_playernum = get_playersnum(1);
  33.  
  34. if(get_pcvar_num(chat_message) == 1)
  35. {
  36. client_printc(0, "%L", 0, "RND_MSG", rounds_elapsed, g_map, p_playernum, g_maxplayers);
  37. }
  38. if(get_pcvar_num(play_sound) == 1)
  39. {
  40. new rndctstr[21]
  41. num_to_word(rounds_elapsed, rndctstr, 20);
  42. client_cmd(0, "spk ^"vox/round %s^"",rndctstr)
  43. }
  44. return PLUGIN_CONTINUE;
  45. }
  46. public restart_round()
  47. {
  48. rounds_elapsed = 0;
  49. }
  50. stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {
  51.  
  52. new msg[191], players[32], count = 1;
  53. vformat(msg, sizeof msg - 1, string, 3);
  54.  
  55. replace_all(msg,190,"!g","^4");
  56. replace_all(msg,190,"!y","^1");
  57. replace_all(msg,190,"!t","^3");
  58.  
  59. if(id)
  60. players[0] = id;
  61. else
  62. get_players(players,count,"ch");
  63.  
  64. new index;
  65. for (new i = 0 ; i < count ; i++)
  66. {
  67. index = players[i];
  68. message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
  69. write_byte(index);
  70. write_string(msg);
  71. message_end();
  72. }
  73.  
  74. }
  75. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  76. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
  77. */
  78.