21.12.2010, 12:51
Well using your example, this is how:
Although I don't know why your strings are so long!
Anyway I recommend using sscanf as opposed to strtok, much cleaner, easier and has a lot more functionality.
pawn Код:
if(strcmp("/kick",cmdtext,true,10) == 0)
{
new tmp[256],tmp2[256],idx; tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext,idx);
new id = strval(tmp);
Kick(id);
return 1;
}
Anyway I recommend using sscanf as opposed to strtok, much cleaner, easier and has a lot more functionality.