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

Glock 18 Full Auto

A Config Script for Counter-Strike 1.6

No ads for members. Membership is 100% free. Sign up!
38 1 kb 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
33
34
35
36
37
38
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"

const XO_WEAPON = 4
const m_flNextPrimaryAttack = 46
const m_iShotsFired = 64
//const m_fWeaponState = 74
//const WEAPONSTATE_GLOCK18_BURST_MODE  = (1<<1)

const Float:DEFAULT_GLOCK_CYCLETIME = 0.2

new g_pCvarCycleTime

public plugin_init()
{
    register_plugin("Automatic Glock18", VERSION, "ConnorMcLeod")

    g_pCvarCycleTime = register_cvar("mp_glock_auto_cycletime", "0.2")

    RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_glock18", "CGLOCK18_PrimaryAttack_Post", true)
}

public CGLOCK18_PrimaryAttack_Post( iGlock )
{
    if( get_pdata_int(iGlock, m_iShotsFired, XO_WEAPON) )
    // &&  ~get_pdata_int(iGlock, m_fWeaponState, XO_WEAPON) & WEAPONSTATE_GLOCK18_BURST_MODE  ) // shouldn't be needed
    {
        set_pdata_int(iGlock, m_iShotsFired, 0, XO_WEAPON)
        new Float:flCycleTime = get_pcvar_float(g_pCvarCycleTime)
        if( flCycleTime > 0.0 && flCycleTime != DEFAULT_GLOCK_CYCLETIME )
        {
            set_pdata_float(iGlock, m_flNextPrimaryAttack, get_pdata_float(iGlock, m_flNextPrimaryAttack, XO_WEAPON) + flCycleTime - DEFAULT_GLOCK_CYCLETIME, XO_WEAPON)
        }
    }
}
Full Auto Beautiful
Sign up to access this!

No comments yet

Embed

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

Credits

ConnorMcLeod
ConnorMcLeod

Submitter

Rainbowdash98 avatar
Rainbowdash98 Joined 4y ago
Offline
Rainbowdash98
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

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 1
  • 147
  • 9d

More from Submitter

More AMX/X Scripts Scripts