Need help
#1

I have a problem.

This: works correctly.
pawn Код:
if(strcmp(cmdtext, "/mute", true, 5)==0)
{
  if(!strlen(cmdtext[6]))
  {
    SendClientMessage(playerid, COLOR_ORED, "Usage: /mute [playerid]");
    return 1;
  }
  new ID = strval(cmdtext[6]);
  new pName[24], str[64];
  if(IsPlayerConnected(ID))
  {
    GetPlayerName(ID, pName, 24);
    format(str, 64, "%s has been muted!", pName);
    SendClientMessageToAll(COLOR_ORED, str);
    format(str, 64, "You have been muted!");
    SendClientMessage(ID, COLOR_ORANGE, str);
    Muted[ID] = 1;
  }
  return 1;

    }
This not, why?
pawn Код:
if(strcmp(cmdtext, "/unmute", true, 5)==0)
{
  if(!strlen(cmdtext[6]))
  {
    SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
    return 1;
  }
  new ID = strval(cmdtext[6]);
  new pName[24], str[64];
  if(IsPlayerConnected(ID))
  {
    GetPlayerName(ID, pName, 24);
    format(str, 64, "%s has been unmuted!", pName);
    SendClientMessageToAll(COLOR_ORED, str);
    format(str, 64, "You have been unmuted!");
    SendClientMessage(ID, COLOR_ORANGE, str);
    Muted[ID] = 0;
  }
  return 1;

    }
There is no any errors / warnings. Unmute unmutes me, not ID I want.
Reply


Messages In This Thread
Need help - by Jakku - 26.07.2009, 13:21
Re: Need help - by abhinavdabral - 26.07.2009, 14:59
Re: Need help - by MadeMan - 26.07.2009, 15:02
Re: Need help - by Jakku - 26.07.2009, 15:12
Re: Need help - by Jakku - 26.07.2009, 16:19
Re: Need help - by abhinavdabral - 26.07.2009, 23:55
Re: Need help - by Jakku - 27.07.2009, 09:28
Re: Need help - by abhinavdabral - 27.07.2009, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)