Śpiąca Królewna.
Przyk³ad oparty na broni m4a1 (m4)
Znajd¼: new player_b_sniper[33] = 1 //Ability to kill in 1/sniper with scout dodaj pod tym to: new player_b_m4master[33] = 1 Znajd¼: player_b_sniper[id] = 0 //Ability to kill faster with scout dodaj pod tym to: player_b_m4master[id] = 0 //Ability to kill faster with m4 Znajd¼: if (player_b_sniper[id] > 0) { num_to_str(player_b_sniper[id],TempSkill,10) add(itemEffect,199,"Masz 1/") add(itemEffect,199,TempSkill) add(itemEffect,199,"na natychmiastowe zabicie przeciwnika ze scouta ") } dodaj pod tym to: if (player_b_m4master[id] > 0) { num_to_str(player_b_m4master[id],TempSkill,10) add(itemEffect,199,"Masz 1/") add(itemEffect,199,TempSkill) add(itemEffect,199,"na natychmiastowe zabicie przeciwnika ze m4 ") } Znajd¼: case 68: { player_item_name[id] = "Ultra Armor" player_item_id[id] = 68 player_ultra_armor[id]=random_num(7,11) player_ultra_armor_left[id]=player_ultra_armor[id] show_hudmessage (id, "Znalazles przedmiot : %s :: Twoj pancerz moze odbic do %i pociskow",player_item_name[id],player_ultra_armor[id]) } dodaj pod tym to: case XX: { player_item_name[id] = "m4masterek" player_item_id[id] = rannum player_b_m4master[id] = random_num(1,1) show_hudmessage(id, "Znalazles przedmiot: %s :: 1/%i szans do natychmiastowego zabicia m4",player_item_name[id],player_b_m4master[id]) } Znajd¼: set_hudmessage(220, 115, 70, -1.0, 0.40, 0, 3.0, 4.0, 0.2, 0.3, 5) new rannum = random_num(1,68) zamieñ na: set_hudmessage(220, 115, 70, -1.0, 0.40, 0, 3.0, 4.0, 0.2, 0.3, 5) new rannum = random_num(1,XX) Znajd¼: if(player_b_sniper[id]>0) { if(player_b_sniper[id]>5) player_b_sniper[id]-=random_num(0,2) else if(player_b_sniper[id]>2) player_b_sniper[id]-=random_num(0,1) else if(player_b_sniper[id]>1) player_b_sniper[id]-=random_num(-1,1) } dodaj pod tym to: if(player_b_m4master[id]>0) { if(player_b_m4master[id]>5) player_b_m4master[id]-=random_num(0,2) else if(player_b_m4master[id]>2) player_b_m4master[id]-=random_num(0,1) else if(player_b_m4master[id]>1) player_b_m4master[id]-=random_num(-1,1) } Znajd¼: /* ==================================================================================================== */ public add_bonus_scoutdamage(attacker_id,id,weapon) { if (player_b_sniper[attacker_id] > 0 && get_user_team(attacker_id) != get_user_team(id) && weapon == CSW_SCOUT && player_class[id]!=Ninja) { if (!is_user_alive(id)) return PLUGIN_HANDLED if (random_num(1,player_b_sniper[attacker_id]) == 1) UTIL_Kill(attacker_id,id,"scout") } return PLUGIN_HANDLED } /* ==================================================================================================== */ dodaj pod tym to: public add_bonus_m4masterdamage(attacker_id,id,weapon) { if (player_b_m4master[attacker_id] > 0 && get_user_team(attacker_id) != get_user_team(id) && weapon == CSW_M4A1) { if (!is_user_alive(id)) return PLUGIN_HANDLED if (random_num(1,player_b_m4master[attacker_id]) == 1) UTIL_Kill(attacker_id,id,"m4a1") } return PLUGIN_HANDLED } /* ==================================================================================================== */ Znajd¼: add_bonus_scoutdamage(attacker_id,id,weapon) dodaj pod tym to: add_bonus_m4masterdamage(attacker_id,id,weapon) Znajd¼: register_event("CurWeapon","CurWeapon","be") zamieñ na: register_event("CurWeapon","CurWeapon","be", "1=1") XX - To numer twojego itemu lista broni: |