Help with dini
#1

I want to list the admin accounts? Could anyone tell me how to do it?
Reply
#2

You can only do that by saving in a file all Admin Names and then loop through the file. The best eay is by using MySQL/SQLite. Dini is too old and inefficient.
Reply
#3

I made this command. Is this right?
pawn Код:
CMD:oadmin(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin]< 100001) return SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use this command!");
    foreach(Player, i)
    {
        for(new i = 0; i < MAX_PLAYER_NAME; i++)
        {
            format(string, sizeof(string), "users/%s.ini", i);
            new alevel = dini_Int(string, "AdminLvl");
            new las = dini_Int(string, "LastLogin");
            if(alevel > 0)
            {
                format(string, sizeof(string), " Name- %s Level- %s LastLogin- %s", i, alevel, las);
                SendClientMessage(playerid, COLOR_WHITE, string);
                return 1;
            }
        }
    }
    return 1;
}
Reply
#4

That will not work. Are your admins called "1" "2" "3" to "23"?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)