Huseyn
Компетентный
Здравствуйте, у меня тут такая проблема.. Я хочу так сделать что бы при входе админа 7-го лвл, не написало другим админам.. только что бы мне показало..
Помогите с меня ++
вот код :
Помогите с меня ++
вот код :
PHP:
forward AloginAuth(playerid, inputtext[]);
public AloginAuth(playerid, inputtext[])
{
new rows, fields;
cache_get_data(rows, fields);
if(!rows)
{
SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Неверный пароль");
SetPVarInt(playerid, "attempt_pass", GetPVarInt(playerid, "attempt_pass") + 1);
if(GetPVarInt(playerid, "attempt_pass") > 3)
{
DeletePVar(playerid, "attempt_pass");
SKick(playerid, 2112);
}
}
else
{
new string[144];
AdminLogged[playerid] = true;
PI[playerid][pAdmin] = cache_get_row_int(0, 1, dbHandle);
AdminInfo[playerid][admGoto] = cache_get_row_int(0, 6, dbHandle);
AdminInfo[playerid][admGethere] = cache_get_row_int(0, 7, dbHandle);
AdminInfo[playerid][admSpectate] = cache_get_row_int(0, 8, dbHandle);
AdminInfo[playerid][admTimeMin] = cache_get_row_int(0, 9, dbHandle);
static const Admin_Names[7][50] = {"{eee515}[A-1]","{eee515}[A-2]","{eee515}[A-3]","{009900}[A-4]","{009900}[A-5]","{FF0000}[A-6]","{ff5700} "};
if(PI[playerid][pSex] == 1) format(string, sizeof(string), "[A] %s {f5e20d}%s[%i] вошёл в систему администратирования", Admin_Names[PI[playerid][pAdmin]-1], GetName(playerid), playerid);
else format(string, sizeof(string), "[A] %s {f5e20d}%s[%i] вошла в систему администратирования", Admin_Names[PI[playerid][pAdmin]-1], GetName(playerid), playerid);
SendAdminMessage(COLOR_WHITE, string);
new day, month, year;
getdate(year, month, day);
mysql_format(dbHandle, string, 144, "UPDATE "T_ADMIN" SET `last_connect` = '%d.%d.%d' WHERE `name` = '%s' LIMIT 1", day, month, year, GetName(playerid));
mysql_tquery(dbHandle, string, "", "");
for(new i; i < 10; i++) TextDrawShowForPlayer(playerid, CheatText[i]);
}
return 1;
}
