How to - 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: How to (
/showthread.php?tid=274921)
How to -
Abreezy - 07.08.2011
How would i do something like a command with options, such as /help and it would be like /help account /help general, etc. Is it something like checking if the "s", using sscanf, is something or so? Im a bit confused
![Cheesy](images/smilies/biggrin.png)
So could someone explain it, or show me an example? Thanks ahead of time.
Re: How to -
MadeMan - 07.08.2011
pawn Код:
CMD:help(playerid, params[])
{
if(strcmp(params, "account", true) == 0)
{
SendClientMessage(playerid, -1, "Account:");
}
else if(strcmp(params, "general", true) == 0)
{
SendClientMessage(playerid, -1, "General:");
}
else
{
SendClientMessage(playerid, -1, "No such command");
}
return 1;
}
Re: How to -
Abreezy - 07.08.2011
Thanks bro, I see how its done now.