Interesting one. Pity i have no time to play with amx/x more.
I suggest converting flashlight_drainfreq & flashlight_chargefreq into cvars called e.g. flashlight_deplete_secs & flashlight_fullcharge_secs (if possible of course) which will stand for number of seconds fully charged flashlight can emit light until is depleted & number of secs an exhausted flashlight have to be charged respectively. This is more user-friendly.
Also you can optimize calculations within Make_FlashLight(id) (looks like it can be called rather often):
iAttn = 256 + iDecay * get_pcvar_num(g_pcvarFlashAttn) // barney/dontaskme
fTemp = 256 / (256 + iDecay * get_pcvar_num(g_pcvarFlashAttn))
write_byte((g_iColor[id][Red] * fTemp)
Also this one
#define SOUND_FLASHLIGHT_ON "items/flashlight1.wav"
#define SOUND_FLASHLIGHT_OFF "items/flashlight1.wav"
theoretically makes resource duplication (depends of number of macro entries in the code) in compiled plugin. I would rather use new const
instead of #DEFINE for string constants especially when they occure twice or more in the source code.
Again, pity i could not test it in-game. As i remember Avalanche's plugin did not feed my needs in conjunction with Blinding Flashlight.