strcmp() and !strcmp()
#1

pawn Код:
strcmp("blabla","blabla",true)
This check if blabla = blabla and ignore letter case.


pawn Код:
!strcmp("blabla","blabla",true)
This check if blabla != blabla (unequal)

So wtf is this in my mode:
pawn Код:
if (!strcmp(cmdtext, "/stop", true))
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 0;
        ClearAnimations(playerid);
        return 1;
    }
    if(!strcmp(cmdtext, "/$$", true))
    {
        pInfo[playerid][Money] += 50000;
        return 1;
    }
I dont understand this.. With ! script must do commands if those two strings aren't same, for example /$$ string it must do when cmdtext unequal /$$, but this work... If I remove ! every command make one action. What the fuck is this ? Because now with strcmp() I dont understand what ! do o_O
Reply


Messages In This Thread
strcmp() and !strcmp() - by Dreftas - 10.06.2009, 20:56
Re: strcmp() and !strcmp() - by DracoBlue - 10.06.2009, 21:09
Re: strcmp() and !strcmp() - by Dreftas - 10.06.2009, 21:14
Re: strcmp() and !strcmp() - by DracoBlue - 10.06.2009, 21:16
Re: strcmp() and !strcmp() - by Dreftas - 10.06.2009, 21:26
Re: strcmp() and !strcmp() - by DracoBlue - 10.06.2009, 21:36

Forum Jump:


Users browsing this thread: 2 Guest(s)