Quote:
Originally Posted by ConnorMcLeod
For example a plugin that would switch a player from Ts to Spectator, your plugin could think he is still alive.
Just saying that
PHP Code:
new g_iAlive;
#define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 << ( %2 & 31 ) ) )
#define CheckPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) )
Would be better like :
PHP Code:
new g_iAlive;
#define MarkPlayerAlive(%0) ( g_iAlive |= ( 1 << ( %0 & 31 ) ) )
#define ClearPlayerAlive(%0) ( g_iAlive &= ~( 1 << ( %0 & 31 ) ) )
#define CheckPlayerAlive(%0) ( g_iAlive & ( 1 << ( %0 & 31 ) ) )
|
Yes, but that spectator still would have hp, and could use weapons. I recheck alive/dead on events when person respawns and when person dies.
__________________