Create void.lua

master
Minetest-j45 2021-03-20 17:22:34 +00:00 committed by GitHub
parent f86c2bafb3
commit f8ea92d224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

13
void.lua Normal file
View File

@ -0,0 +1,13 @@
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if timer >= 1 then
local players = minetest.get_connected_players()
for _, player in ipairs(players) do
if player:get_pos().y < 80 then
player:set_hp(0)
end
end
timer = 0
end
end)