|
发表于 2005-5-8 21:04:14
|
显示全部楼层
来自 中国–广东–广州–白云区
/**************************************************************************************************
* ============================
* == 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 110
* 2 120
* 3 130
* 4 140
*
* 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 / 500 ^n 等级: %d ^n 您为一等兵,血值不变: 100" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 990) && (xp[killer] < 1000) )
{
level[killer] = 1
show_hudmessage(killer,"火线任务: %d / 1000 ^n 等级: %d ^n 恭喜您升级为二等兵级别,增加血值: 110" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 1490) && (xp[killer] < 1500) )
{
level[killer] = 2
show_hudmessage(killer,"火线任务: %d / 1500 ^n 等级: %d ^n 恭喜您升级为三等兵级别,增加血值: 120" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 1990) && (xp[killer] < 2000) )
{
level[killer] = 3
show_hudmessage(killer,"火线任务: %d / 2000 ^n 等级: %d ^n 恭喜您升级为上等兵级别,增加血值: 130" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 2490) && (xp[killer] < 2500) )
{
level[killer] = 4
show_hudmessage(killer,"火线任务: %d / 2500 ^n 等级: %d ^n 恭喜您升级为准士级别,增加血值: 140" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 2990) && (xp[killer] < 3000) )
{
level[killer] = 5
show_hudmessage(killer,"火线任务: %d / 3000 ^n 等级: %d ^n 恭喜您升级为下士级别,增加血值: 150" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 3490) && (xp[killer] < 3500) )
{
level[killer] = 6
show_hudmessage(killer,"火线任务: %d / 3500 ^n 等级: %d ^n 恭喜您升级为中士级别,增加血值: 160" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 4490) && (xp[killer] < 4000) )
{
level[killer] = 7
show_hudmessage(killer,"火线任务: %d / 4000 ^n 等级: %d ^n 恭喜您升级为上士级别,增加血值: 170" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 4990) && (xp[killer] < 5000) )
{
level[killer] = 8
show_hudmessage(killer,"火线任务: %d / 5000 ^n 等级: %d ^n 恭喜您升级为少尉级别,增加血值: 180" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 5990) && (xp[killer] < 6000) )
level[killer] = 9
show_hudmessage(killer,"火线任务: %d / 6000 ^n 等级: %d ^n 恭喜您升级为中尉级别,增加血值: 190" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 6990) && (xp[killer] < 7000) )
level[killer] = 10
show_hudmessage(killer,"火线任务: %d / 7000 ^n 等级: %d ^n 恭喜您升级为上尉级别,增加血值: 200" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 7990) && (xp[killer] < 8000) )
level[killer] = 11
show_hudmessage(killer,"火线任务: %d / 8000 ^n 等级: %d ^n 恭喜您升级为少校级别,增加血值: 210" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 8990) && (xp[killer] < 9000) )
level[killer] = 12
show_hudmessage(killer,"火线任务: %d / 9000 ^n 等级: %d ^n 恭喜您升级为中校级别,增加血值: 220" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 9999) && (xp[killer] < 10000) )
level[killer] = 13
show_hudmessage(killer,"火线任务: %d / 10000 ^n 等级: %d ^n 恭喜您升级为上校级别,增加血值: 230" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 10999) && (xp[killer] < 11000) )
level[killer] = 14
show_hudmessage(killer,"火线任务: %d / 11000 ^n 等级: %d ^n 恭喜您升级为准将级别,增加血值: 240" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 11999) && (xp[killer] < 12000) )
level[killer] = 15
show_hudmessage(killer,"火线任务: %d / 12000 ^n 等级: %d ^n 恭喜您升级为将军级别,增加血值: 250" , xp[killer] , level[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 / 500 ^n 您的等级-一等兵: %d ^n 您为一等兵,未杀敌,血值不变: 100" , xp[id] , level[id] )
set_user_health(id, 100)
}
else if (level[id] == 1)
{
show_hudmessage(id,"火线任务: %d / 1000 ^n 您的等级-二等兵: %d ^n 您当前血值: 110" , xp[id] , level[id] )
set_user_health(id, 110)
}
else if (level[id] == 2)
{
show_hudmessage(id,"火线任务: %d / 1500 ^n 您的等级-三等兵: %d ^n 您当前血值: 120" , xp[id] , level[id] )
set_user_health(id, 120)
}
else if (level[id] == 3)
{
show_hudmessage(id,"火线任务: %d / 2000 ^n 您的等级-上等兵: %d ^n 您当前血值: 130" , xp[id] , level[id] )
set_user_health(id, 130)
}
else if (level[id] == 4)
{
show_hudmessage(id,"火线任务: %d / 2500 ^n 您的等级-准士: %d ^n 您当前血值: 140" , xp[id] , level[id] )
set_user_health(id, 140)
}
else if (level[id] == 5)
{
show_hudmessage(id,"火线任务: %d / 3000 ^n 您的等级-下士: %d ^n 您当前血值: 150" , xp[id] , level[id] )
set_user_health(id, 150)
}
else if (level[id] == 6)
{
show_hudmessage(id,"火线任务: %d / 3500 ^n 您的等级-中士: %d ^n 您当前血值: 160" , xp[id] , level[id] )
set_user_health(id, 160)
}
else if (level[id] == 7)
{
show_hudmessage(id,"火线任务: %d / 4000 ^n 您的等级-上士: %d ^n 您当前血值: 170" , xp[id] , level[id] )
set_user_health(id, 170)
}
else if (level[id] == 8)
{
show_hudmessage(id,"火线任务: %d / 5000 ^n 您的等级-少尉: %d ^n 您当前血值: 180" , xp[id] , level[id] )
set_user_health(id, 180)
}
else if (level[id] == 9)
{
show_hudmessage(id,"火线任务: %d / 6000 ^n 您的等级-中尉: %d ^n 您当前血值: 190" , xp[id] , level[id] )
set_user_health(id, 190)
}
else if (level[id] == 10)
{
show_hudmessage(id,"火线任务: %d / 7000 ^n 您的等级-上尉: %d ^n 您当前血值: 200" , xp[id] , level[id] )
set_user_health(id, 200)
}
else if (level[id] == 11)
{
show_hudmessage(id,"火线任务: %d / 8000 ^n 您的等级-少校: %d ^n 您当前血值: 210" , xp[id] , level[id] )
set_user_health(id, 210)
}
else if (level[id] == 12)
{
show_hudmessage(id,"火线任务: %d / 9000 ^n 您的等级-中校: %d ^n 您当前血值: 220" , xp[id] , level[id] )
set_user_health(id, 220)
}
else if (level[id] == 13)
{
show_hudmessage(id,"火线任务: %d / 10000 ^n 您的等级-上校: %d ^n 您当前血值: 230" , xp[id] , level[id] )
set_user_health(id, 230)
}
else if (level[id] == 14)
{
show_hudmessage(id,"火线任务: %d / 11000 ^n 您的等级-准将: %d ^n 您当前血值: 240" , xp[id] , level[id] )
set_user_health(id, 240)
}
else if (level[id] == 15)
{
show_hudmessage(id,"火线任务: %d / 12000 ^n 您的等级-将军: %d ^n 您当前血值: 250" , xp[id] , level[id] )
set_user_health(id, 250)
}
}
// =============================================
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")
} |
|