RegisterInput
Definition
registerInput(slug, label, callback)--
-- registerInput()
--
-- @param string slug The internal slug (must be unique in your mod scope)
-- @param string label The label displayed in CET Bindings
-- @param function callback The callback function
--
registerInput('slug', 'label', function(keypress)
if keypress then
-- key is pressed
else
-- key is released
end
end)Alternative Usage
Usage Note
Usage Example
Activate slow motion effect as long as the input key is pressed:
Advanced Example
Continuously give money as long as the input key is pressed:
Last updated