strcmp to check cmdtext
#1

Hey guys,

I am doing this to check if /pm command is used. But it is not working (i.e. on using /pm I am getting the same result as when I am not using /pm). Am I comparing the string the right way? :
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, -1, "Incorrect command, type /cmds to find out available commands");
    if(success)
    {
        if(strcmp(cmdtext, "/pm") == 1)
        {
            print("");
        }
    }
    return 1;
}
Regards.
Reply


Messages In This Thread
strcmp to check cmdtext - by Faisal_khan - 25.06.2014, 18:28
Respuesta: strcmp to check cmdtext - by SickAttack - 25.06.2014, 18:36
Re: strcmp to check cmdtext - by Faisal_khan - 25.06.2014, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)