那为大哥帮小弟修改下这个插件
这个插件是军衔插件。但是最差的地方就是。这个插件不一直显示,还有就是每局居然不保存血我晕如果每局都不保存血那别人辛苦练到的军衔就白费了
希望哪个大哥改下 /**************************************************************************************************
* ============================
* == earn_health_mod v1.0 ==
* == made by Amok ==
* ============================
* 微波炉汉化+修正+增强
* Thanks for downloading the earn_health_mod.
*
* Description: For each kill you gain experience-points (xp).
* After reaching a certain amount of xp, you level up.
* With each level you get more HP (Healthpoints) at
* the beginning of a round. You start at level 0 with 100 HP.
*
* Level: HP:
* 0 100
* 1 120
* 2 135
* 3 145
* 4 150
*
* You will get a bonus for difficult kills:
*
* Sort of kill: XP you gain:
* - normal kill 10
* - Headshot 15
* - grenade kill 25
* - knifekill 40
*
* I think that's all you need to know and I hope you'll enjoy it.
*
* Amok
*
*
**************************************************************************************************/
#include <amxmodx>
#include <fun>
// =============================================
new xp
new level
// =============================================
public event_deathmsg() // Event called when a deathmessage is displayed
{
new killer = read_data(1)
new victim = read_data(2)
new wpn
read_data(4,wpn,31)
// Don't do anything if it's a suicide or TK
if ( !killer || killer==victim || get_user_team(killer)==get_user_team(victim) )
{
return PLUGIN_CONTINUE
}
// Do the following if it's a normal kill
else
{
if (killer)
{
set_hudmessage(255,255,255,0.3, 0.53, 0, 3.0, 6.0, 0.5, 0.15, 3)
// Xp Bonus
if ( equal(wpn,"knife") )
{
xp += 40
}
else if ( equal(wpn,"grenade") )
{
xp += 25
}
else if (read_data(3))
{
xp += 15
}
else
{
xp += 10
}
// End of the xp bonus
if (xp <= 49)
{
level = 0
show_hudmessage(killer,"第三司令部: %d / 50 ^n 等级: %d ^n 您为小兵兵,血值不变: 100" , xp , level )
}
else if ( (xp > 49) && (xp < 100) )
{
level = 1
show_hudmessage(killer,"第三司令部: %d / 100 ^n 等级: %d ^n 恭喜您升级为班长级别,增加血值: 120" , xp , level )
}
else if ( (xp > 99) && (xp < 150) )
{
level = 2
show_hudmessage(killer,"第三司令部: %d / 150 ^n 等级: %d ^n 恭喜您升级为排长级别,增加血值: 135" , xp , level )
}
else if ( (xp > 149) && (xp < 200) )
{
level = 3
show_hudmessage(killer,"第三司令部: %d / 200 ^n 等级: %d ^n 恭喜您升级为连长级别,增加血值: 145" , xp , level )
}
else if ( (xp > 199) && (xp < 250) )
{
level = 4
show_hudmessage(killer,"第三司令部: %d / 250 ^n 等级: %d ^n 恭喜您升级为营长级别,增加血值: 165" , xp , level )
}
else if ( (xp > 249) && (xp < 300) )
{
level = 5
show_hudmessage(killer,"第三司令部: %d / 300 ^n 等级: %d ^n 恭喜您升级为团长级别,增加血值: 195" , xp , level )
}
else if ( (xp > 299) && (xp < 350) )
{
level = 6
show_hudmessage(killer,"第三司令部: %d / 350 ^n 等级: %d ^n 恭喜您升级为旅长长级别,增加血值: 205" , xp , level )
}
else if ( (xp > 349) && (xp < 400) )
{
level = 7
show_hudmessage(killer,"第三司令部: %d / 400 ^n 等级: %d ^n 恭喜您升级为师长级别,增加血值: 235" , xp , level )
}
else if ( (xp > 449) && (xp < 500) )
{
level = 8
show_hudmessage(killer,"第三司令部: %d / 500 ^n 等级: %d ^n 恭喜您升级为军长级别,增加血值: 265" , xp , level )
}
else if (xp > 499)
{
level = 9
show_hudmessage(killer,"老天,您杀敌无数,万众爱戴,您成为了将军!. ^n 第三司令部: %d ^n 你的终极血值: 1000" , xp )
}
}
}
return PLUGIN_CONTINUE
}
// =============================================
public eNewRound(id)
{
set_hudmessage(255,255,255,0.3, 0.53, 0, 3.0, 6.0, 0.5, 0.15, 3)
if (level == 0)
{
show_hudmessage(id,"第三司令部: %d / 50 ^n 您的等级-小兵兵: %d ^n 您为小兵兵,未杀敌,血值不变: 100" , xp , level )
set_user_health(id, 100)
}
else if (level == 1)
{
show_hudmessage(id,"第三司令部: %d / 100 ^n 您的等级-班长级别: %d ^n 您当前血值: 120" , xp , level )
set_user_health(id, 120)
}
else if (level == 2)
{
show_hudmessage(id,"第三司令部: %d / 150 ^n 您的等级-排长级别: %d ^n 您当前血值: 135" , xp , level )
set_user_health(id, 135)
}
else if (level == 3)
{
show_hudmessage(id,"第三司令部: %d / 200 ^n 您的等级-连长级别: %d ^n 您当前血值: 145" , xp , level )
set_user_health(id, 145)
}
else if (level == 4)
{
show_hudmessage(id,"第三司令部: %d / 250 ^n 您的等级-营长级别: %d ^n 您当前血值: 165" , xp , level )
set_user_health(id, 165)
}
else if (level == 5)
{
show_hudmessage(id,"第三司令部: %d / 300 ^n 您的等级-团长级别: %d ^n 您当前血值: 195" , xp , level )
set_user_health(id, 195)
}
else if (level == 6)
{
show_hudmessage(id,"第三司令部: %d / 350 ^n 您的等级-旅长级别: %d ^n 您当前血值: 205" , xp , level )
set_user_health(id, 205)
}
else if (level == 7)
{
show_hudmessage(id,"第三司令部: %d / 400 ^n 您的等级-师长级别: %d ^n 您当前血值: 235" , xp , level )
set_user_health(id, 235)
}
else if (level == 8)
{
show_hudmessage(id,"第三司令部: %d / 500 ^n 您的等级-军长级别: %d ^n 您当前血值: 265" , xp , level )
set_user_health(id, 265)
}
else if (level == 9)
{
show_hudmessage(id,"您已为将军,获得终极血值1000大点!. ^n 您现为第三司令部司令级别: %d ^n 您当前血值: 1000" , xp)
set_user_health(id, 1000)
}
}
// =============================================
public plugin_init()
{
register_plugin("earn_health_mod","1.0","amok-微波炉汉化增强版-by lai-xiwan")
register_event("DeathMsg","event_deathmsg","a")
register_event("RoundTime", "eNewRound", "bc")
}
页:
[1]