Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 1ltulud4t82s0 dodana przez Kawon, 14.11.2012 23:27
AMX IP - zmienne
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79.
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <netdb> #define PLUGIN "AMX IP - zmienne" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" enum UserInfo { UserIP[16], UserAuth[25], UserRevDNS[30], bool:UserDynamicIP } new userinfo[33][UserInfo] new HostName[64], Map[33], MaxPlayers, IP[25] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("amx_ip", "cl_amx_ip") register_clcmd("say /ip", "cl_amx_ip") get_cvar_string("hostname", HostName, 63) get_mapname(Map, 32) get_user_ip(0, IP, 24) MaxPlayers = get_maxplayers() } public client_authorized(id) { get_user_ip(id, userinfo[id][UserIP], 15, 1) get_user_authid(id, userinfo[id][UserAuth], 24) netdb_gethostbyaddr(userinfo[id][UserIP], userinfo[id][UserRevDNS], 29) if(containi(userinfo[id][UserRevDNS], "dynamic") != -1 || containi(userinfo[id][UserRevDNS], "adsl") != -1) { userinfo[id][UserDynamicIP] = true } } public client_disconnect(id) { userinfo[id][UserIP] = '^0'; userinfo[id][UserAuth] = '^0'; userinfo[id][UserRevDNS] = '^0'; userinfo[id][UserDynamicIP] = false; } public cl_amx_ip(id) { console_print(id, "") console_print(id, "Nazwa serwera : %s", HostName) console_print(id, "Adres IP : %s", IP) console_print(id, "Mapa : %s", Map) console_print(id, "Gracze : %d aktywnych (%d maksymalnie)", get_playersnum(1), MaxPlayers) console_print(id, "") new Players[32], Num, Name[33] get_players(Players, Num) for(new i = 0; i < Num; i++) { if(!is_user_connected(Players[i])) continue get_user_name(Players[i], Name, 32) console_print(id, "# %d ^"%s^" : %s, %s%s", i + 1, Name, userinfo[Players[i]][UserAuth], userinfo[Players[i]][UserIP], (userinfo[Players[i]][UserDynamicIP]) ? ", dynamiczny adres IP" : "") } return PLUGIN_HANDLED }
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011