Freezing with Reason
#4

Well this is not exactly what you want but will work for an id. As I was looking at your code I noticed you want to do a id/name command. Im not sure as to how it would be done exactly. Maybe you can figure it out. Or maybe just do yourself a seperate command that will give you the id from the name then with the id do the /mute [id] [reason].
Hope it helps. [edit] Removed the ! from if(!strlen(reason))
pawn Код:
dcmd_mute(playerid,params[])
{
  new string[256], reason[128], Name[24];
  new tomute;
  if(IsPlayerAdmin(playerid))
  {
    if(sscanf(params, "ds", tomute, reason))
    {
      SendClientMessage(playerid, 0xFF0000AA, "Usage: /mute [playerid] [reason]");
    }
    else
    {
      GetPlayerName(Player, Name, sizeof(Name));
      if(strlen(reason))
      {
        format(string, sizeof(string), "MUTE: %s (%d) Reason: %s", Name, tomute, reason);
      }
      else
      {
        format(string, sizeof(string), "MUTE: %s (%d) Reason: No Reason", Name, tomute);
      }
      SendClientMessageToAll(COLOR_PINK, string);
      pmuted[tomute] = 1;
    }
  }
  return 1;
}
Reply


Messages In This Thread
Freezing with Reason - by Robbin237 - 09.02.2009, 14:06
Re: Freezing with Reason - by ShizNator - 09.02.2009, 14:32
Re: Freezing with Reason - by Robbin237 - 09.02.2009, 14:58
Re: Freezing with Reason - by ShizNator - 10.02.2009, 00:14
Re: Freezing with Reason - by Backwardsman97 - 10.02.2009, 02:07
Re: Freezing with Reason - by 1337pr0 - 10.02.2009, 03:32
Re: Freezing with Reason - by Backwardsman97 - 10.02.2009, 03:41
Re: Freezing with Reason - by ShizNator - 10.02.2009, 11:19
Re: Freezing with Reason - by Robbin237 - 10.02.2009, 13:56
Re: Freezing with Reason - by ShizNator - 10.02.2009, 13:59

Forum Jump:


Users browsing this thread: 1 Guest(s)