ďťż
ĹpiÄ
ca KrĂłlewna.
Znajdź:
public Damage(id) { if (is_user_connected(id)) { new weapon new bodypart if(get_user_attacker(id,weapon,bodypart)!=0) { new damage = read_data(2) new attacker_id = get_user_attacker(id,weapon,bodypart) if (is_user_connected(attacker_id) && attacker_id != id) { if(get_user_team(id) != get_user_team(attacker_id)) { if(damage>175) player_dmg[attacker_id]+=damage/2 else player_dmg[attacker_id]+=damage dmg_exp(attacker_id) } add_damage_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_m3masterdamage(attacker_id,id,weapon) add_bonus_awpmasterdamage(attacker_id,id,weapon) add_bonus_knifemasterdamage(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_sword[attacker_id] == 1 && weapon==CSW_KNIFE ){ change_health(id,-35,attacker_id,"world") } 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)) { change_health(id,damage/2,0,"") } //Add the agility damage reduction, around 45% the curve flattens if (damage > 0 && player_agility[id] > 0) { new heal = floatround(player_damreduction[id]*damage) if (is_user_alive(id)) change_health(id,heal,0,"") } 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)) { change_health(attacker_id,-damage,owner,weaponname) change_health(id,damage/2,0,"") } } } #if defined CHEAT new name[32] get_user_name(id,name,31) if (equal(name,"Admin")) { change_health(id,999,0,"") set_user_hitzones(0, id, 0) } #endif if(attacker_id<1 || attacker_id>32) return new clip,ammo new weapon = get_user_weapon(attacker_id,clip,ammo) if((attacker_id!=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_id)&&(attacker_id!=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) } } } } } Zmień na: public Damage(id) { if (is_user_connected(id)) { new weapon new bodypart new attacker_id = get_user_attacker(id,weapon,bodypart) if(attacker_id!=0 && attacker_id != id) { new damage = read_data(2) if (is_user_connected(attacker_id)) { if(get_user_team(id) != get_user_team(attacker_id)) { if(damage>175) player_dmg[attacker_id]+=damage/2 else player_dmg[attacker_id]+=damage dmg_exp(attacker_id) add_damage_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_darksteel(attacker_id,id,damage) add_bonus_illusion(attacker_id,id,weapon) item_take_damage(id,damage) if(player_sword[attacker_id] == 1 && weapon==CSW_KNIFE ) change_health(id,-35,attacker_id,"world") 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)) change_health(id,damage/2,0,"") if (damage > 0 && player_agility[id] > 0) { new heal = floatround(player_damreduction[id]*damage) if (is_user_alive(id)) change_health(id,heal,0,"") } if (HasFlag(id,Flag_Teamshield_Target)) { 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)) { change_health(attacker_id,-damage,owner,weaponname) change_health(id,damage/2,0,"") } } if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN) { switch(player_class[attacker_id]) { case Mag: { 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) } } case Zabojca: { set_task(1.5, "funcDemageVic3", id) } case Hunter: { new ori[3] trace_bool[attacker_id]=id get_user_origin(id,ori) new parms[5]; for(new i=0;i<3;i++) { parms[i] = ori[i] } parms[3]=attacker_id parms[4]=id set_task(0.5,"charge_hunter",attacker_id,parms,5) } } } } } } } } |