SA-MP Forums Archive
Command / text [text / text] [player id / all] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command / text [text / text] [player id / all] (/showthread.php?tid=130331)



Command / text [text / text] [player id / all] - MrLeNy - 26.02.2010

Hello. I would do the command / command [text / text] [player id / all], but I do not know how. In addition, I would like to do in dcmd, so surely with sscanf. Please help


Re: Command / text [text / text] [player id / all] - Salt - 26.02.2010

https://sampwiki.blast.hk/wiki/Fast_Commands


Re: Command / text [text / text] [player id / all] - MrLeNy - 26.02.2010

I looked, but there is no such /caps [on/off] [player id/all]


Re: Command / text [text / text] [player id / all] - [nl]daplayer - 26.02.2010

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


Re: Command / text [text / text] [player id / all] - MrLeNy - 26.02.2010

and that was /caps [player id/all] [on/off] how do I modify it?


Re: Command / text [text / text] [player id / all] - [nl]daplayer - 26.02.2010

Quote:
Originally Posted by MrLeNy
and that was /caps [player id/all] [on/off] how do I modify it?
How do you mean?

My command was /caps [on/off] [playerid/all].
But do you want /caps [playerid/all] [on/off] ?


Re: Command / text [text / text] [player id / all] - MrLeNy - 10.04.2010

yes