A little mistake.
This is what i wanted to do actually
PHP Code:
#include < amxmodx >
#include < fun >
const VipFlags = ADMIN_LEVEL_H;
new iHp_add;
new cHp_Add, cHp_Hs;
public plugin_init( ) {
register_event( "DeathMsg", "PlayerKilled", "a", "1>0" );
cHp_Add = register_cvar( "amx_hp_add", "15" );
cHp_Hs = register_cvar( "amx_hp_hs", "30" );
}
public PlayerKilled( ) {
new iKiller = read_data( 1 );
if( read_data( 3 ) )
iHp_add = get_pcvar_num ( cHp_Hs );
else
iHp_add = get_pcvar_num ( cHp_Add );
if( get_user_health( iKiller ) < 100 ) {
set_user_health( iKiller, get_user_health( iKiller ) + iHp_add );
if( get_user_health( iKiller ) > 100 )
set_user_health( iKiller, 100 );
set_hudmessage( 0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 );
show_hudmessage( iKiller, "Healed +%d hp", iHp_add );
}
}