/******************************************************** * AMX ModX Script * * Kill Healed Script 2.0 * by Dev!l * * Kill Healed Script 2.1 * Fixed by [TagPro] * * ***************************************************** * * Well I, [TagPro] seemed to get problems with this * awesome plugin to work when I installed many plugins. * So I tried to figure it out what's the problem and I * added the Register Event and fixed nKiller_hp etc. * * ***************************************************** * * ** FIXES ** * * ** All can be healed Not only Admins * ** New Killer HP * ********************************************************/ #include #include new kill_healed, health_add, health_hs_add, health_max, nKiller, nKiller_hp, nHp_add, nHp_max public plugin_init() { register_plugin("Kill Healed", "2.1", "Dev!l") register_event("DeathMsg","death","ae") kill_healed = register_cvar("amx_killhealed", "1") health_add = register_cvar("hp", "20") health_hs_add = register_cvar("hp_hs", "20") health_max = register_cvar("max_hp", "150") } public death() { if(get_pcvar_num(kill_healed)!=1) return; // Killer id nKiller = read_data(1) // Change HP Amount when made a Head Shot if (read_data(3)==1 && read_data(5)==0) nHp_add = get_pcvar_num(health_hs_add) else nHp_add = get_pcvar_num(health_add) // Updating Killer HP nHp_max = get_pcvar_num (health_max) nKiller_hp = get_user_health(nKiller) + nHp_add // Check Maximum HP if (nKiller_hp > nHp_max) { message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},nKiller) write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) // red write_byte(0) // green write_byte(200) // blue write_byte(75) // alpha message_end() } else { set_user_health(nKiller, nKiller_hp) // Hud message "+10/+15 hp kazandin" set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1) show_hudmessage(nKiller,"+%d hp kazandin",nHp_add) // Screen fading message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},nKiller) write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) // red write_byte(0) // green write_byte(200) // blue write_byte(75) // alpha message_end() } }