/* Plugin generated by AMXX-Studio */ #include #include #include #include #define DMG_BULLET (1<<1) #define PROCENT 25 new bool:ma_perk[33]; public plugin_init() { register_plugin("Zbychu", "1.0", "QTM_Peyote"); cod_register_class("Zbychu", "Zbychu to prawdziwy koneser piwa i innych napojow energetycznych", 0, -99, -99, -99, -99); RegisterHam(Ham_TakeDamage, "player", "TakeDamagePost", 1); } public cod_class_enabled(id) ma_perk[id] = true; public cod_class_disabled(id) ma_perk[id] = false; public TakeDamagePost(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_alive(idattacker)) return HAM_IGNORED; if(!ma_perk[idattacker]) return HAM_IGNORED; new Float:maksymalne_zdrowie = 100.0 + cod_get_user_health(idattacker); new Float:nowe_zdrowie = damage * (PROCENT/100) + pev(idattacker, pev_health); set_pev(idattacker, pev_health, (nowe_zdrowie < maksymalne_zdrowie)? nowe_zdrowie: maksymalne_zdrowie); return HAM_IGNORED; }