New Round Message Plugin Problem

Unpaid Requests, Public Plugins
Post Reply
Zjox
Member
Member
Austria
Posts: 23
Joined: 5 Months Ago
Has thanked: 0
Been thanked: 0
Contact:

New Round Message Plugin Problem

#1

Post by Zjox » 5 Months Ago

Hello,
I am using this plugin 'New Round Message' but there is some rounds doesn't appears the message in chat
and appears in console as empty message between others messages,
How can i fix this? hope anyone help me
Code of the plugin:
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define VERSION "1.3"
  5.  
  6.  
  7. new rounds_elapsed;
  8. new play_sound;
  9. new chat_message;
  10. new g_maxplayers;
  11. new g_map[32]
  12. new say_text;
  13.  
  14. public plugin_init()
  15. {
  16.     /* Register plugin and author */
  17.     register_plugin("Vox Round Say", VERSION, "God@Dorin")
  18.    
  19.    
  20.     /* Register plugin version by cvar */
  21.     register_cvar("round_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
  22.     set_cvar_string("round_version", VERSION);
  23.  
  24.     /* Register new round events */
  25.     register_event("HLTV", "new_round", "a", "1=0", "2=0");
  26.     register_event("TextMsg", "restart_round", "a", "2=#Game_will_restart_in");
  27.  
  28.     /* Register language file */
  29.     register_dictionary("round_message.txt");
  30.  
  31.     /* Register plugin cvars */
  32.     play_sound = register_cvar("amx_playsound","1");
  33.     chat_message = register_cvar("amx_chatmessage","1");
  34.     g_maxplayers = get_maxplayers();
  35.     get_mapname(g_map, 31)
  36.    
  37.     say_text = get_user_msgid("SayText");
  38. }
  39. public new_round()
  40. {
  41.     rounds_elapsed += 1;
  42.    
  43.     new p_playernum;
  44.     p_playernum = get_playersnum(1);
  45.    
  46.     if(get_pcvar_num(chat_message) == 1)
  47.     {  
  48.         client_printc(0, "%L", 0, "RND_MSG", rounds_elapsed, g_map, p_playernum, g_maxplayers);
  49.     }
  50.     if(get_pcvar_num(play_sound) == 1)
  51.     {
  52.         new rndctstr[21]
  53.         num_to_word(rounds_elapsed, rndctstr, 20);
  54.         client_cmd(0, "spk ^"vox/round %s^"",rndctstr)
  55.     }  
  56.     return PLUGIN_CONTINUE;
  57. }
  58. public restart_round()
  59. {
  60.     rounds_elapsed = 0;
  61. }
  62. stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {
  63.    
  64.     new msg[191], players[32], count = 1;
  65.     vformat(msg, sizeof msg - 1, string, 3);
  66.    
  67.     replace_all(msg,190,"!g","^4");
  68.     replace_all(msg,190,"!y","^1");
  69.     replace_all(msg,190,"!t","^3");
  70.    
  71.     if(id)
  72.         players[0] = id;
  73.     else
  74.         get_players(players,count,"ch");
  75.    
  76.     new index;
  77.     for (new i = 0 ; i < count ; i++)
  78.     {
  79.         index = players[i];
  80.         message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
  81.         write_byte(index);
  82.         write_string(msg);
  83.         message_end();  
  84.     }  
  85.    
  86. }
  87. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  88. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
  89. */
URL of the plugin: https://forums.alliedmods.net/showthread.php?p=798319
and Thanks a lot

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest