08.07.2011, 15:24
What do you mean by multi-command? Like 3 commands with the same code script or?
If so then try strcmp and use OR operator ( || ):
If so then try strcmp and use OR operator ( || ):
pawn Код:
//under OnPlayerCommand
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/command1", true) == 0 || strcmp(cmd, "/command2", true) == 0 || strcmp(cmd, "/command3", true) == 0)
{
//Codes here
}