15.05.2014, 18:16
Recently I learned this 
I think that's very useful, learn and use it (y)

pawn Code:
// I define some values as the powers of 2
#define A 1 // 2^0
#define B 2 // 2^1
#define C 4 // 2^2
#define D 8 // 2^3
#define E 16 // 2^4
#define F 32 // 2^5
#define G 64 // 2^6
#define H 128 // 2^7
#define I 256 // 2^8
// the variable can be one of those values
variable = D;
// but the variable can also be multiple values
variable = F + H; // = 32 + 128 = 160, and there are no other sums of those values that equal 160
variable = A + F + E + H;
// you can check if the variable equals one of the values
if(variable == I)
// you can also check if the variable is the sum of more of these values
if(variable == T + H + C)
// and finally you can also check if the variable's value has one of the values as addend
if(variable & I)
if(variable & B && variable & D)