/mute CMD-Change
#1

Guys Could You tell me how to add [Reason] Function Please

Код HTML:
if(strcmp(cmd, "/mute", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [playerid/PartOfName][Reason] ");
			return 1;
		}
		new playa;
		playa = ReturnUser(tmp);
		if(PlayerInfo[playerid][pAdmin] >= 2)
		{
			if(IsPlayerConnected(playa))
			{
				if(playa != INVALID_PLAYER_ID)
				{
					strmid(giveplayer, PlayerRPName(playa), 0, MAX_PLAYER_NAME);
					strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
					if(PlayerInfo[playa][pMuted] == 0)
					{
						PlayerInfo[playa][pMuted] = 1;
						format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s was muted by %s.",giveplayer ,sendername);
						ABroadCast(COLOR_WHITE,string,1);
					}
					else
					{
						PlayerInfo[playa][pMuted] = 0;
						format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s was unmuted by %s.",giveplayer ,sendername);
						ABroadCast(COLOR_WHITE,string,1);
					}
				}
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
		}
	}
Thanks ++rep
Reply


Messages In This Thread
/mute CMD-Change - by Dezzzy - 22.01.2015, 10:48
Re: /mute CMD-Change - by 1fret - 22.01.2015, 12:24
Re: /mute CMD-Change - by xVIP3Rx - 22.01.2015, 12:48

Forum Jump:


Users browsing this thread: 1 Guest(s)