Post by zorox1x on Apr 14, 2019 5:56:34 GMT
Hello again doni.
Yes ive tried it on the top of plugins and still same , it only works if i only add admin.amxx
This is Vip part code in public plugin_init below
Yes ive tried it on the top of plugins and still same , it only works if i only add admin.amxx
This is Vip part code in public plugin_init below
// Hattrick
//
new cfgs[128];
get_configsdir(cfgs, 127)
add(cfgs, 127, "/vips.ini")
new file = fopen(cfgs, "r")
if (file)
{
new line[512], name[64], pwd[64], flags[64]
while (!feof(file))
{
fgets(file, line ,511)
trim(line)
if (!line[0] || line[0] == '/' || line[0] == ';' || line[0] == '#')
continue;
new r=parse(line, name,63,pwd,63,flags,63)
if (r < 3) continue;
ArrayPushString(g_vname, name)
ArrayPushString(g_vpwd, pwd)
ArrayPushString(g_vflags, flags)
}
fclose(file)
}
public client_authorized(id)
{
static pwd[32], field[32], reqname[64], reqpwd[64], reqflags[64], i;
get_cvar_string("amx_password_field", field, 31);
get_user_ip(id, g_ip[id], charsmax(g_ip[]), 1);
get_user_name(id, g_playername[id], charsmax(g_playername[]));
get_user_authid(id, g_steam[id], charsmax(g_steam[]));
get_user_info(id, field, pwd, 31);
g_doubledamage[id] = false;
g_vip[id] = false;
g_infector[id] = false;
for (i = 0; i < ArraySize(g_vname); i++)
{
ArrayGetString(g_vname, i, reqname, 63);
ArrayGetString(g_vpwd, i, reqpwd, 63);
ArrayGetString(g_vflags, i, reqflags, 63);
if (equali(g_playername[id], reqname))
{
if (equali(pwd, reqpwd) && strlen(pwd) > 0)
{
g_vip[id] = true;
formatex(g_vip_flags[id], charsmax(g_vip_flags[]), "%s", reqflags);
break;
}
else
{
server_cmd("kick #%d INVALiD ViP PASSWORD.", get_user_userid(id));
break;
}
}
if (equali(g_ip[id], reqname) || equali(g_steam[id], reqname))
{
g_vip[id] = true;
formatex(g_vip_flags[id], charsmax(g_vip_flags[]), "%s", reqflags);
break;
}
}
loadPoints(id);
}