Changed the amx_who ...but i still have the problem
So i have a vip plugin with free vip flag t , when the vip free is running the admins get an extra flag... and we can't see the online admins anymore.
If anyone can help me please.. i can't solve this damn problem
PHP Code:
#include <amxmisc>
#define MAX_GROUPS 13
new g_groupNames[MAX_GROUPS][] = {
"[1] Founders",
"[2] Owner",
"[3] Co-Owner",
"[4] Manager",
"[5] God",
"[6] Semi-god",
"[7] Super-moderator",
"[8] Moderator",
"[9] Administrator",
"[10] Helper",
"[11] Lady",
"[12] Vip",
"[13] Reserved name"
}
new g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrsu",
"abcdefghijmnopqrsu",
"abcdefghijmnopqrs",
"bcdefijmnopqrs",
"bcdefijmnopqr",
"bcdefijmnop",
"bcdefijmn",
"bcdefijm",
"bcdefij",
"bcdefj",
"abt",
"bt",
"b"
}
new g_groupFlagsVIP[MAX_GROUPS][] = {
"abcdefghijklmnopqrstu",
"abcdefghijmnopqrstu",
"abcdefghijmnopqrst",
"bcdefijmnopqrs",
"bcdefijmnopqr",
"bcdefijmnop",
"bcdefijmn",
"bcdefijm",
"bcdefij",
"bcdefj",
"abt",
"bt",
"b"
}
new g_groupFlagsValue[MAX_GROUPS]
new g_groupFlagsValueVIP[MAX_GROUPS]
public plugin_init()
{
register_plugin("amx_who", "1.0", "")
register_concmd("amx_who", "cmdWho")
for(new i = 0; i < MAX_GROUPS; i++)
{
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
g_groupFlagsValueVIP[i] = read_flags(g_groupFlagsVIP[i])
}
}
public cmdWho(id)
{
new players[32], inum, player, name[32], i, a
get_players(players, inum)
console_print(id, "------------------------------------------------------")
console_print(id, "---------||---------")
console_print(id, "------------------------------------------------------")
for(i = 0; i < MAX_GROUPS; i++)
{
console_print(id, "%s", g_groupNames[i])
for(a = 0; a < inum; ++a)
{
player = players[a]
get_user_name(player, name, 31)
if(get_user_flags(player) == g_groupFlagsValue[i] || get_user_flags(player) == g_groupFlagsValueVIP[i])
{
console_print(id, "%s", name)
}
}
}
console_print(id, "------------------------------------------------------")
console_print(id, "--------------||-------------")
console_print(id, "------------------------------------------------------")
return PLUGIN_HANDLED
}