Advertisement
Guest User

NFO

a guest
Feb 1st, 2015
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <geoip>
  3.  
  4. #define PLUGIN "INFO PLAYER"
  5. #define VERSION "1.1"
  6. #define AUTHOR "uNknow"
  7.  
  8. new pcvar_show
  9. new pcvar_nfo
  10.  
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. register_clcmd("say .nfo","nfo")
  16. register_clcmd("say /nfo","nfo")
  17.  
  18. pcvar_show = register_cvar("amx_msg","1") // 1 = chat , 0 = OFF, 2 = HUDMSG //
  19. pcvar_nfo = register_cvar("amx_privat_nfo","1") // 1 = Show player NFO , 0 = OFF //
  20.  
  21. set_task(40.0, "cvar1", 0, _, _, "b",1)
  22. }
  23.  
  24. public nfo(id)
  25. {
  26. new name[33]
  27. new ip[33]
  28. new authid[33]
  29. new country[33]
  30.  
  31. get_user_name(id, name, 32)
  32. get_user_ip(id, ip, 32)
  33. get_user_authid(id, authid, 32)
  34. geoip_country(ip, country)
  35.  
  36. chat_color(id, "!gNick-ul tau este: !team %s", name)
  37. chat_color(id, "!gIp-ul tau este: !team %s", ip)
  38. chat_color(id, "!gAuthId-ul tau este: !team %s", authid)
  39. chat_color(id, "!gTara din care provi este !team %s", country)
  40.  
  41. if(get_pcvar_num(pcvar_nfo) == 1)
  42. {
  43. chat_color(0, "!gIp-ul jucatorului !team %s !geste: %s", name, ip)
  44. chat_color(0, "!gTara din care provine jucatorul !team %s !g este !team %s", name, country)
  45. }
  46. }
  47. public cvar1(id)
  48. {
  49. if(get_pcvar_num(pcvar_show) == 1)
  50. {
  51. chat_color(id, "!gScrie in chat !team.nfo !gpentru a vedea informatii despre tine!")
  52. }
  53. if(get_pcvar_num(pcvar_show) == 2)
  54. {
  55. set_hudmessage(0, 255, 0, 1.0, -1.0)
  56. show_hudmessage(id, "Scrie in chat .nfo pentru a vedea informatii despre tine!")
  57. }
  58. }
  59. stock chat_color(const id, const input[], any:...)
  60. {
  61. new count = 1, players[32]
  62. static msg[191]
  63. vformat(msg, 190, input, 3)
  64.  
  65. replace_all(msg, 190, "!g", "^4")
  66. replace_all(msg, 190, "!y", "^1")
  67. replace_all(msg, 190, "!team", "^3")
  68.  
  69. if (id) players[0] = id; else get_players(players, count, "ch")
  70. {
  71. for (new i = 0; i < count; i++)
  72. {
  73. if (is_user_connected(players[i]))
  74. {
  75. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  76. write_byte(players[i]);
  77. write_string(msg);
  78. message_end();
  79. }
  80. }
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement