Try this
Code:
#include <amxmodx>
#include <amxmisc>
//#include <fun>
#include <engine>
public plugin_init() {
register_plugin("NoScopeMode","1.0","Fire")
register_cvar("sv_scope","1")
register_clcmd("amx_scope","ToggleScope",ADMIN_LEVEL_A,"<1|0> - Turns No Scope Mode On/Off")
}
public client_PreThink(id) {
if (!get_cvar_num("sv_scope"))
return PLUGIN_CONTINUE;
if(!is_user_alive(id))
return PLUGIN_CONTINUE;
new button = get_user_button(id);
if(button & IN_ATTACK2)
entity_set_int(id,EV_INT_button,button & ~IN_ATTACK2);
return PLUGIN_CONTINUE;
}
public ToggleScope(id,lvl,cid) {
if( !cmd_access(id,lvl,cid,1) )
return PLUGIN_HANDLED;
set_hudmessage(200, 100, 0, -1.0, 0.35, 0, 6.0, 12.0, 0.1, 0.2, 4);
new arg[4]
read_argv( 1, arg, 4 )
if( equali( arg, "on", 2 ) || equali( arg, "1", 1 ) )
{
set_cvar_num( "sv_scope", 1)
show_hudmessage(0,"No Scope Mode Is On")
}
else
{
set_cvar_num( "sv_scope", 0)
show_hudmessage(0,"No Scope Mode Is Off")
}
return PLUGIN_HANDLED
}
Note:
You didnt need fun module included..
Also, you should follow the naming conventions used for CVARs and AMX commands, like:
Cvars start with 'sv_', which stands for 'Server Variable'
Commands start with 'amx_' which is self-explanitory.. (or 'amxx_')
Just helps users remember the command/cvar name..
Editted to reflect Avalanches keen eye from post below

(using all default values of course...)