|
楼主 |
发表于 2009-8-29 19:01:52
|
显示全部楼层
来自 中国–广东–深圳–南山区
还有一个问题..就是一个插件的问题
L 08/29/2009 - 02:04:43: [AMXX] Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 02:04:43: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:02:53: Start of error session.
L 08/29/2009 - 11:02:53: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20090829.log")
L 08/29/2009 - 11:02:53: [CSTRIKE] Player out of range (0)
L 08/29/2009 - 11:02:53: [AMXX] Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:02:53: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:15:59: [CSTRIKE] Player out of range (0)
L 08/29/2009 - 11:15:59: [AMXX] Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:15:59: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/29/2009 - 11:28:06: [CSTRIKE] Player out of range (0)
L 08/29/2009 - 11:28:06: [AMXX] Run time error 10 (plugin "multikill_cn.amxx") (native "cs_get_user_money") - debug not enabled!
L 08/29/2009 - 11:28:06: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
只知道他说的那个函数问题..具体看不懂
#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[128]
new Killer = read_data(1)
new headshot = read_data(3)
new p_weapon[16]
read_data(4,p_weapon,15)
//爆头奖励
if(headshot){
new p_name[16]
get_user_name(Killer,p_name,15)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 1000)
}
//刀杀奖励
if(strcmp(p_weapon,"knife")==0){
new p_name[16]
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04刀杀奖励:^x03%s^x01 获得$5000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 5000)
}
//刀杀奖励
if(strcmp(p_weapon,"grenade")==0){
new p_name[16]
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[16]
get_user_name(Killer,p_name,15)
format(p_message,127,"^x04连续杀人奖励:^x03%s^x01 连续杀人5次,获得$16000!",p_name)
color_message(p_message)
cs_set_user_money(Killer,cs_get_user_money(Killer) + 16000)
}
}
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 }
*/ |
|