Admins command
#1

Код:
	if (strcmp(cmd, "/admins", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
			SendClientMessage(playerid, COLOR_WHITE, "| - - - Admins currently connected - - - |");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
				  {
						GetPlayerName(i, sendername, sizeof(sendername));
						new playerlevel = PlayerInfo[i][pAdmin];
						new ftext1[20];
						if(ahidden[i] == 1) { ftext1 = "Anonymous"; }
		                else if(aduty[i] == 0) { ftext1 = "Off Duty"; }
                        else if(aduty[i] == 1) { ftext1 = "On Duty"; }
						format(string, 256, "| Admin: %s | Level: %d | Duty: %s |", sendername , playerlevel , ftext1);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
		}
		return 1;
	}
How would I make it so if the admin is hidden it shows nothing about them on the string?
Thanks in advance =]

If you need any other information please ask.
Reply
#2

Код:
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
{
  if(ahidden[i] == 0)
  {
do it like this
Reply
#3

Thank you, I'll have a go when I've finished my coursework =]

Edit: Works brilliantly! Thanks very much =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)