Garry's Mod Wiki

Garry's Mod Wiki

  GM:PlayerButtonUp( Player ply, number button )
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.

Description

Called when a player releases a button.

This will not be called if player has a panel opened with keyboard input enabled, use PANEL:OnKeyCodeReleased instead.

Arguments

1 Player ply
Player who released the button
2 number button
The button, see BUTTON_CODE enum

Example

Prints the person who released the key.

hook.Add( "PlayerButtonUp", "ButtonUpWikiExample", function( ply, button ) if CLIENT then if ( IsFirstTimePredicted() ) then print( ply:Nick() .. " released " .. input.GetKeyName( button ) ) end else print( ply:Nick() .. " released " .. button ) end end)

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...