These macros are designed to store booleans/bit-flags for each player, allowing you to pass their player ID and the bit-field variable. It's pretty straightforward.
Suppose you wanted to record each player that was slayed, clearing the flag if they are revived.
PHP Code:
#define get_bit(%2,%1) (%1 & (1<<(%2&31)))
#define set_bit(%2,%1) (%1 |= (1<<(%2&31)))
#define rem_bit(%2,%1) (%1 &= ~(1 <<(%2&31)))
new WasPlayerSlayed;
SlayFunc( id )
{
//slay( id );
set_bit( id , WasPlayerSlayed );
}
RevivePlayer( id )
{
//revive( id );
rem_bit( id , WasPlayerSlayed );
}
bool:WasPlayerSlayedAndNotRevived( id )
{
return !!get_bit( id , WasPlayerSlayed );
}
If csgo_reset_data() should set all bits in loaded to 0, just do loaded = 0
Please ask a more specific question if you need help, but the above posts should help you understand what each macro does.
__________________