【注意】连续杀人奖励
提取nwb13 amx0.96 miscstats.sma作为单独一个插件在AMXX1.60下使用 使用方法和miscstats一样 在stats.ini写上
KillSeries ;连续杀人
KillSeriesReward ;连续杀人奖励
/* AMX Mod script.
*
* To use with AMX 0.9.6 (and higher) and Counter-Strike.
* Stats can be enabled with amx_statscfg and amx_statscfgmenu commands.
* NOTE: For pernament disable, comment file from plugins.ini
* or use amx_pausecfg and amx_pausecfgmenu commands.
* Rest of stats can be found in csstats plugin.
*/
#include <amxmod>
public KillSeries
public KillSeriesReward
new g_killnum
new g_killtime
new g_tempkilltime
new g_killreward
public plugin_init(){
register_plugin("Reward Misc.Stats","1.0","CHM")
register_event("DeathMsg","eDeathMsg","a")
}
public plugin_cfg(){
new g_addStast[] = "amx_statscfg add ^"%s^" %s"
server_cmd(g_addStast,"连续杀人","KillSeries")
server_cmd(g_addStast,"连续杀人奖励","KillSeriesReward")
}
public eDeathMsg(){
new killerId = read_data(1)
if ( killerId == 0 ) return
new victimId = read_data(2)
new bool:enemykill = (get_user_team(killerId) != get_user_team(victimId))
if ( KillSeries && enemykill ){
new killsm,killss,killnm,killns,temp1,temp2
get_time("%M", killsm, 2)
killnm = strtonum(killsm)
get_time("%S", killss, 2)
killns = strtonum(killss)
g_killtime = 60 * killnm + killns
if ( g_killnum == 0 )
g_tempkilltime = g_killtime
++g_killnum
temp1 = g_killtime - g_tempkilltime
temp2 = 2 * g_killnum - 1
if ( g_killnum > 1 ){
if ( temp1 <= temp2 ){
new name
get_user_name( killerId , name , 31 )
set_hudmessage( 150, 144, 50, 0.03, 0.85, 0, 6.0, 10.0, 0.1, 0.2, 5)
if ( KillSeriesReward ){
new tempmoney = 1000 * (g_killnum -1)
g_killreward += tempmoney
show_hudmessage(0,"%s在%d秒钟内连杀了%d个敌人^n在本局结束时将得到$%d奖励",name,temp2,g_killnum,g_killreward )
}else{
show_hudmessage(0,"%s在%d秒钟内连杀了%d个敌人",name,temp2,g_killnum)
}
}else{
g_killnum = 1
g_tempkilltime = g_killtime
}
}
}
}
回复: 【注意】连续杀人奖励
在本局结束才奖励似乎体现不到即时CS游戏的乐趣。:d:这就会有个BUG,例如:一局2分钟,没死的一方会狂加钱。
给个修改建议,用get_timeleft来处理时间。2分钟一局肯定是120秒的。
回复: 【注意】连续杀人奖励
:p:sweat::(;)回复: 【注意】连续杀人奖励
谢谢天空,不知道AMX0.9.5能不能用 :rolleyes::spiderman:boss:回复: 【注意】连续杀人奖励
看看先~~ :D:D回复: 【注意】连续杀人奖励
:super::super:回复: 【注意】连续杀人奖励
cccccccccccccccccccccccc回复: 【注意】连续杀人奖励
回复,一个..看看里面的内容!回复: 【注意】连续杀人奖励
支持一下了先感谢分享