Add files via upload

master
zmv7 2022-03-16 00:03:07 +05:00 committed by GitHub
commit 5aa737f8ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

16
init.lua Normal file
View File

@ -0,0 +1,16 @@
local antifall = false
minetest.register_globalstep(function(dtime)
if not core.localplayer then return end
if antifall == true and core.localplayer:get_velocity().y < -33 then
core.run_server_chatcommand('home','')
--core.disconnect()
antifall = false
core.after(5,function()antifall = true end)
end
end)
minetest.register_chatcommand("antifall", {
description = "Toggle antifall",
func = function(param)
antifall = not antifall
return true, string.format('Antifall is now %s.', antifall and 'enabled' or 'disabled')
end})

1
mod.conf Normal file
View File

@ -0,0 +1 @@
name = antifall