something like this should do:
PHP Code:
#include <amxmodx>
#define PLUGIN "Users list on motd"
#define VERSION "1.0"
#define AUTHOR "Sonedit test 8"
new flag[]="abcdefghijklmnopqrstu!!!yz"
new g_maxplayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("adminlist", "clcmd_adminlist")
register_clcmd("say adminlist", "clcmd_adminlist")
register_clcmd("say /adminlist", "clcmd_adminlist")
g_maxplayers = get_maxplayers()
}
public clcmd_adminlist(id)
{
static i, l, strtemp[2048], strtemp2[32]
strtemp=""
for (i=0;i<=g_maxplayers;i++)
{
if (!is_user_connected(i))
continue
get_user_name(i, strtemp2, charsmax(strtemp2))
add(strtemp, charsmax(strtemp), strtemp2, charsmax(strtemp2))
add(strtemp, charsmax(strtemp), " flags: ", strlen(" flags: "))
for (l=0;l<26;l++)
if (get_user_flags(i,0)&(1<<l))
add(strtemp, charsmax(strtemp), flag[l], 1)
}
add(strtemp, charsmax(strtemp), "^n", 1)
show_motd(id, strtemp, "Admin or Vip List")
return PLUGIN_HANDLED
}
Not tested.
To understand what " if (get_user_flags(i,0)&(1<<l))" does, check amxmodx.inc for info, everything will be crystal clear for you, if you will do that.
__________________