Не проверял #define ADMIN_FLAG ADMIN_BAN флаг доступа к команде amx_real_nick, которая выведет реальные ники
В amxx.cfg
add_admin_real_nick "SteamID" "Nick"
для каждого админа
Code
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Real Nick"
#define VERSION "0.1.0"
#define AUTHOR "PomanoB"
#define ADMIN_FLAG ADMIN_BAN
new Trie:g_realNick
new g_maxplayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_srvcmd("add_admin_real_nick", "cmdAddNick")
register_clcmd("amx_real_nick", "cmdRealAdmin", ADMIN_FLAG, " - display real admin names")
g_realNick = TrieCreate()
g_maxplayers = get_maxplayers()
}
public cmdAddNick()
{
new steamid[32], nick[32]
read_argv(1, steamid, 31)
read_argv(2, nick, 31)
TrieSetString(g_realNick, steamid, nick)
}
public cmdRealAdmin(id)
{
if (get_user_flags(id)&ADMIN_FLAG)
{
new i, steamid[32], nick[32], realName[32]
for (i = 1; i <= g_maxplayers; i++)
{
if (is_user_connected(i) && is_user_admin(i))
{
get_user_name(i, nick, 31)
get_user_authid(i, steamid, 31)
if (TrieKeyExists(g_realNick, steamid))
{
TrieGetString(g_realNick, steamid, realName, 31)
client_print(id, print_console, "%s (%s)", nick, realName)
}
}
}
}
return PLUGIN_HANDLED
}