ailisi 发表于 2007-5-2 22:37:49

stats 如何修改显示枪代码,谢谢

/* build list of attackers */
getAttackers(id) {
new name,t_sWpn, stats,body,found=0
new pos = copy(g_Buffer,2047,"攻击者:^n")
new amax = get_maxplayers()
for(new a = 1; a <= amax; ++a){
if(get_user_astats(id,a,stats,body,t_sWpn,31)){
   found = 1
   if (stats)
    format(t_sWpn,31," - %s",t_sWpn)
   else
    t_sWpn = 0
   get_user_name(a,name,31)
   pos += format(g_Buffer,2047-pos,"%s -- 击中 %d次/ %d点伤害%s^n",name,stats,stats,t_sWpn)
}
}
return found
}

/* save hits and damage */
public eCSDeathMsg() {
new killer = read_data(1)
new victim = read_data(2)
if ( killer == victim ) return
new vorigin, korigin
get_user_origin(victim,vorigin)
get_user_origin(killer,korigin)
g_Killers = killer
g_Killers = get_user_health(killer)
g_Killers = get_user_armor(killer)      
g_Killers = get_distance(vorigin,korigin)
if ( ShowKiller ){
new name, stats, body, t_sWpn, mstats, mbody
get_user_name(killer,name,31)
get_user_astats(victim,killer,stats,body,t_sWpn,31)
if ( !get_user_vstats(victim,killer,mstats,mbody) )
   mstats = mstats = 0
set_hudmessage(220,80,0,0.05,0.15,0, 6.0, 12.0, 1.0, 2.0, 1)
getHits(victim,killer)
show_hudmessage(victim,"%s 用 %s 将你击毙^n距离你 %.2f 米.^n他对你造成 %d 的伤害,打中你 %d 次^n他还有 %d生命值 和 %d护甲.^n你对他造成了 %d 的伤害, 击中他 %d次.^n他击中了你下列部位:^n%s",
name,t_sWpn,float(g_Killers) * 0.0254,stats,stats,   g_Killers,g_Killers,
mstats,mstats,g_Buffer )
}
if ( ShowVictims && getVictims(victim) ){
set_hudmessage(0,80,220,0.55,0.60,0, 6.0, 12.0, 1.0, 2.0, 4)
show_hudmessage(victim,g_Buffer)
}
if ( ShowAttackers&& getAttackers(victim)){
set_hudmessage(220,80,0,0.55,0.35,0, 6.0, 12.0, 1.0, 2.0, 3)
show_hudmessage(victim,g_Buffer)
}
if (KillerHpAp ){
new name, kmsg
get_user_name(killer,name,31)
format(kmsg,127,"%s 还有 %d生命值 和 %d护甲",name,g_Killers,g_Killers)
client_print(victim,print_console,kmsg)
set_hudmessage(255,255,255,0.02,0.85,2, 1.5, 3.0, 0.02, 5.0, 1)
show_hudmessage(victim,kmsg)
}
}
页: [1]
查看完整版本: stats 如何修改显示枪代码,谢谢