|= thingy - 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: |= thingy (
/showthread.php?tid=536075)
|= thingy -
iBots - 07.09.2014
I have seen a script that uses:
for example:
pawn Код:
pInfo[playerid][pLevel] |= LEVEL_1;
and for checking:
if(pInfo[playerid][pLevel] & LEVEL_1)
how are they doing it?
Re: |= thingy -
Flake. - 07.09.2014
https://sampwiki.blast.hk/wiki/Control_Structures
Re: |= thingy -
Jack_Leslie - 07.09.2014
What are you trying to do?
Examples:
pawn Код:
if(pInfo[playerid][Admin] == 6 && pInfo[playerid][AdminAuth] == 1) // If admin equals 6 AND adminauth equals 1
if(pInfo[playerid][Admin] == 6 || pInfo[playerid][VIP] == 1) // if admin equals 6 OR vip equals 1
&& AND
|| OR
Re: |= thingy -
Vince - 07.09.2014
These are binary operators.
This wiki page and
this thread explain it pretty well.