GM/PlayerButtonDown

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Undo revision 27221 by Mysterypancake1 (talk) - KEY enums are part of the BUTTON_CODE enums.)
Line 1: Line 1:
 
{{Hook
 
{{Hook
|Description=Called when a player presses a button.
+
|Description=Called when a player presses a key.
 
|Realm=Shared
 
|Realm=Shared
 
|Predicted=Yes
 
|Predicted=Yes
Line 7: Line 7:
 
|type=Player
 
|type=Player
 
|name=ply
 
|name=ply
|desc=Player who has pressed button
+
|desc=Player who has pressed key
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=button
+
|name=key
|desc=Button code, see {{Enum|BUTTON_CODE}}
+
|desc=The key, see {{Enum|KEY}}
 
}}
 
}}

Revision as of 19:00, 17 April 2017

 GM:PlayerButtonDown( )

Description

Called when a player presses a key.

NOTE

This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.

Arguments

Player ply

Player who has pressed key

Arguments

number key

The key, see KEY_ Enums
Personal tools
Navigation