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