#include <amxmodx>
// Если включено, то сообщение будет показываться только администрации.
// If enabled, the message will only be shown to admins.
#define ONLY_FOR_ADMINS ADMIN_BAN
public plugin_init()
{
register_plugin("Connect Info", "10.10.2018", "w0w");
}
public client_putinserver(id)
{
if(is_user_bot(id) || is_user_hltv(id)) return;
new szIP[MAX_IP_LENGTH]; get_user_ip(id, szIP, charsmax(szIP), 1);
new szAuthID[MAX_AUTHID_LENGTH]; get_user_authid(id, szAuthID, charsmax(szAuthID));
#if defined ONLY_FOR_ADMINS
for(new i; i <= MaxClients; i++)
{
if(~get_user_flags(i) & ONLY_FOR_ADMINS)
continue;
client_print_color(i, print_team_red, "^3Ник: ^4%n ^1| ^3IP: ^4%s ^1| ^3ID: ^4%s", id, szIP, szAuthID);
}
#else
client_print_color(0, print_team_red, "^3Ник: ^4%n ^1| ^3IP: ^4%s ^1| ^3ID: ^4%s", id, szIP, szAuthID);
#endif
}
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 | #include <amxmodx> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Author" #define MAX_NICKNAME_LENGHT 32 #define MAX_IP_LENGHT 16 #define MAX_STEAM_ID_LENGHT 36 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); } public client_connect(id) { new user_nickname[MAX_NICKNAME_LENGHT], user_ip[MAX_IP_LENGHT], user_steam_id[MAX_STEAM_ID_LENGHT]; get_user_name(id, user_nickname, charsmax(user_nickname)); get_user_ip(id, user_ip, charsmax(user_ip)); get_user_authid(id, user_steam_id, charsmax(user_steam_id)); client_print_color(0, print_team_default, "^3Ник: ^4%s ^1| ^3IP: ^4%s ^1| ^3ID: ^4%s", user_nickname, user_ip, user_steam_id); } |
#include <amxmodx>
#if AMXX_VERSION_NUM < 183
new MaxClients
#include <colorchat>
#define MAX_IP_LENGTH 16
#define MAX_AUTHID_LENGTH 64
#endif
#define ONLY_FOR_ADMINS ADMIN_BAN
public plugin_init()
{
register_plugin("Connect Info", "10.10.2018", "w0w");
#if AMXX_VERSION_NUM < 183
MaxClients = get_maxplayers();
#endif
}
public client_putinserver(id)
{
if(is_user_bot(id) || is_user_hltv(id)) return;
new szIP[MAX_IP_LENGTH]; get_user_ip(id, szIP, charsmax(szIP), 1);
new szAuthID[MAX_AUTHID_LENGTH]; get_user_authid(id, szAuthID, charsmax(szAuthID));
#if defined ONLY_FOR_ADMINS
for(new i; i <= MaxClients; i++)
{
if(~get_user_flags(i) & ONLY_FOR_ADMINS) continue;
client_print_color(i, print_team_red, "^3Ник: ^4%n ^1| ^3IP: ^4%s ^1| ^3ID: ^4%s", id, szIP, szAuthID);
}
#else
client_print_color(0, print_team_red, "^3Ник: ^4%n ^1| ^3IP: ^4%s ^1| ^3ID: ^4%s", id, szIP, szAuthID);
#endif
}