hello guys i was wondering if anyone would find my new library of 'OnKey' functions/ hooks useful, I intend to release it if people think it could be useful
Functions
SHARED | ENTITY : OnKeyPressed
Args ( Player WhoPressedTheKey, Key Enum )
SHARED | ENTITY : OnKeyReleased
Args ( Player WhoPressedTheKey, Key Enum )
Hooks
SHARED | OnKeyPressed
Args ( Player WhoPressedTheKey, Key Enum )
SHARED | OnKeyDown
Args ( Player WhoHeldTheKey, Key Enum )
SHARED | OnKeyReleased
Args( Player WhoReleasedTheKey, Key Enum )
SHARED | OnEntityKeyPressed
Args ( Player WhoPressedTheKey, Key Enum, Entity EntityTheyAreLookingAt )
Return False to Block
SHARED | OnEntityKeyReleased
Args( Player WhoReleasedTheKey, Key Enum, Entity EntityTheyAreLookingAt )
Return False to Block
Any feedback would be appreciated, and hopefully above should give you enough info as to the uses of the functions/ hooks.
I made something sort of similar to this:
GMod-Binding
Example:
bind.Add( KEY_R, "<UNIQUE_NAME>", function()
notification.AddLegacy( "This script works!", NOTIFY_GENERIC, 2 )
end )
from your github page
It only works client-side, since on server-side you can use the numpad library.
mine works on both relms, which was the main idea as a server cant ask a player if they are pressing for example the 'H' key but with this scripts that's possible
Yeah, yours sounds great, you should release it!
Sorry, you need to Log In to post a reply to this thread.