GetPlayerName
#2

pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_LIGHTGREEN, "** Administrators **");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1338 || PlayerInfo[i][pTester] >= 1)
                {
                    new admtext[64];
                    if(PlayerInfo[i][pAppearList] == 1)
                    {
                        if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
                        else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Head Admin"; }
                        else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Head Admin"; }
                        else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Senior Admin"; }
                        else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Senior Admin"; }
                        else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Administrator"; }
                        else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Admin"; }
                        else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
                        else if(PlayerInfo[i][pTester] == 2) { admtext = "Senior Tester"; }
                        else if(PlayerInfo[i][pTester] == 1) { admtext = "Helper"; }
                        else { admtext = "Unknown Rank"; }
                    }
                    GetPlayerName(i, sendername, sizeof(sendername));
                    sendername[strfind(sendername,"_")] = ' ';
                    if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1)
                    {
                        format(string, sizeof(string), "%s %s (ID:%d) [Level: ] { Off Duty }", admtext, sendername, i);
                        SendClientMessage(playerid, COLOR_GREY, string);
                    }
                    else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1)
                    {
                            format(string, sizeof(string), "#COL_LIME %s %s (ID:%d) [Level: ] { On Duty }", admtext, sendername, i);
                            SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
                    }
                }
            }
        }
    }
    return 1;
}
Should work fine.
Reply


Messages In This Thread
<fixed> - by Kingunit - 25.01.2011, 18:03
Re: GetPlayerName - by Kaylux - 25.01.2011, 18:26
Re: GetPlayerName - by Kingunit - 25.01.2011, 18:39
Re: GetPlayerName - by Kingunit - 25.01.2011, 18:46
Re: GetPlayerName - by Jefff - 25.01.2011, 19:33
Re: GetPlayerName - by Kingunit - 25.01.2011, 19:36
<fixed> - by Kingunit - 25.01.2011, 21:12
Re: GetPlayerName - by Mokerr - 25.01.2011, 21:39
<fixed> - by Kingunit - 25.01.2011, 21:59
Re: GetPlayerName - by Mokerr - 25.01.2011, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)