zhangwei3080 发表于 2009-4-1 14:49:59

[求助]CS1.5防炸 debug 修正法?

04/01/2009 - 14:35:46: Run time error 10 (plugin "PreventAttackServer.amxx") (native "get_weaponname") - debug not enabled!
L 04/01/2009 - 14:35:46: 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
new DQWeap

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 = CSW_KNIFE
}

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

public switchweapon(id)
{
        new tmp=read_data(2)
        if(DQWeap!=tmp)
{
        lastWeap=DQWeap
}
        return PLUGIN_CONTINUE
}

wsqs 发表于 2009-4-2 01:23:22

帮顶一下
页: [1]
查看完整版本: [求助]CS1.5防炸 debug 修正法?