add 'core:warning' event

This commit is contained in:
MihailRis
2024-11-01 15:50:39 +03:00
parent 9ede50045b
commit e51c6bed78
4 changed files with 20 additions and 7 deletions
+6
View File
@@ -1,6 +1,12 @@
history = session.get_entry("commands_history")
history_pointer = #history
events.on("core:warning", function (wtype, text)
document.problemsLog:add(gui.template("problem", {
type="warning", text=wtype..": "..text, id=tostring(math.random())
}))
end)
function setup_variables()
local pid = hud.get_player()
local x,y,z = player.get_pos(pid)