Command / text [text / text] [player id / all]
#4

Is this what you mean?

pawn Код:
dcmd_caps(playerid, params[])
{
  new mode[3], id, all[3];
  if (sscanf(params, "sd", mode, id))
  {
    if (sscanf(params, "ss", mode, all))
    {
      return SendClientMessage(playerid, 0xC0C0C0FF, "USE: /caps [on/off] [playerid/all]");
    }
    else if (!strcmp(mode, "off", true))
    {
      // Turn off for all
    }
    else if (!strcmp(mode, "on", true))
    {
      // Turn on for all
    }
  }
  else if (!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xC0C0C0FF, "Player not connected");
  else if (!strcmp(mode, "off", true))
  {
    // Turn off for id
  }
  else if (!strcmp(mode, "on", true))
  {
    // Turn on for id
  }
  else return SendClientMessage(playerid, 0xC0C0C0FF, "USE: /caps [on/off] [playerid/all]");
  return 1;
}
Note: Not tested
Reply


Messages In This Thread
Command / text [text / text] [player id / all] - by MrLeNy - 26.02.2010, 14:07
Re: Command / text [text / text] [player id / all] - by Salt - 26.02.2010, 14:08
Re: Command / text [text / text] [player id / all] - by MrLeNy - 26.02.2010, 14:10
Re: Command / text [text / text] [player id / all] - by [nl]daplayer - 26.02.2010, 14:24
Re: Command / text [text / text] [player id / all] - by MrLeNy - 26.02.2010, 14:27
Re: Command / text [text / text] [player id / all] - by [nl]daplayer - 26.02.2010, 15:33
Re: Command / text [text / text] [player id / all] - by MrLeNy - 10.04.2010, 21:18

Forum Jump:


Users browsing this thread: 1 Guest(s)