|= thingy
#1

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

https://sampwiki.blast.hk/wiki/Control_Structures
Reply
#3

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
Reply
#4

These are binary operators. This wiki page and this thread explain it pretty well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)