Originally Posted by thEsp
#define DMG_DROWN (1<<14)
#if AMXX_VERSION_NUM < 190
RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage");
RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage", .specialbot = true);
@CBasePlayer_TakeDamage(pev, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
if (bitsDamageType & DMG_DROWN)
Tested on map de_mon and works perfectly fine, but doesn't work on de_survivor (since you get hurt by a specific entity, not water).
Thank you very much. I appreciate it. But it seems this wont work for bots.
I tried to make one for bots based on yours, but I failed.
#define PLUGIN "X"
#define AUTHOR "X"
#define VERSION "X"
#define DMG_DROWN 1<<14
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_TakeDamage, "player", "damage" )
public damage(this, idinflictor, idattacker, Float:damage, damagebits)
if(damagebits & DMG_DROWN)