Last active
August 29, 2015 14:07
-
-
Save rubenwardy/2deff413bd1f354822a0 to your computer and use it in GitHub Desktop.
Chat command to run lua code in Minetest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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