How to make command /leaders
#9

This is a command to show admins online it is basicly the same princip for leaders...


Код:
YCMD:admins(playerid, params[])
{
	if(gPlayerLoggedIn[playerid] == 0) return 1;

	SendClientMessage(playerid, COLOR_WHITE, "Administrators online:");
	foreach(Player, i)
	{
	    new level[128], string[128];

		if(PlayerInfo[playerid][Admin] == 0 && PlayerInfo[i][Admin] > 1 /*&& AdminDuty[i] == 1*/)
		{
		    switch(PlayerInfo[i][Admin])
		    {
		        case 2: level = "Junior Admin";
		        case 3: level = "General Administrator";
		        case 4: level = "Head Administrator";
		        case 5: level = "Community Owner";
			}
			format(string, sizeof(string), "%s %s", level, PlayerName(i));
			SendClientMessage(playerid, COLOR_GREY, string);
		}
		if(PlayerInfo[playerid][Admin] > 0)
		{
      		switch(PlayerInfo[i][Admin])
		    {
		        case 1: level = "Secret Admin (1)";
		        case 2: level = "Junior Admin (2)";
		        case 3: level = "General Administrator (3)";
		        case 4: level = "Head Administrator (4)";
		        case 5: level = "Community Owner (5)";
			}
			format(string, sizeof(string), "%s %s", level, PlayerName(i));
			SendClientMessage(playerid, COLOR_GREY, string);
		}
	}
	return 1;
}
Reply


Messages In This Thread
How to make command /leaders - by ervinmasic - 12.12.2015, 14:34
Re: How to make command /leaders - by ATGOggy - 12.12.2015, 15:06
Re: How to make command /leaders - by ervinmasic - 12.12.2015, 15:10
Re: How to make command /leaders - by saffierr - 12.12.2015, 23:12
Re: How to make command /leaders - by ervinmasic - 13.12.2015, 08:24
Re: How to make command /leaders - by Denying - 13.12.2015, 14:53
Re: How to make command /leaders - by ervinmasic - 14.12.2015, 09:37
Re: How to make command /leaders - by Elegy - 14.12.2015, 09:49
Re: How to make command /leaders - by Assassin007 - 14.12.2015, 11:12
Re: How to make command /leaders - by PrO.GameR - 14.12.2015, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)