17.04.2010, 11:06
pawn Код:
public OnPlayerText(playerid, text[])
{
if(mute[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
return 0;
}
}
//---------------------------------------------------------------
dcmd_mute(playerid, params[])
{
new pid;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /mute [playerid]");
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been muted",name);
SendClientMessageToAll(0xF60000AA,string);
mute[pid]= 1;
return 1;
}
dcmd_unmute(playerid, params[])
{
new pid;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /mute [playerid]");
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been unmuted",name);
SendClientMessageToAll(0xF60000AA,string);
mute[pid]= 0;
return 1;
}