/admins command
#1

I need /admin command if someone writing this command he'll see all of the /online/ admins.
Thanks!
Reply
#2

http://www.******.ba/search?q=samp+o...iw=815&bih=653

EDIT: I don't want to be rude!

pawn Code:
COMMAND:admins(playerid,params[])
{
    SendClientMessage(playerid, ORANGE, " ");
    SendClientMessage(playerid, ORANGE, "----' Online Admins '----");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(pInfo[i][Adminlevel] >= 1 || pInfo[i][Adminlevel] <= 5)
            {
                new admtext[64], id[MAX_PLAYER_NAME], string[256];
                if(pInfo[i][Adminlevel] == 1) {admtext = "Level: 1 (Administrator)";}
                else if(pInfo[i][Adminlevel] == 2) {admtext = "Level: 2, (Master Administrator)";}
                else if(pInfo[i][Adminlevel] == 3) {admtext = "Level: 3, (Lead Moderator)";}
                else if(pInfo[i][Adminlevel] == 4) {admtext = "Level: 4, (Master Moderator)";}
                else if(pInfo[i][Adminlevel] == 5) {admtext = "Level: 5, (Owner)";}
                else if(IsPlayerAdmin(i)) {admtext = "RCON Administrator";}
                else {admtext = "No admins online";}
                GetPlayerName(i, id, sizeof(id));
                format(string, 256, "%s ( %s )", id, admtext);
                SendClientMessage(playerid, GREEN, string);
            }
        }
    }
    return 1;
}
Change pInfo[i][Adminlevel] to your admin variable!
Reply
#3

be helpful man u dont think he tried that already
Code:
CMD:admins(playerid, params[])
{
            new string[128];
	        new count = 0;
			SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|");
			{
			  if(PlayerInfo[playerid][pAdminLevel] == 1)
			  {

						format(string, 256, "Administrator: %s - [Administrator: %s]",RPALN(playerid), RPN(playerid));
						SendClientMessage(playerid, COLOR_WHITE, string);
			  			count++;
			   }
			}
                        return 1;
}
Reply
#4

Well if he tried that he wouldn't ask here because that was the way i learned!
Reply
#5

pawn Code:
CMD:admins(playerid, params[])
{
            new string[128];
            new count = 0;
            SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|");
            {
              if(IsPlayerAdmin(playerid))
              {

                        format(string, sizeof(string), "Administrator: %s ",adminid(admin)); // replace it with your admin variable
                        SendClientMessage(playerid, -1, string);
                        count++;
               }
            }
                        return 1;
}
They needs to be spoon-feeded.
And please whenever you copy-paste code from your scripts, atleast try to change your variable to their adjustments.
Reply
#6

Hey Man Use LuxAdmin There u can get it
Reply
#7

Quote:
Originally Posted by AtItsMax
View Post
pawn Code:
CMD:admins(playerid, params[])
{
            new string[128];
            new count = 0;
            SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|");
            {
              if(IsPlayerAdmin(playerid))
              {

                        format(string, sizeof(string), "Administrator: %s ",adminid(admin)); // replace it with your admin variable
                        SendClientMessage(playerid, -1, string);
                        count++;
               }
            }
                        return 1;
}
They needs to be spoon-feeded.
And please whenever you copy-paste code from your scripts, atleast try to change your variable to their adjustments.
Warning:
Quote:

warning 203: symbol is never used: "admins"

The command is not working IG.
Reply
#8

pawn Code:
CMD:admins(playerid, params[])
{
    foreach(Player, i)
    {
        new level[16], string[256], name[MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));

        if(pInfo[i][Admin] > 0)
        {
            switch(pInfo[i][Admin])
            {
                case 1: level = "Admin Level 1";
                case 2: level = "Admin Level 2";
                case 3: level = "Admin Level 3";
                case 4: level = "Lead Admin";
                case 1337: level = "Owner";
            }
            format(string, sizeof(string), ""COL_BLUE"%s - "COL_WHITE"%s\n", level, name);
            ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "Admins online (Level - Nick)", string, "Close", "");
        }
    }
    return 1;
}
im using this , and its dialog based
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)