|| and && question.
#6

pawn Код:
IsPlayerAdmin(playerid) || pInfo[playerid][AdminLevel] == 1337
This code first checks if the player is an RCON admin. If he is an RCON admin, it does not check the second code but if he isn't an RCON admin, then it checks if the variable pInfo[playerid][AdminLevel] is equal to 1337. If any of the above statements is incorrect, the code can still run if the other one is correct.

pawn Код:
IsPlayerAdmin(playerid) && pInfo[playerid][AdminLevel] == 1337
First checks if the player is an RCON admin and if he is, then it checks if his pInfo[playerid][AdminLevel] is equal to 1337. If any of the above statements is found incorrect, it will make both of them false.
Reply


Messages In This Thread
|| and && question. - by ReneG - 22.02.2012, 01:50
Re: || and && question. - by coole210 - 22.02.2012, 02:01
Re: || and && question. - by DRIFT_HUNTER - 22.02.2012, 02:18
Re: || and && question. - by JhnzRep - 22.02.2012, 02:44
Re: || and && question. - by ReneG - 22.02.2012, 03:30
Re: || and && question. - by suhrab_mujeeb - 22.02.2012, 03:56
Re: || and && question. - by [HiC]TheKiller - 22.02.2012, 03:58
Re: || and && question. - by ReneG - 22.02.2012, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)