mirror of
https://github.com/niwla23/playerinfo.git
synced 2024-12-22 13:52:28 +01:00
initial commit
This commit is contained in:
commit
8b9c5bf8cf
19
init.lua
Normal file
19
init.lua
Normal file
@ -0,0 +1,19 @@
|
||||
minetest.register_chatcommand("setinfo", {
|
||||
params = "<info>",
|
||||
description = "Sets your info",
|
||||
func = function(name, param)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
player:set_attribute("info", param)
|
||||
return true, "Set your info"
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("seeinfo", {
|
||||
params = "<info>",
|
||||
description = "Sets your info",
|
||||
func = function(name, param)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local player2getinfo = minetest.get_player_by_name(param)
|
||||
minetest.chat_send_player(player:get_player_name(), player2getinfo:get_attribute("info"))
|
||||
end,
|
||||
})
|
Loading…
Reference in New Issue
Block a user