|
这个插件是军衔插件。但是最差的地方就是。这个插件不一直显示,还有就是每局居然不保存血
我晕如果每局都不保存血那别人辛苦练到的军衔就白费了
希望哪个大哥改下 /**************************************************************************************************
* ============================
* == 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[33]
new level[33]
// =============================================
public event_deathmsg() // Event called when a deathmessage is displayed
{
new killer = read_data(1)
new victim = read_data(2)
new wpn[32]
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[killer] += 40
}
else if ( equal(wpn,"grenade") )
{
xp[killer] += 25
}
else if (read_data(3))
{
xp[killer] += 15
}
else
{
xp[killer] += 10
}
// End of the xp bonus
if (xp[killer] <= 49)
{
level[killer] = 0
show_hudmessage(killer,"第三司令部: %d / 50 ^n 等级: %d ^n 您为小兵兵,血值不变: 100" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 49) && (xp[killer] < 100) )
{
level[killer] = 1
show_hudmessage(killer,"第三司令部: %d / 100 ^n 等级: %d ^n 恭喜您升级为班长级别,增加血值: 120" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 99) && (xp[killer] < 150) )
{
level[killer] = 2
show_hudmessage(killer,"第三司令部: %d / 150 ^n 等级: %d ^n 恭喜您升级为排长级别,增加血值: 135" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 149) && (xp[killer] < 200) )
{
level[killer] = 3
show_hudmessage(killer,"第三司令部: %d / 200 ^n 等级: %d ^n 恭喜您升级为连长级别,增加血值: 145" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 199) && (xp[killer] < 250) )
{
level[killer] = 4
show_hudmessage(killer,"第三司令部: %d / 250 ^n 等级: %d ^n 恭喜您升级为营长级别,增加血值: 165" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 249) && (xp[killer] < 300) )
{
level[killer] = 5
show_hudmessage(killer,"第三司令部: %d / 300 ^n 等级: %d ^n 恭喜您升级为团长级别,增加血值: 195" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 299) && (xp[killer] < 350) )
{
level[killer] = 6
show_hudmessage(killer,"第三司令部: %d / 350 ^n 等级: %d ^n 恭喜您升级为旅长长级别,增加血值: 205" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 349) && (xp[killer] < 400) )
{
level[killer] = 7
show_hudmessage(killer,"第三司令部: %d / 400 ^n 等级: %d ^n 恭喜您升级为师长级别,增加血值: 235" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 449) && (xp[killer] < 500) )
{
level[killer] = 8
show_hudmessage(killer,"第三司令部: %d / 500 ^n 等级: %d ^n 恭喜您升级为军长级别,增加血值: 265" , xp[killer] , level[killer] )
}
else if (xp[killer] > 499)
{
level[killer] = 9
show_hudmessage(killer,"老天,您杀敌无数,万众爱戴,您成为了将军!. ^n 第三司令部: %d ^n 你的终极血值: 1000" , xp[killer] )
}
}
}
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[id] == 0)
{
show_hudmessage(id,"第三司令部: %d / 50 ^n 您的等级-小兵兵: %d ^n 您为小兵兵,未杀敌,血值不变: 100" , xp[id] , level[id] )
set_user_health(id, 100)
}
else if (level[id] == 1)
{
show_hudmessage(id,"第三司令部: %d / 100 ^n 您的等级-班长级别: %d ^n 您当前血值: 120" , xp[id] , level[id] )
set_user_health(id, 120)
}
else if (level[id] == 2)
{
show_hudmessage(id,"第三司令部: %d / 150 ^n 您的等级-排长级别: %d ^n 您当前血值: 135" , xp[id] , level[id] )
set_user_health(id, 135)
}
else if (level[id] == 3)
{
show_hudmessage(id,"第三司令部: %d / 200 ^n 您的等级-连长级别: %d ^n 您当前血值: 145" , xp[id] , level[id] )
set_user_health(id, 145)
}
else if (level[id] == 4)
{
show_hudmessage(id,"第三司令部: %d / 250 ^n 您的等级-营长级别: %d ^n 您当前血值: 165" , xp[id] , level[id] )
set_user_health(id, 165)
}
else if (level[id] == 5)
{
show_hudmessage(id,"第三司令部: %d / 300 ^n 您的等级-团长级别: %d ^n 您当前血值: 195" , xp[id] , level[id] )
set_user_health(id, 195)
}
else if (level[id] == 6)
{
show_hudmessage(id,"第三司令部: %d / 350 ^n 您的等级-旅长级别: %d ^n 您当前血值: 205" , xp[id] , level[id] )
set_user_health(id, 205)
}
else if (level[id] == 7)
{
show_hudmessage(id,"第三司令部: %d / 400 ^n 您的等级-师长级别: %d ^n 您当前血值: 235" , xp[id] , level[id] )
set_user_health(id, 235)
}
else if (level[id] == 8)
{
show_hudmessage(id,"第三司令部: %d / 500 ^n 您的等级-军长级别: %d ^n 您当前血值: 265" , xp[id] , level[id] )
set_user_health(id, 265)
}
else if (level[id] == 9)
{
show_hudmessage(id,"您已为将军,获得终极血值1000大点!. ^n 您现为第三司令部司令级别: %d ^n 您当前血值: 1000" , xp[id])
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")
} |
|