12.08.2016, 14:42 
	
	
	
		ok so i made 3 chats for admin chat 
1st chat-for mod-juniors
2nd chat for senior-lead head admin
3rd chat for community manager-owner
So i want the 2nd chat not to be seen by the mod-juniours and 3rds chat not to be seen by the mod-lead head admin.
Here is my cmd:
 ANy ideas ?
	
	
	
	
1st chat-for mod-juniors
2nd chat for senior-lead head admin
3rd chat for community manager-owner
So i want the 2nd chat not to be seen by the mod-juniours and 3rds chat not to be seen by the mod-lead head admin.
Here is my cmd:
Код:
CMD:admin(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
	{
	    new msg[128];
	    new logstring[128];
		new year, month, day, hour, minute, second;
		getdate(year, month, day);
		gettime(hour, minute, second);
	    if(!sscanf(params, "s[128]", msg))
		{
			strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
			new alevel[25];
			if(PlayerInfo[playerid][pAdmin] == 1) { alevel = "Moderator"; }
			if(PlayerInfo[playerid][pAdmin] == 2) { alevel = "Junior Admin"; }
			format(string, sizeof(string), "* [MOD CHAT] %s %s: %s", alevel, sendername, msg);
            format(logstring, sizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s", day, month, year, hour, minute, second, alevel, sendername, msg);
			SendAdminMessage(COLOR_PINK, string);
			AchatLog(logstring);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/mc)chat [MOD chat]");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
	}
	return 1;
}
CMD:admin2(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
	{
	    new msg[128];
	    new logstring[128];
		new year, month, day, hour, minute, second;
		getdate(year, month, day);
		gettime(hour, minute, second);
	    if(!sscanf(params, "s[128]", msg))
		{
			strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
			new alevel[25];
			if(PlayerInfo[playerid][pAdmin] == 3) { alevel = "Senior Admin"; }
			if(PlayerInfo[playerid][pAdmin] == 4) { alevel = "Head Admin"; }
			if(PlayerInfo[playerid][pAdmin] == 1337) { alevel = "Lead Head Admin"; }
			format(string, sizeof(string), "*[ADM CHAT] %s %s: %s", alevel, sendername, msg);
            format(logstring, sizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s", day, month, year, hour, minute, second, alevel, sendername, msg);
			SendAdminMessage(COLOR_GREEN, string);
			AchatLog(logstring);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/adm)in [admin chat]");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
	}
	return 1;
}
CMD:admin3(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1338)
	{
	    new msg[128];
	    new logstring[128];
		new year, month, day, hour, minute, second;
		getdate(year, month, day);
		gettime(hour, minute, second);
	    if(!sscanf(params, "s[128]", msg))
		{
			strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
			new alevel[25];
			if(PlayerInfo[playerid][pAdmin] == 1338) { alevel = "Community Manager"; }
			if(PlayerInfo[playerid][pAdmin] == 99999) { alevel = "Community Developer"; }
			if(PlayerInfo[playerid][pAdmin] == 100000) { alevel = "Community Owner"; }
			format(string, sizeof(string), "*[COM. ADM'S CHAT] %s %s: %s", alevel, sendername, msg);
            format(logstring, sizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s", day, month, year, hour, minute, second, alevel, sendername, msg);
			SendAdminMessage(COLOR_BLUE, string);
			AchatLog(logstring);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/ca)dmin [COM. admin chat]");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
	}
	return 1;
}


