How do I make this?
#3

Код:
CMD:admins(playerid, params[])
{
	new count = 0;
	new pname[256], string[150];
    SendClientMessage(playerid, COLOR_GREY, "-----------------------------------------------------------");

    foreach (new i : Player) if (PlayerInfo[i][pAdmin] > 0)
	{
        if (PlayerInfo[i][pAdminDuty])
        {
			GetPlayerName(playerid, pname, sizeof(pname));
			PlayerInfo[playerid][pAdminDuty] = 1;
			format(string, sizeof(string), "%s - Admin Level: "COL_LIGHTBLUE"%d "COL_WHITE"("COL_GREEN"On Duty"COL_WHITE")", pname, PlayerInfo[playerid][pAdmin]);
			SendClientMessageToAll(COLOR_WHITE, string);
		}
		else
		{
  			GetPlayerName(playerid, pname, sizeof(pname));
			PlayerInfo[playerid][pAdminDuty] = 1;
			format(string, sizeof(string), "%s - Admin Level: "COL_LIGHTBLUE"%d "COL_WHITE"("COL_RED"Off Duty"COL_WHITE")", pname, PlayerInfo[playerid][pAdmin]);
			SendClientMessageToAll(COLOR_WHITE, string);
		}
        count++;
	}
	if (!count) {
	    SendClientMessage(playerid, COLOR_WHITE, "* No admins online.");
	}
	SendClientMessage(playerid, COLOR_GREY, "-----------------------------------------------------------");
	return 1;
}
Also tell me if it is good, it is made by me xD
Reply


Messages In This Thread
How do I make this? - by AndreiWow - 04.09.2015, 16:29
Re: How do I make this? - by SWAT4 - 04.09.2015, 16:35
Re: How do I make this? - by AndreiWow - 04.09.2015, 16:38
Re: How do I make this? - by mirou123 - 04.09.2015, 16:48
Re: How do I make this? - by AndreiWow - 04.09.2015, 17:02

Forum Jump:


Users browsing this thread: 2 Guest(s)