请AMXX高手帮改一下.有原码!
#include <amxmodx>#include <cstrike>
new p_lastk=0,p_lastk_count=0
public plugin_init() {
register_plugin("MultiKill", "1.0", "Marshall")
register_event("DeathMsg", "hook_death", "a")
register_logevent("hook_roundstart",2,"0=World triggered","1=Round_Start")
}
public hook_death(){
new p_message
new Killer = read_data(1)
new headshot = read_data(3)
new p_weapon
read_data(4,p_weapon,15)
//爆头奖励
if(headshot){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04爆头奖励:^x03%s^x01 获得$1000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1000)
}
//刀杀奖励
if(strcmp(p_weapon,"knife")==0){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04刀杀奖励:^x03%s^x01 获得$1500!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1500)
}
//刀杀奖励
if(strcmp(p_weapon,"grenade")==0){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04雷杀奖励:^x03%s^x01 获得$1500!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1500)
}
//连续杀人奖励
if(p_lastk != Killer){
p_lastk = Killer
p_lastk_count =1
}
else
p_lastk_count++
if(p_lastk_count>=5){
new p_name
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04连续杀人奖励:^x03%s^x01 连续杀人5次,获得$3000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 3000)
}
}
public hook_roundstart(){
p_lastk=0
p_lastk_count=0
}
color_message(p_message[]){
message_begin(MSG_ALL, get_user_msgid("SayText"))
write_byte(1)
write_string(p_message)
message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2052\\ f0\\ fs16 \n\\ par }
*/
请帮改成加血的.谢谢.用于CSDM.据体数量我自己改就行.
回复: 请AMXX高手帮改一下.有原码!
cs_set_user_health(Killer,cs_get_user_health(Killer) + 30这么改行吗?
页:
[1]