Код:
#include <amxmodx>
#include <fun>
#define HPADD 10
#define HPHSADD 20
#define MAXHP 500
public plugin_init( )
{
register_plugin( "Vampire", "1.0", "miRror" )
}
public client_death( iAttacker, iVictim, iWeapon, hitplace, TK )
{
if(get_user_flags(iAttacker) & ADMIN_LEVEL_H) {
static bonushp, attackerhp
bonushp = ( hitplace == HIT_HEAD ) ? HPHSADD : HPADD
attackerhp = get_user_health( iAttacker ) + bonushp
if ( attackerhp > MAXHP )
attackerhp = MAXHP
set_user_health( iAttacker, attackerhp )
ScreenFade( iAttacker )
}
}
stock ScreenFade( id )
{
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), {0,0,0}, id )
write_short( 1<<10 )
write_short( 1<<10 )
write_short( 0x0000 )
write_byte( 0 )
write_byte( 0 )
write_byte( 200 )
write_byte( 75 )
message_end( )
}