Knowing something - 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: Knowing something (
/showthread.php?tid=336752)
Knowing something -
Youice - 23.04.2012
hello!
I just want to ask what is the difference between these:
if(IsACop(playerid) && PlayerInfo[playerid][pRank] >= 7 || IsSpecial(playerid) || PlayerInfo[playerid][pAdmin] >= 5 && PlayerInfo[playerid][pAdminDuty] == 1 || PlayerInfo[playerid][pHydraR] == 1)
more explanation:
What is the difference between: (||, &&) (==, >=, <=) ?
please help thanks!! (if it is wrong section to ask please pm)
Re: Knowing something -
Basssiiie - 23.04.2012
Basic Pawn?
|| is 'or', && is 'and', == is 'equal to', >= is 'equal or larger than' and <= is 'equal or smaller than'.
Edit: So in English, the line says 'if player is a cop and rank is equal or larger than or player is special or player is admin level equal or larger than 5 and admin is on duty or player is in hydra'.
Edit2:@admantis: Sorry, made a mistake in larger and smaller. :$ And I know they teach it in school, so don't blame me please.
Respuesta: Re: Knowing something -
admantis - 23.04.2012
Quote:
Originally Posted by Basssiiie
Basic Pawn?
|| is 'or', && is 'and', == is 'equal to', >= is 'equal or smaller than' and <= is 'equal or larger than'.
|
>= is 'equal or larger than' and <= is 'equal or smaller than'.
They teach > and < at elementary school, don't you know?
Re: Knowing something -
Youice - 23.04.2012
Thanks Basssiiie!!