Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 1.31 KB

README.md

File metadata and controls

39 lines (22 loc) · 1.31 KB

Unintrusive bind press

A solution to breaking other addons using the mouse wheel

How to install

Place the script file inside a Lua environment folder (such as the lua folder or a game mode folder).

Then, include the file client-side wise as the PlayerBindPress hook is client-side only. In case of manual inclusion, make sure your implementation is included after you've included this script.

Alternatively, you can place it into lua/autorun/client for it to be included automatically.

How to use

UnintrusiveBindPress.add(id, func, priority)

Hooks a function to the PlayerBindPress event.

  • id: unique function identifier.
  • func: function to run.
  • priority (optional): sets a priority (1 being top priority)

Other functions

UnintrusiveBindPress.remove(id)

Removes a function hooked to the PlayerBindPress event.

  • id: unique function identifier.

UnintrusiveBindPress.getTable(priority)

Returns the list of functions hooked to the PlayerBindPress via this system.

  • priority (optional): the priority of the functions we want to get.