搜索
查看: 1914|回复: 3

请大家都进来看看

[复制链接]
发表于 2008-5-29 12:48:49 | 显示全部楼层 |阅读模式 来自 中国–广东
我用了击中对方声音这个插件
但在LOGs里老是出现这样的错误信息
请求大家帮忙指点,谢谢!!
L 05/29/2008 - 00:53:18: Invalid player id 107
L 05/29/2008 - 00:53:18: [AMXX] Displaying debug trace (plugin "hitnotify.amxx")
L 05/29/2008 - 00:53:18: [AMXX] Run time error 10: native error (native "client_cmd")
L 05/29/2008 - 00:53:18: [AMXX] [0] hitnotify.sma::got_hit (line 44)
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
public plugin_init()
{
register_plugin("Hit notifications","0.1","DahVid")
register_event("Damage", "got_hit", "b")
register_cvar("hn_redflash","1")
register_cvar("hn_shake","1")
register_cvar("hn_beep","1")
}
public plugin_precache()
{
precache_sound("q3/myshot2.wav")
}
public got_hit(id)
{
if(is_user_alive(id) && is_user_connected(id)) {
if(get_cvar_num("hn_redflash")) {
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
write_short(25)
write_short(25)
write_short(9)
write_byte(255)
write_byte(0)
write_byte(0)
write_byte(100)
message_end()
}
if(get_cvar_num("hn_shake")) {
message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id)
write_short(10000)
write_short(500)
write_short(500)
message_end()
}
if(get_cvar_num("hn_beep")) {
new attacker=get_user_attacker(id)
if(attacker>0) {
client_cmd(attacker,"spk q3/myshot2.wav")
}
}
}
return PLUGIN_HANDLED
}
发表于 2008-5-30 01:47:01 | 显示全部楼层 来自 中国–福建–漳州

回复: 请大家都进来看看

把这一行:
if(is_user_alive(id) && is_user_connected(id)) {

改成

if(is_user_connected(id) && is_user_alive(id)) {
回复

使用道具 举报

 楼主| 发表于 2008-5-30 10:06:27 | 显示全部楼层 来自 中国–广东

回复: 请大家都进来看看

谢谢!rulzy 我去试试看
回复

使用道具 举报

 楼主| 发表于 2008-5-30 12:46:18 | 显示全部楼层 来自 中国–广东

回复: 请大家都进来看看

还是会出以下错误信息

[QUOTE][/2008 - 12:37:18: [AMXX] Displaying debug trace (plugin "hitnotify.amxx")
L 05/30/2008 - 12:37:18: [AMXX] Run time error 10: native error (native "client_cmd")
L 05/30/2008 - 12:37:18: [AMXX]    [0] hitnotify.sma::got_hit (line 44)/QUOTE]
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表