Help Little help
#1

Here is muted commands to apply the command you want

playerid + reason

Код:
dcmd_mute(playerid,params[])
{
	new
	    Reason[256],
	    pID;
    if(Player[playerid][admin] < 1){
	 	return SendClientMessage(playerid, COLOR_RED, "Bad Command! Type /command for right commands");
 		}
	if(sscanf(params,"us",pID,Reason)){
		return SendClientMessage(playerid,COLOR_GREY,"Usage: /mute [playerid] [reason] ");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID");
	    }
 	if(playerid == pID){
		return SendClientMessage(playerid,COLOR_RED,"You Can Not Mute Yourself");
		}
	if(Player[playerid][admin] < Player[pID][admin]){
		return SendClientMessage(playerid,COLOR_RED,"You Can Not Mute A High Ranked Admin");
		}
	if(Muted[pID] == 1)
	    return SendClientMessage(playerid,COLOR_RED,"This player is already muted");

	new
 	name[24],aname[24],
 	string1[128], string2[128], string3[128], string4[128];
	GetPlayerName(pID,name,sizeof(name));
	GetPlayerName(playerid,aname,sizeof(aname));
	format(string1,sizeof(string1),"**(ADMIN MUTE)** %s(%d) %s",name,pID,Reason);
	format(string2,sizeof(string4),"%s %s(%d) Has Mute %s(%d) For Reason: %s",gAdminRanks[Player[playerid][admin]],aname,playerid,name,pID,Reason);
	format(string3,sizeof(string2),"You Have Been Muted By %s For Reason: %s",gAdminRanks[Player[playerid][admin]],Reason);
	format(string4, sizeof(string3), "You Have Mute %s(%d) For Reason: %s",name, pID, Reason);
	SendClientMessageToAll(COLOR_GOLD,string1);
	SendClientMessage(pID,0xFF7F50AA,string2);
	SendClientMessage(playerid,COLOR_GREEN,string3);
	SendAdminMessage(COLOR_YELLOW,string4);
	SaveToFile("Mutes",string4); Muted[pID] = 1;
  	return 1;
}

Now what i want is how i can make this apply when someone enter an playerid only and forget reason for mute to Send him ClientMessage Say "You forget to put reason"
Reply


Messages In This Thread
Help Little help - by [MKD]Max - 02.06.2011, 21:18
Re: Help Little help - by Jefff - 02.06.2011, 22:43

Forum Jump:


Users browsing this thread: 1 Guest(s)