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重新编辑 ]
|