[+REP][URGENT]Help with a cmd!
#1

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:
Код:
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;
}
ANy ideas ?
Reply


Messages In This Thread
[+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:42
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 14:46
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:52
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 14:56
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:59
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 15:05
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 15:09
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 15:15
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 15:24
Re: [+REP][URGENT]Help with a cmd! - by JessThompson - 12.08.2016, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)