29.04.2010, 02:08
Man, it's pretty simple:
pawn Код:
// Let's make a 3 parameters exaple
new
a[10],
b[10],
c[10];
#define Z 8 // sizeof
if(sscanf(string, "s["#Z"]", a))
{
// the stuff to join the channel
}
else if(sscanf(string, "s["#Z"]s["#Z"]", a, b))
{
// this is what happens if he typed the first param but not the second
}
else if(sscanf(string, "s["#Z"]s["#Z"]s["#Z"]", a, b, c))
{
// this is what happens if he types the first and the second but not the third
}
else
{
// this is what happens if he typed all the params
}