Logical operators condition
#1

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?
Reply
#2

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

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

AND - &&
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)