move cmdplus into illuna
This commit is contained in:
parent
b4c21890c6
commit
fbd45aa046
66
commands.lua
Normal file
66
commands.lua
Normal file
@ -0,0 +1,66 @@
|
||||
spawn = {x = -110.0, y = 25.9, z = -202.0}
|
||||
|
||||
minetest.register_on_chat_message(function(name, message, playername, player)
|
||||
local cmd = "/spawn"
|
||||
if message:sub(0, #cmd) == cmd then
|
||||
if message == '/spawn' then
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...")
|
||||
player:setpos(spawn)
|
||||
return true --deds to sfan5
|
||||
end
|
||||
end
|
||||
local cmd ="/away"
|
||||
if message:sub(0, #cmd) == cmd then
|
||||
if message == '/away' then
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
minetest.chat_send_all(name.." is now away from keyboard! ")
|
||||
return true --deds to sfan5
|
||||
end
|
||||
end
|
||||
local cmd ="/re"
|
||||
if message:sub(0, #cmd) == cmd then
|
||||
if message == '/re' then
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
minetest.chat_send_all(name.." is no longer away from keyboard! ")
|
||||
return true --added by AnFiadhChu
|
||||
end
|
||||
end
|
||||
local cmd ="/hacmd"
|
||||
if message:sub(0, #cmd) == cmd then
|
||||
if message == '/hacmd' then
|
||||
--local player = minetest.env:get_player_by_name(name)
|
||||
minetest.chat_send_all("additional Commands")
|
||||
minetest.chat_send_all("===================")
|
||||
minetest.chat_send_all("use /away for afk note from server.")
|
||||
minetest.chat_send_all("use /re for no-longer-afk note from server.")
|
||||
minetest.chat_send_all("use /spawn to teleporting you to the spawnpoint.")
|
||||
minetest.chat_send_all("use /helpcmdplus to show this helpmessage.")
|
||||
return true
|
||||
end
|
||||
end
|
||||
local cmd ="/helpcmdplus"
|
||||
if message:sub(0, #cmd) == cmd then
|
||||
if message == '/helpcmdplus' then
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
minetest.chat_send_all("additional Comands")
|
||||
minetest.chat_send_all("==================")
|
||||
minetest.chat_send_player(player:get_player_name(),"use /away for afk note from server.")
|
||||
minetest.chat_send_player(player:get_player_name(),"use /re for no-longer-afk note from server.")
|
||||
minetest.chat_send_player(player:get_player_name(),"use /spawn to teleporting you to the Spawnpoint.")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
--Deds to Kahrl
|
||||
minetest.register_on_newplayer(function(player)
|
||||
player:setpos(spawn)
|
||||
return true
|
||||
end)
|
||||
|
||||
--Deds to Kahrl
|
||||
minetest.register_on_respawnplayer(function(player, pos)
|
||||
player:setpos(spawn)
|
||||
return true
|
||||
end)
|
Loading…
x
Reference in New Issue
Block a user