SA-MP Forums Archive
Show online admins [+REP] - 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 online admins [+REP] (/showthread.php?tid=508063)



Show online admins [+REP] - Tadas - 20.04.2014

Hello, I need command where will be showed all online admins.


Re: Show online admins [+REP] - Dragon2 - 20.04.2014

plz use search bar there are alot of commands you will find


Re: Show online admins [+REP] - Tadas - 20.04.2014

Yes. I searched, but I find only with levels...


Re: Show online admins [+REP] - anou1 - 20.04.2014

What to you want to show ?

Admin connected with RCON ?

Or admin without RCON ?

If it's without RCON you can do something like this: ( adapt it with your GM):

Код:
CMD:onlineadmin(playerid, params[])
{
	if(pInfo[playerid][Admin] > 1)
	{
		new string[50];
		SendClientMessage(playerid, -1, "Online admin are:");
		foreach(new i : Player)
		{
			if(pInfo[i][Admin] >= 1)
			{
				GetPlayerName(i, joueurdestinataire, sizeof(joueurdestinataire));
				format(string, sizeof(string), "%s | Admin Level: %d", joueurdestinataire, pInfo[i][Admin]);
				SendClientMessage(playerid, -1, string);
			}
		} 
		return 1;
	}
	return SendClientMessage(playerid, Rouge,"Unknown command");
}



Re: Show online admins [+REP] - Abagail - 20.04.2014

pawn Код:
CMD:admins(playerid, params[])
{
foreach(Player, i) {
if(IsPlayerAdmin(i))
{
SendClientMessage(playerid, -1, "Online Admins:");
format(string, sizeof(string), "Admin %s - ID %d.", GetName(i), i);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
Untested.


Re: Show online admins [+REP] - Tadas - 20.04.2014

Quote:
Originally Posted by anou1
Посмотреть сообщение
What to you want to show ?

Admin connected with RCON ?

Or admin without RCON ?

If it's without RCON you can do something like this: ( adapt it with your GM):

Код:
CMD:onlineadmin(playerid, params[])
{
	if(pInfo[playerid][Admin] > 1)
	{
		new string[50];
		SendClientMessage(playerid, -1, "Online admin are:");
		foreach(new i : Player)
		{
			if(pInfo[i][Admin] >= 1)
			{
				GetPlayerName(i, joueurdestinataire, sizeof(joueurdestinataire));
				format(string, sizeof(string), "%s | Admin Level: %d", joueurdestinataire, pInfo[i][Admin]);
				SendClientMessage(playerid, -1, string);
			}
		} 
		return 1;
	}
	return SendClientMessage(playerid, Rouge,"Unknown command");
}
Thanks +Rep