minetest.register_playerstep(interval, function(player, dtime))
Genshin редактира тази страница преди 3 години

Called every server step with a specified interval. this function is specifically used for players only.

  • interval: The number of seconds the function will be called again
  • player: Player's ObjectRef
  • dtime: Delta Time

Example

minetest.register_playerstep(1, function(player, dtime)
  minetest.chat_send_player(player:get_player_name(), "Playerstep is running at a interval of 1 for you, delta time is "..dtime)
end)