Reading From Y_INI Files
#8

This should work.
Код:
cmd(admins playerid, params[])
{
    SendClientMessage(playerid, COLOR_ADMIN, "Online Staff Members:");

    new count, string[62], aname[24];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i))
            continue;
        
        string[0] = EOS;
        switch(PlayerInfo[i][pAdminLevel])
        {
            case 1: strcat(string, "{10F441}Beta Tester");
            case 2: strcat(string, "{10F441}Moderator");
            case 3: strcat(string, "{33AA33}Administrator");
            case 4: strcat(string, "{FF0000}Senior Administrator");
            case 1337: strcat(string, "{FF0000}Head Administrator");
            default: continue;
        }

        GetPlayerName(i, aname, 24);
        format(string, sizeof (string), "%s(%d) - %s", aname, i, string);
        SendClientMessage(playerid, -1, string);
        count++;
    }
    if(count == 0)
        return SendClientMessage(playerid, COLOR_ERROR, "No online administrators found.");
    return 1;
}
If it doesn't, then there's probably something wrong with PlayerInfo[i][pAdminLevel].
Reply


Messages In This Thread
Reading From Y_INI Files - by Skillzz - 29.06.2016, 23:46
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 00:13
Re: Reading From Y_INI Files - by SkillNasr - 30.06.2016, 00:33
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 00:38
Re: Reading From Y_INI Files - by DTV - 30.06.2016, 01:25
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 12:20
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 21:06
Re: Reading From Y_INI Files - by Stinged - 30.06.2016, 21:14
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 22:09

Forum Jump:


Users browsing this thread: 1 Guest(s)