SA-MP Forums Archive
ZCMD help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ZCMD help (/showthread.php?tid=273128)



ZCMD help - sampfans - 31.07.2011

I need ZCMD /admins cmd please give me pAdmin


Re: ZCMD help - Odyssey - 31.07.2011

pawn Код:
COMMAND:admins( playerid, params[ ] )
{
        new count = 0;
        new name[MAX_PLAYER_NAME];
                new string[128];
        //
                SendClientMessage(playerid, COLOR_WHITE, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Online Admins:");
                SendClientMessage(playerid, COLOR_WHITE, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
        for(new i = 0; i < MAX_PLAYERS; i++)
                {
                        if (IsPlayerConnected(i))
                        {

                            if(IsPlayerAdmin(i))
                            {
                                        GetPlayerName(i, name, sizeof(name));
                                        format(string, 256, "%s{FFFFFF}%d", name,i );
                                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                                count++;
                                }
                        }

                }
                if (count == 0)
                {
                SendClientMessage(playerid, COLOR_RED, "There are no admins online!");
                }
                SendClientMessage(playerid, COLOR_WHITE, "-=---=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
                return 1;
}
Is that what you want? It uses IsPlayerAdmin. But can be easily changed.