SA-MP Forums Archive
Logical operators condition - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Logical operators condition (/showthread.php?tid=632122)



Logical operators condition - Banditul18 - 09.04.2017

I have a cmd /accept taxi [id] for taxi driver to accept cals from players but every time a taxi driver write the cmd a message apears told him he is not a taxi driver
PHP код:
if(PlayerInfo[playerid][pMember] != 13 || PlayerInfo[playerid][pMember] != 15 || PlayerInfo[playerid][pMember] != 19) return SCM(playerid,COLOR_YELLOW2"Error: You're not a taxi driver."); 
But the taxi driver is pMember = 13 , but this always return the message , i'm doing it wrong?


Re: Logical operators condition - SyS - 09.04.2017

if value is 13
PHP код:
 || PlayerInfo[playerid][pMember] != 15 || PlayerInfo[playerid][pMember] != 19 
this ^ part will become true


Re: Logical operators condition - Banditul18 - 09.04.2017

And how i should i do it? Because i stay and thiking but i ca'nt find a solution....


Re: Logical operators condition - OneDay - 09.04.2017

AND - &&


Re: Logical operators condition - Banditul18 - 09.04.2017

Quote:
Originally Posted by OneDay
Посмотреть сообщение
AND - &&
Hmm , f*** that kinda stupid for me, at the && i not thinked it will owrk , thank you , both of you