From Garry's Mod
Revision as of 06:45, 17 July 2016 by Zombine (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 numpad.Register( )


Registers a numpad library action for use with numpad.OnDown and numpad.OnUp


string id

The unique id of your action.


function func

The function to be executed.

Arguments are:
Player ply - The player who pressed the button
vararg ... - The 4th and all subsequent arguments passed from numpad.OnDown and/or numpad.OnUp

Returning false in this function will remove the listener which triggered this function (example: return false if one of your varargs is an entity which is no longer valid)
Personal tools