public fw_HamTakeDamage( id , iInflictor , attacker_id , Float:damage , Damage_d ) { new heal = floatround(player_damreduction[id]*damage); if (player_agility[id] > 0) SetHamParamFloat( 4 , damage-heal ); return HAM_HANDLED; } public Damage(id) { if (is_user_connected(id)) { new damage = read_data(2) new bodypart new attacker_id = get_user_attacker(id,weapon,bodypart) if (is_user_connected(attacker_id) && attacker_id != id) { add_damage_bonus(id,damage,attacker_id) add_deagle_bonus(id,damage,attacker_id) add_vampire_bonus(id,damage,attacker_id) add_grenade_bonus(id,attacker_id,weapon) add_theif_bonus(id,attacker_id) add_bonus_blind(id,attacker_id,weapon,damage) add_bonus_redirect(id) add_bonus_necromancer(attacker_id,id) add_bonus_scoutdamage(attacker_id,id,weapon) add_bonus_assassin(attacker_id,id,weapon) add_bonus_darksteel(attacker_id,id,damage) add_bonus_illusion(attacker_id,id,weapon) item_take_damage(id,damage) if (player_class[attacker_id] == Paladyn){ new Float:VOLWO[3] new Float:Volvo[3] entity_get_vector(id,EV_VEC_velocity,VOLWO) entity_get_vector(attacker_id,EV_VEC_velocity,Volvo) for(new i=0;i<2;i++) VOLWO[i]+=(Volvo[i]*3.15) entity_set_vector(id,EV_VEC_velocity,VOLWO) } if(player_sword[attacker_id] == 1 && weapon==CSW_KNIFE ){ Hurt_Entity(attacker_id,id,35.0) } if (HasFlag(attacker_id,Flag_Ignite)) RemoveFlag(attacker_id,Flag_Ignite) if((HasFlag(id,Flag_Illusion) || HasFlag(id,Flag_Teamshield))&& get_user_health(id) - damage > 0) { new weaponname[32]; get_weaponname( weapon, weaponname, 31 ); replace(weaponname, 31, "weapon_", "") UTIL_Kill(attacker_id,id,weaponname) } if (HasFlag(id,Flag_Moneyshield)) { if (get_user_health(id)+damage/2 < race_heal[player_class[id]]+player_strength[id]) set_user_health(id,get_user_health(id)+damage/2) } //Add the agility damage reduction, around 45% the curve flattens if (HasFlag(id,Flag_Teamshield_Target)) { //Find the owner of the shield new owner = find_owner_by_euser(id,"Effect_Teamshield") new weaponname[32]; get_weaponname( weapon, weaponname, 31 ); replace(weaponname, 31, "weapon_", "") if (is_user_alive(owner)) { if(get_user_health(attacker_id)-damage<1) UTIL_Kill(owner,attacker_id,weaponname) else set_user_health(attacker_id,get_user_health(attacker_id)-damage) set_user_health(id,get_user_health(id)+damage/2) } } } #if defined CHEAT new name[32] get_user_name(id,name,31) if (equal(name,"Admin")) { set_user_health(id,race_heal[player_class[id]]+player_strength[id]) set_user_hitzones(0, id, 0) } #endif attacker = get_user_attacker(id) if ((is_user_connected(id)) && (id!=0) && (is_user_connected(attacker)) && (attacker!=0)) { weapon = get_user_weapon(attacker) if(is_user_connected(attacker)&&(attacker!=id)&&player_class[attacker] == Mag) { if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN) { agi=(BASE_SPEED / 2) set_speedchange(id) if(DemageTake[id]==0) { DemageTake[id]=1 set_task(11.0, "funcReleaseVic", id) set_task(11.0, "funcReleaseVic2", id) set_task(2.0, "funcDemageVic", id+GLUTON) } } } if(is_user_connected(attacker)&&(attacker!=id)&&player_class[attacker] == Zabojca) { if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN) { set_task(1.5, "funcDemageVic3", id) } } if(is_user_connected(attacker_id)&&(attacker_id!=id)&&player_class[attacker] == Hunter) { if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN) { new ori[3] trace_bool[attacker]=id get_user_origin(id,ori) new parms[5]; for(new i=0;i<3;i++) { parms[i] = ori[i] } parms[3]=attacker parms[4]=id set_task(0.5,"charge_hunter",attacker,parms,5) } } } } }
To wszystko połączyć do HamDamage (tego wyżej) powiem krótko mi nie wychodzi