I need to get Ham_TookDamage activated ONLY if they bought from a menu.
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
public plugin_init( )
{
register_plugin( "Damage","1.0","TitANious" )
RegisterHam( Ham_TakeDamage, "player", "Player_TookDamage" )
}
public Player_TookDamage( iVictim, iInflictor, iAttacker, Float:Damage, iDamage_type )
{
if( !is_user_alive( iAttacker ) || cs_get_user_team( iAttacker ) == cs_get_user_team( iVictim ) )
return PLUGIN_HANDLED;
if( ( iDamage_type & ( 1<<1 ) ) )
{
set_user_health( iAttacker, floatround( Float:get_user_health( iAttacker ) + Damage / 5 ) )
client_print( iAttacker, print_chat, "You got %d extra hp for damaging", Damage / 5 )
}
return PLUGIN_CONTINUE
}
__________________
I dislike this.
"A sneeze never comes alone!" <-- Important to remember.