[HELP]/admins <Show current admins online by ID, Name, Rank and Duty>
#1

Hello Fellow Scripters,
I have recently just come across the part of setting up my /admins bit in my script
This part basically just shows you the current admins online and if they are on duty or not
If anyone could help many thanks to you

pawn Code:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, " ** Admins Online: **");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1)
                    {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "%s: %s ( %s ) Duty: %s", pAdmin, sendername, playerid, pAOnDuty);
                        SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
                    }
                }
            }
        }
        return 1;
    }
This is what i want

pawn Code:
format(string, 256, "<Admin Rank>: <Name> ( ID ) Duty: <If they are on duty"
Yes i am a little embarrassed at my effort of scripting :S

Cheers, Steve
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)