Garry's Mod Wiki

numpad

The numpad module allows you to execute functions on a key press or release.

Methods

numpad.Activate( Player ply, number key, boolean isButton )
Activates numpad key owned by the player
numpad.Deactivate( Player ply, number key, boolean isButton )
Deactivates numpad key owned by the player
boolean numpad.FromButton()
Returns true during a function added with numpad.Register when the third argument to numpad.Activate is true. This is caused when a numpad function is triggered by a button SENT being used.
number numpad.OnDown( Player ply, number key, string name, vararg ... )
Calls a function registered with numpad.Register when a player presses specified key. See for key released action: numpad.OnUp
number numpad.OnUp( Player ply, number key, string name, vararg ... )
Calls a function registered with numpad.Register when a player releases specified key. See for key pressed action: numpad.OnDown
numpad.Register( string id, function func )
Registers a numpad library action for use with numpad.OnDown and numpad.OnUp
numpad.Remove( number ID )
Removes a function added by either numpad.OnUp or numpad.OnDown
numpad.Toggle( Player ply, number key )
Either runs numpad.Activate or numpad.Deactivate depending on the key's current state

Page Links


Special Pages


Wikis

?

Render Time: 30ms

DB GetPage 10
Generate Html 2
SaveChanges (1) 9
Render Body 0
Render Sidebar 6