CMD problem ( need help ASAP )
#8

Quote:
Originally Posted by lucamsx
Посмотреть сообщение
you can't do it like this
Код:
!PlayerInfo[playerid][pMember] == 10
this is the proper use
Код:
PlayerInfo[playerid][pMember] != 10
the whole thing:
Код:
CMD:das(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid) && PlayerInfo[playerid][pMember] != 10 && PlayerInfo[playerid][pLeader] != 10 && PlayerInfo[playerid][pJob] != 17 && PlayerInfo[playerid][pJob2] != 17 && PlayerInfo[playerid][pTaxiLicense] != 1)
    {
        SendClientMessage(playerid, -1, "You must be in any vehicle to use this command.");//1
        return 1;
    }

    ...Other codes.

    return 1;
}
Ummm... YES, you can use it like that.

Binary NOT, '!', will cause any true to be false and vice-versa.
This:
Код:
(!(PlayerInfo[playerid][pMember] == 10))
is perfectly fine, but improper.
Reply


Messages In This Thread
CMD problem ( need help ASAP ) - by SoFahim - 08.01.2016, 10:20
Re: CMD problem ( need help ASAP ) - by Karan007 - 08.01.2016, 10:27
Re: CMD problem ( need help ASAP ) - by saffierr - 08.01.2016, 10:30
Re: CMD problem ( need help ASAP ) - by SoFahim - 08.01.2016, 10:37
Re: CMD problem ( need help ASAP ) - by Karan007 - 08.01.2016, 10:58
Re: CMD problem ( need help ASAP ) - by lucamsx - 08.01.2016, 12:31
Re: CMD problem ( need help ASAP ) - by SoFahim - 08.01.2016, 12:56
Re: CMD problem ( need help ASAP ) - by Crayder - 08.01.2016, 16:52

Forum Jump:


Users browsing this thread: 3 Guest(s)