昨日:篇  今日:篇   总帖:篇   会员:
海海Lv1  
DOD1.3 聊天处显示KD比 say /ratio     
#include <amxmodx>
#include <dodfun>
#include <dodx>

#define VERSION "1.0"
#define SVERSION "v1.0 - by diamond-optic "

new p_dod_say_ratio

public plugin_init()
{
	register_plugin("DoD Say Ratio",VERSION,"AMXX DoD Team")
	register_cvar("dod_say_ratio_stats",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)
	
	p_dod_say_ratio = register_cvar("dod_say_ratio","1")
	
	register_clcmd("say /ratio","dod_ratio")
	register_clcmd("say_team /ratio","dod_ratio")
}

public dod_ratio(id) 
{
	if(is_user_connected(id))
		{		
		new deaths = dod_get_pl_deaths(id)
	
		if(!deaths)
			deaths = 1
	
		new Float:kd_ratio = floatdiv(float(dod_get_user_kills(id)),float(deaths))
	
		client_print(id,print_chat,"** 你的 杀敌/死亡 比是 %.2f **",kd_ratio)
		}
		
	return PLUGIN_CONTINUE
}

public client_death(killer,victim,wpnindex,hitplace,TK)
	if(!is_user_bot(victim) && is_user_connected(victim) && get_pcvar_num(p_dod_say_ratio))
		set_task(1.0,"dod_ratio",victim)

 4  已被阅读了158次  楼主 2020-01-16 11:16:40
回复列表

回复:DOD1.3 聊天处显示KD比 say /ratio

联系站长  免备案
您的IP:18.204.227.117,2020-05-26 05:34:49,Processed in 0.01099 second(s).
免责声明: 本网不承担任何由内容提供商提供的信息所引起的争议和法律责任。
Powered by HadSky 7.3.6
(4) 分享
分享
取消
已有0次打赏