/Admins Command
#1

Ok, so basically, i need this to show ALL admins that are online, not just one of em. I'm completely lost as to why it won't.

Code:
dcmd_admins(playerid,params[])
{
	#pragma unused params
	//new count = 0;
	new string[128];
	for(new i = 0; i <MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
	        {
	            if(AccInfo[i][Level] > 5)
	            {
	                AdmRank = "Server Owner";
				}
				if(IsPlayerAdmin(i))
				{
				    AdmRank = "RCON Administrator";
				}
				else
				{
				    switch(AccInfo[i][Level])
				    {
				        case 1: {
				        AdmRank = "Trial Moderator";
						}
						case 2: {
						AdmRank = "Moderator";
						}
						case 3: {
						AdmRank = "Administrator";
						}
						case 4: {
						AdmRank = "Senior Administrator";
						}
						case 5: {
						AdmRank = "Community Leader";
						}
					}
				}
				format(string, sizeof(string), "%s (Id:%i) | %s",PlayerName2(i),i,AdmRank);
				ShowPlayerDialog(playerid, 668, DIALOG_STYLE_MSGBOX, "Online Administrators",string,"Submit","Cancel");
				return 1;
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
/Admins Command - by Jay_Dixon - 06.07.2013, 09:34
Re: /Admins Command - by iggy1 - 06.07.2013, 09:35
Re: /Admins Command - by Income - 06.07.2013, 11:14
Re: /Admins Command - by Jay_Dixon - 06.07.2013, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)