|
发表于 2009-3-26 14:36:39
|
显示全部楼层
来自 中国–广西–百色–那坡县
刀杀奖励怎么会和塞盟的中文ID严重冲突呢?
你用这个代码应该没有
public plugin_init(){
register_plugin("knifeKill","1.0","A.MI")
register_event("DeathMsg","eDeathMsg","a")
}
public eDeathMsg(){
new weapon[32], msg[128]
read_data(4,weapon,31)
new killer = read_data(1)
new victim = read_data(2)
if (!killer || killer==victim)
return PLUGIN_CONTINUE
if (get_user_team(killer)==get_user_team(victim))
return PLUGIN_CONTINUE
if(is_user_connected(killer)){
if( containi(weapon,"knife")!=-1 ){
format(msg,127,"你真勇敢,用匕首杀敌,奖励3000金钱")
set_hudmessage(0, 255, 100, 0.01, 0.25, 2, 2.0, 5.0, 0.01, 0.1, 6)
show_hudmessage(killer, msg)
cs_set_user_money(killer,cs_get_user_money(killer)+2700)
set_task(0.5,"chick_user_money",killer);
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
public chick_user_money(killer){
if(cs_get_user_money(killer)>16000){
cs_set_user_money(killer,16000,1);
}
return PLUGIN_CONTINUE
} |
|