Command with multiple params
#1

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..
Reply
#2

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)