Up to 256 flags can be stored in a single int, since each is represented by one of its digits.
Flags are created like this:
#define FL_MYFLAG 1<<0 #define FL_MYFLAG 1<<1 #define FL_MYFLAG 1<<2 etc.
Or sometimes like this (e.g. spawnflags):
#define FL_MYFLAG 1 #define FL_MYFLAG 16 #define FL_MYFLAG 32 etc.
You can then use the #defs in place of the numbers.
Flags are managed through functions, never directly. There are several different types of flags and each has its own set, but they all follow the same naming pattern:
To operate on several flags at once you must use the bitwise operators
^ - the same as the normal boolean operators, but with only one character.
if ( HasSpawnFlags(SF_CITIZEN_MEDIC | SF_CITIZEN_NOT_COMMANDABLE) ) ...