SA-MP Forums Archive
Show STAFF ONLINE - /staff - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Show STAFF ONLINE - /staff (/showthread.php?tid=491542)



Show STAFF ONLINE - /staff - Proxysteve - 31.01.2014

I would like a script that when you type /staff shows the list of staff currently online.
Help me please I'm italian...


Re: Show STAFF ONLINE - /staff - Mr.Faqahat - 31.01.2014

are you using any admin system?


Re: Show STAFF ONLINE - /staff - itsCody - 31.01.2014

What are you using as a save system?


Re: Show STAFF ONLINE - /staff - EmilLykke - 31.01.2014

Let me make it.

pawn Код:
CMD:staffonline(playerid, params[])
    {
        new string[125];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerAdmin(i))
            {
                format(string, sizeof(string), "%s is currently an administrator.");
            }
        }
        SendClientMessage(playerid, WHITE, string);
        return 1;
    }



Re: Show STAFF ONLINE - /staff - itsCody - 31.01.2014

pawn Код:
#define DIALOG_STAFF 1 // top of your script

CMD:staff(playerid, params[])
{
    new count, string[128];

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!(1 <= PlayerInfo[i][pAdmin] <= 4)) continue;
        format(string, sizeof(string), "%s%i) %s[%i] (Level %i)\n", string, ++count, PlayerName(i), i, PlayerInfo[i][pAdmin]);
    }
    if(!count)
    {
        ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_MSGBOX, "Online Admins", "There are no admins online", "OK", "");
        return 1;
    }
    else
        ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
    return true;
}
Just edit
PlayerInfo[i][pAdmin] with your admin thing


Re: Show STAFF ONLINE - /staff - Proxysteve - 31.01.2014

not function