Online and Offline admins
#15

Quote:
Originally Posted by ShoortyFl
Посмотреть сообщение
This is something that i want it to look alike, i found the picture online

Here is mine:

pawn Код:
CMD:admins(playerid, params[])
{
    new count = 0, name[24], stringON[128], stringOFF[258];
    SendClientMessage(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" Administrators Online");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] >= 1)
        {
            if(aDuty[i] == 1)
            {
                GetPlayerName(i, name, sizeof(name));
                format(stringON, sizeof(stringON), "%s %s [ID: %i] [{33FF00}ON-DUTY{FFFFFF}]", GetAdminRankCOLOR(i), GetName(i), i);
                SendClientMessage(playerid, -1, stringON);
                count ++;
            }
            else if(aDuty[i] == 0)
            {
                GetPlayerName(i, name, sizeof(name));
                format(stringOFF, sizeof(stringOFF), "%s %s [ID: %i] [{FF0000}OFF-DUTY{FFFFFF}]", GetAdminRankCOLOR(i), GetName(i), i);
                SendClientMessage(playerid, -1, stringOFF);
                count ++;
            }
        }
    }

    if(count == 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "[!] No Administrators Online");
    }
    return 1;
}
pawn Код:
stock GetAdminRankCOLOR(i)
{
    new tmpString[32];
    switch(PlayerInfo[i][pAdminLevel])
    {
        case 0: format(tmpString, sizeof(tmpString), "Player");
        case 1: format(tmpString, sizeof(tmpString), "{FF0000}A1{FFFFFF}");
        case 2: format(tmpString, sizeof(tmpString), "{FF0000}A2{FFFFFF}");
        case 3: format(tmpString, sizeof(tmpString), "{FF0000}A3{FFFFFF}");
        case 4: format(tmpString, sizeof(tmpString), "{FF0000}A4{FFFFFF}");
        case 5: format(tmpString, sizeof(tmpString), "{FF0000}A5{FFFFFF}");
        case 6: format(tmpString, sizeof(tmpString), "{FF0000}A6{FFFFFF}");
        case 7: format(tmpString, sizeof(tmpString), "{FF0000}A7{FFFFFF}");
        default: format(tmpString, sizeof(tmpString), "Undefined Admin");
    }
    return tmpString;
}
pawn Код:
stock GetName(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
Reply


Messages In This Thread
Online and Offline admins - by ShoortyFl - 05.10.2014, 16:43
Re: Online and Offline admins - by ZBits - 05.10.2014, 16:48
Re: Online and Offline admins - by ShoortyFl - 05.10.2014, 16:58
Re: Online and Offline admins - by Ox1gEN - 05.10.2014, 17:00
Re: Online and Offline admins - by ShoortyFl - 05.10.2014, 17:01
AW: Online and Offline admins - by Nero_3D - 05.10.2014, 17:19
Re: Online and Offline admins - by ShoortyFl - 05.10.2014, 17:22
AW: Online and Offline admins - by Nero_3D - 05.10.2014, 17:31
Re: Online and Offline admins - by ShoortyFl - 05.10.2014, 19:01
Re: Online and Offline admins - by Shady - 05.10.2014, 22:44
Re: Online and Offline admins - by ShoortyFl - 05.10.2014, 23:23
Re: Online and Offline admins - by ZBits - 05.10.2014, 23:37
Re: Online and Offline admins - by Abagail - 06.10.2014, 00:50
Re: Online and Offline admins - by ShoortyFl - 06.10.2014, 09:10
Re: Online and Offline admins - by MillenniumG - 06.10.2014, 10:55
Re: Online and Offline admins - by ShoortyFl - 06.10.2014, 17:34
Re: Online and Offline admins - by Jefff - 06.10.2014, 21:21
AW: Re: Online and Offline admins - by lcp9 - 06.10.2014, 21:30
Re: Online and Offline admins - by ShoortyFl - 06.10.2014, 22:53
Re: Online and Offline admins - by Eth - 06.10.2014, 23:01

Forum Jump:


Users browsing this thread: 2 Guest(s)