HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Screenshot"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Danon"
  7.  
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11.  
  12. register_concmd("amx_ss","admin_ss",ADMIN_KICK,"[Játékos neve]");
  13. }
  14.  
  15.  
  16. public admin_ss(id,level,cid)
  17. {
  18. if(!cmd_access(id,level,cid,2))
  19. return PLUGIN_HANDLED;
  20.  
  21. new argument[32]
  22. read_argv(1,argument,31)
  23.  
  24. new player = cmd_target(id,argument,31)
  25. new hostname[64], tname[32], usrip[32], timer[32], name[32];
  26. get_cvar_string("hostname",hostname,63);
  27. get_user_name(id, name, 31)
  28. get_user_name(player,tname,31);
  29. get_user_ip(player,usrip,31);
  30. get_time("%m/%d/%Y - %H:%M:%S", timer,31);
  31.  
  32. if(!player)
  33. return PLUGIN_HANDLED;
  34.  
  35. console_print(id, "* Screenshot lett neki keszitve:%s.", tname)
  36. client_print(0, print_chat, "* ADMIN %s Screenshot-ot készitett neki: %s.", name, tname)
  37. client_print(player, print_chat, "* Egy admin Screenshot-ot készitett neked !")
  38. client_print(player, print_chat, "* Nick: %s - IP-d: %s",tname,usrip)
  39. client_print(player, print_chat, "* Dátum Idő: %s - Szerver: %s",timer,hostname)
  40. client_cmd(player,"spk misc/antend;snapshot")
  41.  
  42. return PLUGIN_HANDLED
  43. }
  44.  
  45. public plugin_precache()
  46. {
  47. precache_sound("misc/antend.wav");
  48. }
  49. stock print_color(const id, const input[], any:...)
  50. {
  51. new count = 1, players[32]
  52. static msg[191]
  53. vformat(msg, 190, input, 3)
  54.  
  55. replace_all(msg, 190, "!g", "^4")
  56. replace_all(msg, 190, "!y", "^1")
  57. replace_all(msg, 190, "!t", "^3")
  58. replace_all(msg, 190, "", "á")
  59. replace_all(msg, 190, "", "é")
  60. replace_all(msg, 190, "", "í")
  61. replace_all(msg, 190, "", "ó")
  62. replace_all(msg, 190, "", "ö")
  63. replace_all(msg, 190, "", "ő")
  64. replace_all(msg, 190, "", "ú")
  65. replace_all(msg, 190, "", "ü")
  66. replace_all(msg, 190, "", "ű")
  67. replace_all(msg, 190, "", "Á")
  68. replace_all(msg, 190, "", "É")
  69. replace_all(msg, 190, "", "Í")
  70. replace_all(msg, 190, "", "Ó")
  71. replace_all(msg, 190, "", "Ö")
  72. replace_all(msg, 190, "", "Ő")
  73. replace_all(msg, 190, "", "Ú")
  74. replace_all(msg, 190, "", "Ü")
  75. replace_all(msg, 190, "", "Ű")
  76.  
  77. if (id) players[0] = id; else get_players(players, count, "ch")
  78. {
  79. for (new i = 0; i < count; i++)
  80. {
  81. if (is_user_connected(players[i]))
  82. {
  83. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  84. write_byte(players[i])
  85. write_string(msg)
  86. message_end()
  87. }
  88. }
  89. }
  90. return PLUGIN_HANDLED
  91. }
  92.