#include <amxmodx>
#include <engine>
new pcvar_reload_flashlight
new Float:BlockTime[33];
public plugin_init()
{
register_plugin("AntiSpam FlashLight", "1.2a", "Leo_[BH]")
pcvar_reload_flashlight = register_cvar("flashlight_reload", "1.5")
register_impulse(100, "FlashLight")
}
public FlashLight(id)
{
new Float:gametime = get_gametime()
if(BlockTime[id] <= gametime)
{
BlockTime[id] = gametime + get_pcvar_float(pcvar_reload_flashlight)
return PLUGIN_CONTINUE;
}
return PLUGIN_HANDLED;
}
public client_disconnect(id)
{
BlockTime[id] = 0.0;
}