GM/PlayerButtonDown

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (grammar change)
(Once again, it works fine with all buttons)
Line 1: Line 1:
 
{{Hook
 
{{Hook
|Description=Called when a player presses a key.
+
|Description=Called when a player presses a button.
 
|Realm=Shared
 
|Realm=Shared
 
|Predicted=Yes
 
|Predicted=Yes
Line 7: Line 7:
 
|type=Player
 
|type=Player
 
|name=ply
 
|name=ply
|desc=Player who pressed the key
+
|desc=Player who pressed the button
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
 
|name=key
 
|name=key
|desc=The key, see {{Enum|KEY}}
+
|desc=The key, see {{Enum|BUTTON_CODE}}
 
}}
 
}}

Revision as of 13:35, 24 April 2017

 GM:PlayerButtonDown( )

Description

Called when a player presses a button.

NOTE

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

Arguments

Player ply

Player who pressed the button

Arguments

number key

The key, see BUTTON_CODE_ Enums
Personal tools
Navigation