Skip to content

Instantly share code, notes, and snippets.

@rubenwardy
Last active August 29, 2015 14:07
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 rubenwardy/2deff413bd1f354822a0 to your computer and use it in GitHub Desktop.
Save rubenwardy/2deff413bd1f354822a0 to your computer and use it in GitHub Desktop.
Chat command to run lua code in Minetest
minetest.register_chatcommand("l", {
params = "lua code",
description = "Run lua code",
func = function(name, param)
f = loadstring("minetest.chat_send_player(\"" .. name .. "\", \"Result: \" .. dump("..param.."))")
f()
end
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment