nedd help in /admins cmd
#1

i want sthg like this in my server:

im using ladmin and this is what /admins cmd is like in my gamemode:
Код HTML:
CMD:admins(playerid,params[]) {
    #pragma unused params
	new Count[2], i, string[128];
	for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	{
		if(PlayerInfo[i][Level] > 0) Count[0]++;
		if(IsPlayerAdmin(i)) Count[1]++;
	}

    #if defined HIDE_ADMINS
	if(PlayerInfo[playerid][Level] == 0) {
		if(Count[0] >= 1) {
			format(string, sizeof(string), "There are %d Administrators online. Use /report <id> <reason> if you suspect a player of cheating", Count[0]);
			return SendClientMessage(playerid, blue, string);
		} else return SendClientMessage(playerid, blue, "No Administrators online");
	}
	#endif

    if( (Count[0] == 0 && Count[1] == 0) || (Count[0] == 0 && Count[1] >= 1 && PlayerInfo[playerid][Level] == 0) ) return SendClientMessage(playerid, blue, "No Administrators online");
    if(Count[0] == 1) {
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[i][Level] > 0) {
   format(string, sizeof(string), "Admin: (%d)%s [%d]", i, PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
		}
	}

 	if(Count[0] > 1) {
	    new x; format(string, sizeof(string), "Admins: ");
	    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[i][Level] > 0)
		{
			format(string,sizeof(string),"%s(%d)%s [%d]",string,i,PlayerName2(i),PlayerInfo[i][Level]);
			x++;
			if(x >= 5) {
			    SendClientMessage(playerid, blue, string); format(string, sizeof(string), "Admins: "); x = 0;
			}
			else format(string, sizeof(string), "%s,  ", string);
	    }
		if(x <= 4 && x > 0) {
			string[strlen(string)-3] = '.';
		    SendClientMessage(playerid, blue, string);
		}
	}

	if( (Count[1] == 1) && (PlayerInfo[playerid][Level] > 0) ) {
	    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
			format(string, sizeof(string), "RCON Admin: (%d)%s", i, PlayerName2(i)); SendClientMessage(playerid, COLOR_WHITE, string);
		}
	}
	if(Count[1] > 1) {
 		new x; format(string, sizeof(string), "RCON Admins: ");
	    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i))
		{
			format(string,sizeof(string),"%s(%d)%s",string,i,PlayerName2(i));
			x++;
			if(x >= 5) {
				SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "RCON Admins: "); x = 0;
			}
			else format(string, sizeof(string), "%s,  ", string);
	    }
		if(x <= 4 && x > 0) {
			string[strlen(string)-3] = '.';
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
	}
	return 1;
}
so plz can u help me make it like the picture
Reply
#2

This is the /admins command from LuxurioN™'s LuxAdmin script.
Maybe this helps you.
Reply
#3

If you want something like that in your server just use an admin filterscript. I use XtremeAdmin.
Reply
#4

yes i know it's in lux admin but idk how to remove ladmin from my gamemode it's almost connected to everything in my script so can anyone help me to make cmd:/admins like that !!!
Reply
#5

here, from my gamemode, just edit it!
pawn Код:
YCMD:admins(playerid, params[], help)
{
    #pragma unused help
    #pragma unused params
    new aMsg[MAX_PLAYER_NAME];
    SendClientMessage(playerid, COLOR_KRED, "<~~ Administrators Online ~~>");
    foreach(Player, i)
    if(PlayerInfo[i][pAdmin] == 1)
    {
        format(aMsg, 127, "Gamemaster: %s", GetName(i));
        SendClientMessage(playerid, COLOR_LIGHTBLUE, aMsg);
    }
    else if(PlayerInfo[i][pAdmin] == 2)
    {
        format(aMsg, 127, "Administrator: %s", GetName(i));
        SendClientMessage(playerid, COLOR_LIGHTBLUE, aMsg);
    }
    else if(PlayerInfo[i][pAdmin] == 3)
    {
        format(aMsg, 127, "Owner: %s", GetName(i));
        SendClientMessage(playerid, COLOR_LIGHTBLUE, aMsg);
    }
    return 1;
}
Reply
#6

can anyone help me fix this when i compile it works but when i do/admins it don't:
Код HTML:
CMD:admins(playerid,params[]) {
    #pragma unused params
	new Count[2], i, string[128];
	for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	{
		if(PlayerInfo[i][Level] > 0) Count[0]++;
		if(IsPlayerAdmin(i)) Count[1]++;
	}

    #if defined HIDE_ADMINS
	if(PlayerInfo[playerid][Level] == 0) {
		if(Count[0] >= 1) {
			format(string, sizeof(string), "There are %d Administrators online. Use /report <id> <reason> if you suspect a player of cheating", Count[0]);
			return SendClientMessage(playerid, blue, string);
		} else return SendClientMessage(playerid, blue, "No Administrators online");
	}
	#endif

	new aMsg[MAX_PLAYER_NAME];
    SendClientMessage(playerid, red, "<~~ Administrators Online ~~>");
    if(IsPlayerConnected(i) && IsPlayerAdmin(i))
	if(PlayerInfo[playerid][Level] == 1)
    {
	format(string, sizeof(string), "Admin: %s [%d]", PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
    return SendClientMessage(playerid, red, aMsg);
    }
	if(PlayerInfo[playerid][Level] == 2)
    {
	format(string, sizeof(string), "Admin: %s [%d]", PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
    return SendClientMessage(playerid, red, aMsg);
    }
    if(PlayerInfo[playerid][Level] == 3)
    {
	format(string, sizeof(string), "Admin: %s [%d]", PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
    return SendClientMessage(playerid, red, aMsg);
    }
    if(PlayerInfo[playerid][Level] == 4)
    {
	format(string, sizeof(string), "Admin: %s [%d]", PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
    return SendClientMessage(playerid, red, aMsg);
    }
    if(PlayerInfo[playerid][Level] == 5)
    {
	format(string, sizeof(string), "Admin: %s [%d]", PlayerName2(i), PlayerInfo[i][Level] ); SendClientMessage(playerid, blue, string);
    return SendClientMessage(playerid, red, aMsg);
    }
    if( (Count[1] == 1) && (PlayerInfo[playerid][Level] > 0) ) {
	    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
			format(string, sizeof(string), "RCON Admin: (%d)%s", i, PlayerName2(i)); SendClientMessage(playerid, COLOR_WHITE, string);
		}
	}
	if(Count[1] > 1) {
 		new x; format(string, sizeof(string), "RCON Admins: ");
	    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i))
		{
			format(string,sizeof(string),"%s(%d)%s",string,i,PlayerName2(i));
			x++;
			if(x >= 5) {
				SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "RCON Admins: "); x = 0;
			}
			else format(string, sizeof(string), "%s,  ", string);
	    }
		if(x <= 4 && x > 0) {
			string[strlen(string)-3] = '.';
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
	}
	return 1;
}
Reply
#7

anyone plz help i really nedd this!!!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)