Skip to content

Instantly share code, notes, and snippets.

@andrewrk
Created October 27, 2011 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewrk/1318641 to your computer and use it in GitHub Desktop.
Save andrewrk/1318641 to your computer and use it in GitHub Desktop.
mf.include("chat_commands.js");
(function() {
chat_commands.registerCommand("forward", function() {
mf.setControlState(mf.Control.Forward, true);
});
chat_commands.registerCommand("back", function() {
mf.setControlState(mf.Control.Back, true);
});
chat_commands.registerCommand("left", function() {
mf.setControlState(mf.Control.Left, true);
});
chat_commands.registerCommand("right", function() {
mf.setControlState(mf.Control.Right, true);
});
chat_commands.registerCommand("stop", function() {
mf.setControlState(mf.Control.Forward, false);
mf.setControlState(mf.Control.Right, false);
mf.setControlState(mf.Control.Left, false);
mf.setControlState(mf.Control.Back, false);
mf.setControlState(mf.Control.Jump, false);
});
chat_commands.registerCommand("jump", function() {
mf.setControlState(mf.Control.Jump, true);
});
})();
mf.include("multi.js");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment