21.12.2012, 15:10
Quote:
Now you're getting me confused between NEITHER and EITHER. What Biess wrote up there was pretty much clear. Look...
But still you maybe right there. He needs to correct us here. |
Quote:
but i want it to check both so if you are either operator or admin you can use it. |

Quick example:
pawn Код:
if(( PInfo[ playerid ][ Level ] < 1) || ( PInfo[ playerid ][ Operator ] < 1 ))
//if this check is true - the command should not continue.
This means that if either one is true, this statement will go through:
admin = false
operator = false
statement = true
admin = false
operator = true
statement = true
admin = true
operator = false
statement = true
admin = true
operator = true
statement = true
If he however want not only operator-admins to do the command, but also single operators and single admins, he would have to deny the command for players who are NEITHER admin OR operator (NOR), that means that he has to check both of them at the same time, and BOTH has to return false, else the command should go through.
Thus leaving us with the code:
pawn Код:
if(( PInfo[ playerid ][ Level ] < 1) && ( PInfo[ playerid ][ Operator ] < 1 ))
____________________________________
Do you understand now? I can't really explain it more thouroughly.
If || was NOR, instead of OR, then it would be correct to use ||