Mute and Unmute in dcmd
#7

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;
}
Reply


Messages In This Thread
Mute and Unmute in dcmd - by Dolph - 17.04.2010, 10:54
Re: Mute and Unmute in dcmd - by Correlli - 17.04.2010, 10:57
Re: Mute and Unmute in dcmd - by Dolph - 17.04.2010, 10:58
Re: Mute and Unmute in dcmd - by Correlli - 17.04.2010, 10:59
Re: Mute and Unmute in dcmd - by Dolph - 17.04.2010, 11:01
Re: Mute and Unmute in dcmd - by Correlli - 17.04.2010, 11:03
Re: Mute and Unmute in dcmd - by bpeterson - 17.04.2010, 11:06
Re: Mute and Unmute in dcmd - by Dolph - 17.04.2010, 11:17
Re: Mute and Unmute in dcmd - by bpeterson - 17.04.2010, 11:24
Re: Mute and Unmute in dcmd - by Dolph - 17.04.2010, 11:28

Forum Jump:


Users browsing this thread: 1 Guest(s)