[Help] Reading data Y_INI Admins System
#1

Hi, I need to know how many administrators have my server, the variable is:

Код:
INI_Int ("AdminNivel" Info [playerid] [PAdmin]);
Need to know all types of Administrators, the ranges are from level 1 to level 6.
Need to know all types even if they are offline, please.

I give reputation.
Reply
#2

like a cmd /admins?
Reply
#3

pawn Код:
if (strcmp("/admins", cmdtext, true, 7) == 0)
    {
    new count = 0;
    new AllString[1000];
    new String[80];
   
    for ( new i;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsPlayerAdmin(i) == 0 && Info[i][PAdmin] > 0)
    {
    format(String, sizeof(String), "Administrator %s  (Level %i) \n\n", PlayerName(i), Info[i][PAdmin]);
    strcat(AllString, String);
    count ++;
    }
    else if(IsPlayerAdmin(i) == 1 && Info[i][PAdmin] > 0)
    {
    format(String, sizeof(String), "Administrator %s  (Level %i + RCON) \n\n", PlayerName(i), Info[i][PAdmin]);
    strcat(AllString, String);
    count ++;
    }
    }
    }
    if(count == 0)
    {
    strcat(AllString, "{FF0000}No administrator online!");
    }
    ShowPlayerDialog(playerid, 5555, DIALOG_STYLE_MSGBOX, "Online administrators", AllString, "OK", "");
    return 1;
    }
Reply
#4

^no, just..

1. get a user system
2. consider using a database
Reply
#5

Quote:
Originally Posted by Ada32
Посмотреть сообщение
^no, just..

1. get a user system
2. consider using a database
----------------------------------------------------------------

I think Y_INI read files without database is possible, you do not?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)