Can anyone help me please, i tried to fix it myself, but I couldn't.
I really need it...thanks
// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(43) : error 052: multi-dimensional arrays must be fully initialized
// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(49) : warning 217: loose indentation
// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(50) : warning 217: loose indentation
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define MAX_GROUPS 13
new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1] => Fondator <=",
"[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][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
"abcdefghijklmnopqrsu",
"abcdefghijmnopqrsu",
"abcdefghijmnopqrs",
"bcdefijmnopqrs",
"bcdefijmnopqr",
"bcdefijmnop",
"bcdefijmn",
"bcdefijm",
"bcdefij",
"bcdefj",
"abt",
"bt",
"b"
}
new g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
"abcdefghijklmnopqrstu",
"abcdefghijmnopqrstu",
"abcdefghijmnopqrst",
"abt",
"bt"
}
new g_groupFlagsValue[MAX_GROUPS]
new g_groupFlagsValueVIP[MAX_GROUPS] //am creeat un nou grup pe care pluginul trebuie sa il citeasca
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]) //citeste flagurile adminelor + vip
}
}
public cmdWho(id)
{
new players[32], inum, player, name[32], i, a
get_players(players, inum)
console_print(id, "-------------------------------")
console_print(id, "=========ADMINS ONLINE=========")
console_print(id, "-------------------------------")
for(i = 0; i < MAX_GROUPS; i++)
{
console_print(id, "[%d]%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]) //arata si adminii fara vip si pe cei cu vip
{
console_print(id, "%s", name)
}
}
}
console_print(id, "=========NUME SERVER=========")
console_print(id, "-------------------------------")
client_cmd(id,"toggleconsole")
return PLUGIN_HANDLED
}