HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2.  
  3. new gSzamolas;
  4.  
  5. public plugin_init() {
  6. register_clcmd("say timeleft", "kor")
  7. register_logevent("ElsoKor", 2, "0=World triggered", "1&Restart_Round_");
  8. register_logevent("ElsoKor", 2, "0=World triggered", "1=Game_Commencing");
  9. register_logevent("KorKezdes", 2, "0=World triggered", "1=Round_End");
  10. }
  11.  
  12. public ElsoKor()
  13. {
  14. gSzamolas = 50;
  15. }
  16. public KorKezdes()
  17. {
  18. gSzamolas--;
  19. }
  20.  
  21. public kor(id)
  22. {
  23. print_color(id, "!yHtra van mg!t %d!y kr.", gSzamolas)
  24. }
  25.  
  26. stock print_color(const id, const input[], any:...)
  27. {
  28. new count = 1, players[32];
  29. static msg[191];
  30. vformat(msg, 190, input, 3);
  31.  
  32. replace_all(msg, 190, "!g", "^4");
  33. replace_all(msg, 190, "!y", "^1");
  34. replace_all(msg, 190, "!t", "^3");
  35. replace_all(msg, 190, "", "á");
  36. replace_all(msg, 190, "", "é");
  37. replace_all(msg, 190, "", "í");
  38. replace_all(msg, 190, "", "ó");
  39. replace_all(msg, 190, "", "ö");
  40. replace_all(msg, 190, "", "ő");
  41. replace_all(msg, 190, "", "ú");
  42. replace_all(msg, 190, "", "ü");
  43. replace_all(msg, 190, "", "ű");
  44. replace_all(msg, 190, "", "Á");
  45. replace_all(msg, 190, "", "É");
  46. replace_all(msg, 190, "", "Í");
  47. replace_all(msg, 190, "", "Ó");
  48. replace_all(msg, 190, "", "Ö");
  49. replace_all(msg, 190, "", "Ő");
  50. replace_all(msg, 190, "", "Ú");
  51. replace_all(msg, 190, "", "Ü");
  52. replace_all(msg, 190, "", "Ű");
  53.  
  54. if (id) players[0] = id; else get_players(players, count, "ch");
  55. {
  56. for (new i = 0; i < count; i++)
  57. {
  58. if (is_user_connected(players[i]))
  59. {
  60. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
  61. write_byte(players[i]);
  62. write_string(msg);
  63. message_end();
  64. }
  65. }
  66. }
  67. return PLUGIN_HANDLED;
  68. }