搜索
查看: 2185|回复: 1

[AMXX 带源码] [求助]CS1.5防炸 debug 修正法?

[复制链接]
发表于 2009-4-1 14:49:59 | 显示全部楼层 |阅读模式 来自 中国–云南–昆明
04/01/2009 - 14:35:46: [AMXX] Run time error 10 (plugin "PreventAttackServer.amxx") (native "get_weaponname") - debug not enabled!
L 04/01/2009 - 14:35:46: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/01/2009 - 14:35:46: Invalid weapon id 0


#include <amxmodx>

new lastWeap[33]
new DQWeap[33]

public plugin_init(){
        register_plugin("PreventAttackServer","1.0","xxx")
        server_cmd("alias name")
        server_cmd("sv_allowdownload 0")
        register_clcmd("lastinv","MyLast")
        register_event("CurWeapon","switchweapon","be","1=1")
}

public client_connect(id)
{
        lastWeap[id] = CSW_KNIFE
}

public MyLast(id)
{
        new WName[32]
        get_weaponname(lastWeap[id],WName,31)
        engclient_cmd(id,WName)
        return PLUGIN_HANDLED
}

public switchweapon(id)
{
        new tmp=read_data(2)
        if(DQWeap[id]!=tmp)
{
        lastWeap[id]=DQWeap[id]
}
        return PLUGIN_CONTINUE
}
发表于 2009-4-2 01:23:22 | 显示全部楼层 来自 中国–广西–南宁–西乡塘区
帮顶一下
回复

使用道具 举报

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

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