Making an Admin's list
#1

Hello, As you can see from the topic title, I'd like to come up with a command that shows all online administrators on the list, I have been using Karagon's script for a while to learn how things work etc, but I cannot get this command to work.

Код:
cmd(admins, playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		SendClientMessage(playerid, -1, "");
		SendClientMessage(playerid, COLOR_ADMIN, "Online Administrators:");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(GetPVarInt(playerid, "AdminLevel") <= 1338)
				{
					new admtext[64], sendername[MAX_PLAYER_NAME];
					if(GetPVarInt(playerid, "AdminLevel") == 1337) { admtext = "Head Administrator"; }
					GetPlayerName(i, sendername, sizeof(sendername));
					return 1;
				}
				else
				{
                    SendClientMessage(playerid, COLOR_ADMIN, "No online staff members currently found.");
                    return 1;
				}
			}
		}
	}
    return 1;
}
When sent in game, the command just returns - Current Administrators: and that's it.

I've been trying to figure this out for a long time and have had no luck.

If you could help me out or at least where I'm going wrong, I'd appreciate that.


Thanks guys.
Reply


Messages In This Thread
Making an Admin's list - by Skillzz - 27.04.2016, 11:50
Re: Making an Admin's list - by Mark_Samp - 27.04.2016, 12:27
Re: Making an Admin's list - by Skillzz - 27.04.2016, 15:29
Re: Making an Admin's list - by introzen - 27.04.2016, 15:46
Re: Making an Admin's list - by Ritzy2K - 27.04.2016, 15:50
Re: Making an Admin's list - by J0sh... - 27.04.2016, 15:54
Re: Making an Admin's list - by Lumanov - 27.04.2016, 16:13
Re: Making an Admin's list - by Skillzz - 27.04.2016, 16:36
Re: Making an Admin's list - by J0sh... - 27.04.2016, 17:00
Re: Making an Admin's list - by Skillzz - 27.04.2016, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)