|
提取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[33]
new g_killtime[33]
new g_tempkilltime[33]
new g_killreward[33]
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[32][3],killss[32][3],killnm[32],killns[32],temp1,temp2
get_time("%M", killsm[killerId], 2)
killnm[killerId] = strtonum(killsm[killerId])
get_time("%S", killss[killerId], 2)
killns[killerId] = strtonum(killss[killerId])
g_killtime[killerId] = 60 * killnm[killerId] + killns[killerId]
if ( g_killnum[killerId] == 0 )
g_tempkilltime[killerId] = g_killtime[killerId]
++g_killnum[killerId]
temp1 = g_killtime[killerId] - g_tempkilltime[killerId]
temp2 = 2 * g_killnum[killerId] - 1
if ( g_killnum[killerId] > 1 ){
if ( temp1 <= temp2 ){
new name[32]
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[killerId] -1)
g_killreward[killerId] += tempmoney
show_hudmessage(0,"%s在%d秒钟内连杀了%d个敌人^n在本局结束时将得到$%d奖励",name,temp2,g_killnum[killerId],g_killreward[killerId] )
}else{
show_hudmessage(0,"%s在%d秒钟内连杀了%d个敌人",name,temp2,g_killnum[killerId])
}
}else{
g_killnum[killerId] = 1
g_tempkilltime[killerId] = g_killtime[killerId]
}
}
}
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|