30.09.2018, 10:06
PHP код:
CMD:admins(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new string[10000];
new j;
j = GetPlayerPoolSize();
for(new id=0;id<=j;id++)
{
if(IsPlayerConnected(id))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(id, sendername, sizeof(sendername));
format(iname,sizeof(iname),"%s.ini",sendername);
if(dini_Int(iname,"Admin")!=0)
{
new admin[100];
if(dini_Int(iname,"Admin")== 1) { admin = "Админ ниво [ 1 ]"; }
else if(dini_Int(iname,"Admin")== 2) { admin = "Админ ниво [ 2 ]"; }
else if(dini_Int(iname,"Admin")== 3) { admin = "Админ ниво [ 3 ]"; }
else if(dini_Int(iname,"Admin")== 4) { admin = "Админ ниво [ 4 ]"; }
else if(dini_Int(iname,"Admin")== 5) { admin = "[ Гл.Администратор ]"; }
else if(dini_Int(iname,"Admin")== 6) { admin = "[ Заместник-началник ]"; }
else if(dini_Int(iname,"Admin")== 7) { admin = "[ Собственик ]"; }
new strpart[256];
format(strpart, 256, "{FFFFFF}%s {FF0000}%s (ID: %d)\n", admin, sendername, id);
strins(string,strpart,strlen(string));
}
}
}
ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "Онлайн Администратори", string,
"ОК","");
}
return 1;
}