dennis888
級別: 特約版主
版區: CS插件區
x132
x139
|
分享:
▼
x1
|
[插件] 病毒炸彈扣100護甲,沒有護甲或少於100護甲才被感染(改主插件zombieplague40)
中了病毒炸彈,即使有護甲都被感染,相信各位大大都覺得很煩。插件區都有插件使病毒炸彈先扣100護甲(沒有或少於100護甲當然會被感染),但這要關掉主插件那個。 小弟這個是改zombieplague40,也確保病毒炸彈先扣護甲才感染(找BOT實證,有些BOT有買護甲有些沒有,有護甲的BOT沒被感染)
1. 尋找 infection_explode(ent) 2. 慢慢找,找這段字「// Only effect alive non-spawnprotected humans」,在if (!is_user_valid_alive(victim) || g_zombie[victim] || g_nodamage[victim]) continue;下面加 // Get victim armor static Float:armor pev(victim, pev_armorvalue, armor) 3. 在Turn into zombie 把 zombieme(victim, attacker, 0, 1, 1) 改成這個 if(armor > 100) { set_pev(victim, pev_armorvalue, floatmax(0.0, armor - 100)) } if(armor < 100) { zombieme(victim, attacker, 0, 1, 1) } 4.compile sma檔
這是我的版本 infection_explode(ent) { // Round ended (bugfix) if (g_endround) return; // Get origin static Float:originF[3] pev(ent, pev_origin, originF) // Make the explosion create_blast(originF) // Infection nade explode sound static sound[64] ArrayGetString(grenade_infect, random_num(0, ArraySize(grenade_infect) - 1), sound, charsmax(sound)) emit_sound(ent, CHAN_WEAPON, sound, 1.0, ATTN_NORM, 0, PITCH_NORM) // Get attacker static attacker attacker = pev(ent, pev_owner) // Collisions static victim victim = -1 while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, NADE_EXPLOSION_RADIUS)) != 0) { // Only effect alive non-spawnprotected humans if (!is_user_valid_alive(victim) || g_zombie[victim] || g_nodamage[victim]) continue; // Last human is killed if (fnGetHumans() == 1) { ExecuteHamB(Ham_Killed, victim, attacker, 0) continue; } // Infected victim's sound ArrayGetString(grenade_infect_player, random_num(0, ArraySize(grenade_infect_player) - 1), sound, charsmax(sound)) emit_sound(victim, CHAN_VOICE, sound, 1.0, ATTN_NORM, 0, PITCH_NORM) // Get victim armor static Float:armor pev(victim, pev_armorvalue, armor) // Turn into zombie if(armor > 100) { set_pev(victim, pev_armorvalue, floatmax(0.0, armor - 100)) } if(armor < 100) { zombieme(victim, attacker, 0, 1, 1) } } // Get rid of the grenade engfunc(EngFunc_RemoveEntity, ent) } 對於godbird在29/3的回文,說小弟這教學文是仿製他的寫法感到詫異,他說我仿製他的寫法根本就無憑沒據,原因是他根本沒有發過關於病毒炸彈的插件或教學,我即使要仿製也要有他發的文章有關於病毒炸彈扣護甲的插件,這足以證明我沒有仿製他的寫法。可能是我這插件的內容很少,都只是static armor,再指出armor>100和armor<100的情況(>100就扣護甲,<100就變成屍),可能是寫法相似,但說我仿製就絕無根據
[ 此文章被dennis888在2011-03-31 19:38重新編輯 ]
|