Quote:
Originally Posted by (*|Flake|*)
should be
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/command here", cmdtext, true, 10) == 0) {
|
The length parameter is obsolete for this! Do NOT use it! Your command WILL cut off if it's longer and even otherwise its pointless for command comparision.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/command here", true))
{
This way you don't have to worry about the length and you cannot experience issues either. Remember that the "true" means it ignores upper-lower casing aka CommAnD is the same as command. Set it to false if you don't want that.
Regards.