13.12.2010, 17:57
You can't do it in OnPlayerCommandText, as it is only called when there is a / as the first character.
You need to do it in OnPlayerText, like DRIFT_HUNTER has shown an example of comparing the first character of the text string to the AND character.
Also you should remember that strcmp is not a command processor, it is merely for comparing strings, it would seem you suggested it was a command processor in your post . On the other hand, dcmd is specifically for commands, however you would not be able to use dcmd either for this function, as it uses OnPlayerCommandText, which is only called when you add a / as the first character
You need to do it in OnPlayerText, like DRIFT_HUNTER has shown an example of comparing the first character of the text string to the AND character.
Also you should remember that strcmp is not a command processor, it is merely for comparing strings, it would seem you suggested it was a command processor in your post . On the other hand, dcmd is specifically for commands, however you would not be able to use dcmd either for this function, as it uses OnPlayerCommandText, which is only called when you add a / as the first character