sbAdmin
#5

Quote:
Originally Posted by Isolated
Посмотреть сообщение
Instead of defining 5 levels, why not simply create a multidimensional array?
I am putting that defines on the code that gives the ranks for example

Код:
CMD:admins(playerid, params[])
{
	new string[128], count, rank[35];

	if(GetPlayerScore(playerid) < 50) return Error(playerid, "You need 50 score to use this command");
	LOOP_PLAYERS(i)
	{
	    count = 0;
	    if(IsPlayerAdminEx(i) || IsPlayerAdmin(i))
	    {
	        count++;
			if(IsPlayerAdmin(i)) rank = "RCON Admin";
			else
			{
			    switch(GetLevel(i))
			    {
			        case 1: rank = ""LEVEL1"";
			        case 2: rank = ""LEVEL2"";
			        case 3: rank = ""LEVEL3"";
			        case 4: rank = ""LEVEL4"";
			        case 5: rank = ""LEVEL5"";
			    }
   			}

	    	format(string, sizeof(string), ""white"%i. %s(%i) - "orange"(%s)", count, GetName(i), i, rank);
	        Dialog_Show(playerid, dialogUnused, DIALOG_STYLE_MSGBOX, "Online Admins", string, "Close", "");
	    }
	}
	if(count == 0) return Error(playerid, "There are currently no admins online");
	return 1;
}
Reply


Messages In This Thread
sbAdmin - by SecretBoss - 11.10.2015, 05:02
Re: sbAdmin - by shay1324 - 11.10.2015, 07:23
Re: sbAdmin - by jlalt - 11.10.2015, 10:29
Re: sbAdmin - by Isolated - 11.10.2015, 11:24
Re: sbAdmin - by SecretBoss - 11.10.2015, 11:25
Re: sbAdmin - by Isolated - 11.10.2015, 11:48
Re: sbAdmin - by SecretBoss - 11.10.2015, 12:02
Re: sbAdmin - by Isolated - 11.10.2015, 15:43
Re: sbAdmin - by lxlAlm0oTlxl - 11.10.2015, 17:03

Forum Jump:


Users browsing this thread: 1 Guest(s)