[help] Helpers/Admins list
#2

Код:
CMD:admins(playerid,params[])
{
    new Count, string[128];
    SendClientMessage(playerid, COLOR_RED, "__________|Online Admins|__________");
    SendClientMessage(playerid, COLOR_RED, "                                   ");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       if(IsPlayerConnected(i))
       {
          if(PlayerInfo[i][pAdmin] >=1)
		  {
             format(string,sizeof(string),"| Admin: %s(ID:%d) || Level: %s(%d) |",PlayerName(i),i,AdminLevelName(i),PlayerInfo[i][pAdmin]);
             SendClientMessage(playerid,COLOR_RED,string);
             Count++;
          }
	   }
    }
    if(Count == 0) SendClientMessage(playerid, COLOR_RED, "None Admin Online");
    SendClientMessage(playerid, COLOR_RED, "____________________________");
    return 1;
}CMD:admins(playerid,params[])
{
    new Count, string[128];
    SendClientMessage(playerid, COLOR_RED, "__________|Online Admins|__________");
    SendClientMessage(playerid, COLOR_RED, "                                   ");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       if(IsPlayerConnected(i))
       {
          if(PlayerInfo[i][pAdmin] >=1)
		  {
             format(string,sizeof(string),"| Admin: %s(ID:%d) || Level: %s(%d) |",PlayerName(i),i,AdminLevelName(i),PlayerInfo[i][pAdmin]);
             SendClientMessage(playerid,COLOR_RED,string);
             Count++;
          }
	   }
    }
    if(Count == 0) SendClientMessage(playerid, COLOR_RED, "None Admin Online");
    SendClientMessage(playerid, COLOR_RED, "____________________________");
    return 1;
}
Код:
stock AdminLevelName(playerid)
{
	new adminlevelname[128];
	switch(PlayerInfo[playerid][pAdmin])
	{
		case 0: adminlevelname = "Player";
		case 1: adminlevelname = "Basic Admin";
		case 2: adminlevelname = "Junior Admin";
		case 3: adminlevelname = "Senior Admin";
		case 4: adminlevelname = "Lead Admin";
		case 5: adminlevelname = "Head Admin";
		case 6: adminlevelname = "Community Co-Owner";
		case 7: adminlevelname = "Community Owner";
	}
	return adminlevelname;
}
You could do the same with Helpers!
Reply


Messages In This Thread
[help] Helpers/Admins list - by Arxalan - 25.12.2014, 15:56
Re: [help] Helpers/Admins list - by MrCallum - 25.12.2014, 16:01
Re: [help] Helpers/Admins list - by Arxalan - 25.12.2014, 16:14
Re: [help] Helpers/Admins list - by MrCallum - 25.12.2014, 16:19
Re: [help] Helpers/Admins list - by iFiras - 25.12.2014, 16:26
Re: [help] Helpers/Admins list - by Kyance - 25.12.2014, 16:31
Re: [help] Helpers/Admins list - by zT KiNgKoNg - 25.12.2014, 17:36

Forum Jump:


Users browsing this thread: 2 Guest(s)