KeyBindingServiceMeow
A SCP:SL Plugin that allow you to bind player's key with specific action
Install / Use
/learn @MeowServer/KeyBindingServiceMeowREADME
This repo has been permanently archived since an official key-binding system was released. The content will no longer be updated. Thank you for your understanding!
Key Binding Service Meow
This Exiled plugin allows other plugins to customize the player's key binding.
Installation
Client-side:
- Add -allow-syncbind in the launch option
- Use the command "synccmd" twice in the client console until "SyncServerCommandBinding has been enabled" appears on the console.
Server-side:
- Enable enable_sync_command_binding option in config_gameplay.txt
- Put KeyBindingServiceMeow.dll under Plugins folder
- Put Newtonsoft.Json.dll under Plugins.dependencies folder
Documentary
Here's a simple instruction to develop using this plugin:
There 2 major way to bind a key to your action:
| Method | Advantage | Disadvantage |
| ---- | ---- | ---- |
| HotKey | Player can know which key the plugin is using and customize it using command | You have to create a HotKey instance and register it for every single player|
| Event | Easy to use. | It is not customizable and not visible for players |
Example
- Hot Key
var hotKey = new HotKey(KeyCode.YourKeyCode, "ID", "Name", "Descriptoin(optional)", "Category(optional)");
hotKey.KeyPressed += YourMethod;
API.Features.HotKey.HotKeyBinder.RegisterKey(ev.Player, hotKeys);
- Event
API.Event.Events.RegisterKeyToEvent(KeyCode.YourKeyCode);
API.Event.Events.KeyPressed += OnKeyPressed;
When using OnKeyPressed event, you must first register your key using RegisterKeyToEvent method.
