Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Anti-Spam Flashlight

A Config Script for Counter-Strike 1.6

No ads for members. Membership is 100% free. Sign up!
32 600 bytes Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#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;
}
The plugin prevent spam flashlight on the server!
And protection against flashlight spam script

Requirements:
Engine module

Cvars:
flashlight_reload - How often can turn on / off the flashlight. (default: "1.5")
Sign up to access this!

No comments yet

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Original Authors
Leo_[BH]
Amxx codes

Submitter

Ghost1495111 avatar
Ghost1495111 Joined 4y ago
inactive
4,013 points Ranked 1769th
41 medals 4 legendary 12 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon
Ghost1495111
Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

License

Attributes

Language
Pawn

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 0
  • 1.6k
  • 3y
  • 3y

More from Submitter

More AMX/X Scripts Scripts