SA-MP Forums Archive
Command with multiple params - 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)
+--- Thread: Command with multiple params (/showthread.php?tid=303634)



Command with multiple params - -Prodigy- - 14.12.2011

I'm trying to make something like:
pawn Код:
/Test <Value>

(Values: test1, test2)

if(strmatch(params, "test1"))
{
    if(isnull(params)) message(color, "/Test test1 <1 - 5>");
    printf("%d", strval(params));
}
else if(strmatch(params, "test2"))
{
    if(isnull(params)) message(color, "/Test test2 <20 - 60>");
    printf("%d", strval(params));
}
return 1;
I can get as far as the matching part, can't get how to check and store the 3rd value when a "Value" match is found..


Re: Command with multiple params - T0pAz - 14.12.2011

use PVar https://sampforum.blast.hk/showthread.php?tid=163175


Re: Command with multiple params - -Prodigy- - 14.12.2011

No. Can be done in a much faster / efficient way. I've once made something like this, ages ago. Can't replicate the code though