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

Drop Weapon Script w/ Animations - A Config Script for Garry's Mod

19 415 bytes Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local dropDelay = true

local function VNTDropWeapon( ply )

    if IsValid( ply ) and ply:Alive( ) and IsValid( ply:GetActiveWeapon( ) ) and dropDelay == true then

        dropDelay = false
        ply:DoAnimationEvent( ACT_GMOD_GESTURE_ITEM_DROP )
        timer.Simple( 0.9 , function( ) 

            ply:DropWeapon( ply:GetActiveWeapon( ) ) 
            dropDelay = true

        end )

    end

end
concommand.Add( "drop" , VNTDropWeapon )

Updates

Update 1 1y
  • Addition Added delay between dropping
  • Improvement Added validity checks

A script to drop your weapon while playing an animation

This script will drop your currently held weapon while playing an animation.

Please note there is a slight delay between the key press and the actual drop to compensate for the animations.

It also uses the wrong hand in the animation because a right-handed drop animation does not exist in GMod's animation library.

To use, bind a key to 'drop' such as the forward slash key.

Video

Also Available on Steam Workshop

No comments yet